discord-auto-sharder
v1.3.0
Published
A simple automatic sharding system for Discord.js bots with real-time shard status updates.
Downloads
30
Maintainers
Readme
discord-auto-sharder
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.
Features
- 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.
Installation
Install via npm
To install discord-auto-sharder
in your project, run the following command:
npm install discord-auto-sharder
Usage
Create a new index.js file
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);
Run Your Bot
node index.js