discord-bot-status

1.2.0 • Public • Published

Discord Bot Status

discord-bot-status is a Node.js package that automatically displays the real-time status (online, offline, idle, DND) and ping of a Discord bot in a specified channel.

Installation

Install the package with npm:

npm install discord-bot-status

Usage

Create a new index.js file

const { Client, Intents } = require('discord.js');
const BotStatus = require('discord-bot-status');

const client = new Client({
    intents: [Intents.FLAGS.GUILDS, Intents.FLAGS.GUILD_MESSAGES]
});

const CHANNEL_ID = 'YOUR_CHANNEL_ID';  // Replace with the ID of the channel where you want the status displayed

client.once('ready', () => {
    const botStatus = new BotStatus(client, CHANNEL_ID);
    botStatus.startStatusUpdates();
});

client.login(process.env.BOT_TOKEN);  // Securely pass the token through an environment variable

/discord-bot-status/

    Package Sidebar

    Install

    npm i discord-bot-status

    Weekly Downloads

    5

    Version

    1.2.0

    License

    MIT

    Unpacked Size

    5.01 kB

    Total Files

    3

    Last publish

    Collaborators

    • hjgaming