This repository contains the source code for a Discord bot monitor. This tool helps you track the presence status of your Discord bots, alerting users when a bot is online, offline, or undergoing maintenance.
- Real-time monitoring of Discord bot status and presence updates.
- Automatic notifications for bot availability changes (online, offline, idle, dnd, streaming).
- Error tracking and reporting to designated channels.
- Debug mode for troubleshooting.
- Compatible with Discord.js v14.
- Event-driven architecture with modular handlers.
- Node.js (v16.9.0 or later)
- Discord Developer Portal Application with a bot token
- Required Discord Bot Intents:
- Guild Messages
- Guild Members
- Guild Presences
- Message Content
- And other intents as configured in the bot
- Clone this repository to your local machine using:
git clone https://github.com/ThunderDoesDev/TS-Monitor.git
- Navigate to the cloned directory.
- Install the required Node.js modules with:
npm install
-
Configure the bot:
- Rename
Config.example.jsontoConfig.jsonin theSettingsfolder. - Update the configuration with your bot token and server-specific settings:
{ "bot": { "token": "YOUR_MONITOR_BOT_TOKEN", "botID": "YOUR_MAINBOT_ID", "statusChannel": "YOUR_STATUS_CHANNEL_ID", "mainGuild": "YOUR_MAIN_GUILD_ID", "statusBotName": "YOUR_STATUS_BOT_NAME", "debugMode": false, "botOwners": [ "YOUR_BOT_OWNER_ID" ], "errorChannel": "YOUR_ERROR_CHANNEL_ID" } } - Replace the placeholders with your specific details:
token: The Discord token of your monitor bot.botID: The ID of the bot you want to monitor.statusChannel: The ID of the channel where status updates will be posted.mainGuild: The ID of the main server where both the monitor bot and the monitored bot reside.statusBotName: The name of your status bot (used in footer and user agent).debugMode: Enable or disable debug mode (boolean).botOwners: Array of Discord user IDs who own the bot.errorChannel: The ID of the channel where error notifications will be posted.
- Rename
-
Invite the monitor bot to your Discord server. Ensure the bot being monitored is present in the same server.
- Open your command prompt or PowerShell.
- Execute the monitor script using one of the following methods:
or
npm start
node Monitor.js
- Keep the monitor script running to ensure uninterrupted status tracking.
- Update your configuration settings as necessary to adapt to changes in your setup or the Discord API.
- Never commit your
Config.jsonfile to public repositories as it contains sensitive information (bot tokens, IDs). - Use
Config.example.jsonas a template and keep your actualConfig.jsonin.gitignore. - Ensure your monitor bot has the necessary permissions in the Discord server (View Channels, Send Messages, Embed Links).
Current version: 7.0.0
- Introduced a new configuration template with additional settings.
- Upgraded to Discord.js v14 for enhanced performance and compatibility.
- Added support for error channel notifications.
- Added debug mode configuration option.
- Added bot owner management.
For support, issues, or enhancements, please open an issue in this repository or join our discord support server.
This project is licensed under the MIT License - see the LICENSE file for details.