Shard reconnect issue

Hello, I have a problem that when I listen on the shard 'reconnect' event, I get the log that a reconnect has been triggered on the shard with ID X. Then another event comes 20 seconds later and then another event comes half a minute later - and they are for the same shard id. Meanwhile on the shard 'ready' event no log comes that shard X is ready. What could be the reason for this? I have read in several posts/comments that discord triggers at any time between 15m-4h to validate the shard, but here there is one (actually a few) shard with several 'reconnect' events. Did anyone else has this issue?
2 Replies
d.js toolkit
d.js toolkit14mo ago
- What's your exact discord.js npm list discord.js and node node -v version? - Not a discord.js issue? Check out #other-js-ts. - Consider reading #how-to-get-help to improve your question! - Explain what exactly your issue is. - Post the full error stack trace, not just the top part! - Show your code! - Issue solved? Press the button! - Marked as resolved by OP
bAVAZ1
bAVAZ1OP14mo ago
Im using - "discord-hybrid-sharding": "^2.1.4" for create clusters and sharding - "discordx": "^11.4.0" for create new discord client - 19.8.1 Node.js version - "discord.js": "^14.8.0" any related log wont help i think because im listening on this event:
client.on("shardReconnecting", (shardId) => {
logger.info(`Shard Reconnecting`, { shardId, pid: process.pid });
});
client.on("shardReconnecting", (shardId) => {
logger.info(`Shard Reconnecting`, { shardId, pid: process.pid });
});
and here is not much to log the discord-hybrid-sharding cluster manager looks like:
const manager = new ClusterManager(botPath, {
totalShards: "auto",
shardsPerClusters: 2,
totalClusters: "auto",
mode: "process",
token: config.discordToken,
});
const manager = new ClusterManager(botPath, {
totalShards: "auto",
shardsPerClusters: 2,
totalClusters: "auto",
mode: "process",
token: config.discordToken,
});
and the discordx Client looks like:
const client: Client = new Client({
shards: getShardingInfo().SHARD_LIST,
shardCount: getShardingInfo().TOTAL_SHARDS,

makeCache: Options.cacheWithLimits({
...Options.DefaultMakeCacheSettings,
ApplicationCommandManager: 0,
BaseGuildEmojiManager: 0,
GuildEmojiManager: 0,
GuildBanManager: 0,
GuildForumThreadManager: 0,
GuildScheduledEventManager: 0,
GuildStickerManager: 0,
GuildTextThreadManager: 0,
PresenceManager: 0,
ReactionManager: 0,
ReactionUserManager: 0,
StageInstanceManager: 0,
ThreadManager: 0,
ThreadMemberManager: 0,
}),
sweepers: {
...Options.DefaultSweeperSettings,
},
intents: [
IntentsBitField.Flags.Guilds,
IntentsBitField.Flags.GuildMembers,
IntentsBitField.Flags.GuildInvites,
IntentsBitField.Flags.GuildMessages,
IntentsBitField.Flags.GuildMessageReactions,
IntentsBitField.Flags.GuildPresences,
IntentsBitField.Flags.DirectMessages,
IntentsBitField.Flags.DirectMessageReactions,
IntentsBitField.Flags.GuildVoiceStates,
],
partials: [Partials.Message, Partials.Channel, Partials.Reaction]
});
const client: Client = new Client({
shards: getShardingInfo().SHARD_LIST,
shardCount: getShardingInfo().TOTAL_SHARDS,

makeCache: Options.cacheWithLimits({
...Options.DefaultMakeCacheSettings,
ApplicationCommandManager: 0,
BaseGuildEmojiManager: 0,
GuildEmojiManager: 0,
GuildBanManager: 0,
GuildForumThreadManager: 0,
GuildScheduledEventManager: 0,
GuildStickerManager: 0,
GuildTextThreadManager: 0,
PresenceManager: 0,
ReactionManager: 0,
ReactionUserManager: 0,
StageInstanceManager: 0,
ThreadManager: 0,
ThreadMemberManager: 0,
}),
sweepers: {
...Options.DefaultSweeperSettings,
},
intents: [
IntentsBitField.Flags.Guilds,
IntentsBitField.Flags.GuildMembers,
IntentsBitField.Flags.GuildInvites,
IntentsBitField.Flags.GuildMessages,
IntentsBitField.Flags.GuildMessageReactions,
IntentsBitField.Flags.GuildPresences,
IntentsBitField.Flags.DirectMessages,
IntentsBitField.Flags.DirectMessageReactions,
IntentsBitField.Flags.GuildVoiceStates,
],
partials: [Partials.Message, Partials.Channel, Partials.Reaction]
});
Want results from more Discord servers?
Add your server