discord-auto-sharder
is a simple and automated sharding system for Discord.js bots. It automatically handles the creation of shards, manages shard statuses, and posts real-time updates to a designated Discord channel. This package simplifies the process of setting up sharding in a bot, requiring only the bot token and the channel ID for shard status updates.
-
Automatic Shard Detection: Automatically detects the main entry file (
index.js
,bot.js
,app.js
). - Real-Time Shard Status Updates: Posts real-time updates for each shard to a specified channel in your Discord server.
- Simple Setup: Just provide the bot token and channel ID—no need to manually configure shard files.
To install discord-auto-sharder
in your project, run the following command:
npm install discord-auto-sharder
const AutoSharder = require('discord-auto-sharder');
const TOKEN = 'your-discord-bot-token'; // Replace with your bot token
const STATUS_CHANNEL_ID = 'your-channel-id'; // Replace with the ID of the channel where you want shard updates
// Instantiate and run the AutoSharder
new AutoSharder(TOKEN, STATUS_CHANNEL_ID);
node index.js