Shard 76's Client took too long to become ready.

Error [SHARDING_READY_TIMEOUT]: Shard 76's Client took too long to become ready.
at Timeout.onTimeout (...\node_modules\discord.js\src\sharding\Shard.js:166:16)
at listOnTimeout (node:internal/timers:569:17)
at process.processTimers (node:internal/timers:512:7) {
[Symbol(code)]: 'SHARDING_READY_TIMEOUT'
}
Error [SHARDING_READY_TIMEOUT]: Shard 76's Client took too long to become ready.
at Timeout.onTimeout (...\node_modules\discord.js\src\sharding\Shard.js:166:16)
at listOnTimeout (node:internal/timers:569:17)
at process.processTimers (node:internal/timers:512:7) {
[Symbol(code)]: 'SHARDING_READY_TIMEOUT'
}
const { ShardingManager } = require('discord.js');
const config = require('./settings.json');

const manager = new ShardingManager('./bot.js', {
token: config.token,
mode: 'process',
totalShards: 'auto',
respawn: true,
shardDelay: 5*1000,
execArgv: ['--no-warnings']
});

manager.on("debug", console.log)

process.on('unhandledRejection', error => console.log("Error > ", error));
process.on('uncaughtException', error => console.log("Error > ", error));
process.on("uncaughtExceptionMonitor", e => console.log("Error > ", e));
process.on("multipleResolves", e => console.log("Error > ", e));


manager.on('shardCreate', async (shard) => {
console.log(`Launched shard ${shard.id}`)

shard.on('error', (error) => {
console.error(`Shard ${shard.id} Error: `, error);
});

shard.on('disconnect', () => {
console.log(`Shard ${shard.id} disconnected. Trying to reconnect...`);
});

shard.on('reconnecting', () => {
console.log(`Reconnecting Shard ${shard.id}...`);
});

shard.on('ready', () => {
console.log(`Shard ${shard.id} reconnected.`);
});
});
manager.spawn({ shardDelay: 5 * 1000 });
const { ShardingManager } = require('discord.js');
const config = require('./settings.json');

const manager = new ShardingManager('./bot.js', {
token: config.token,
mode: 'process',
totalShards: 'auto',
respawn: true,
shardDelay: 5*1000,
execArgv: ['--no-warnings']
});

manager.on("debug", console.log)

process.on('unhandledRejection', error => console.log("Error > ", error));
process.on('uncaughtException', error => console.log("Error > ", error));
process.on("uncaughtExceptionMonitor", e => console.log("Error > ", e));
process.on("multipleResolves", e => console.log("Error > ", e));


manager.on('shardCreate', async (shard) => {
console.log(`Launched shard ${shard.id}`)

shard.on('error', (error) => {
console.error(`Shard ${shard.id} Error: `, error);
});

shard.on('disconnect', () => {
console.log(`Shard ${shard.id} disconnected. Trying to reconnect...`);
});

shard.on('reconnecting', () => {
console.log(`Reconnecting Shard ${shard.id}...`);
});

shard.on('ready', () => {
console.log(`Shard ${shard.id} reconnected.`);
});
});
manager.spawn({ shardDelay: 5 * 1000 });
2 Replies
d.js toolkit
d.js toolkit2y ago
• What's your exact discord.js npm list discord.js and node node -v version? • Post the full error stack trace, not just the top part! • Show your code! • Explain what exactly your issue is. • Not a discord.js issue? Check out #useful-servers.
wulknn
wulknnOP2y ago
npm list discord.js: -- [email protected] node -v version: v18.16.0
Want results from more Discord servers?
Add your server