bAVAZ1
bAVAZ1
DIAdiscord.js - Imagine an app
Created by bAVAZ1 on 11/23/2023 in #djs-questions
Shard reconnect issue
thank you very much Qjuh, that was the main reason for the reconnection issue! We upgraded to 14.14.1 and it seems to work fine.
5 replies
DIAdiscord.js - Imagine an app
Created by bAVAZ1 on 11/23/2023 in #djs-questions
Shard reconnect issue
i will try it, thank you!
5 replies
DIAdiscord.js - Imagine an app
Created by bAVAZ1 on 11/23/2023 in #djs-questions
Shard reconnect issue
Im using - "discord.js": "^14.8.0" - "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 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]
});
5 replies
DIAdiscord.js - Imagine an app
Created by bAVAZ1 on 11/23/2023 in #djs-questions
Shard reconnect issue
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]
});
3 replies