mirror of
https://github.com/darksaid98/cadence-discord-bot.git
synced 2026-12-04 22:15:29 +00:00
feat!: Sharding implemented across the bot
This commit is contained in:
1 parent
b160cbf564
commit
9c15c636d9
29 files changed
+270
-142
No files matched your search
@@ -7,20 +7,25 @@ module.exports = {
|
||||
isDebug: false,
|
||||
once: false,
|
||||
execute: async (client) => {
|
||||
logger.warn(`${client.user.tag} is reconnecting to Discord APIs.`);
|
||||
logger.warn(`[Shard ${client.shard.ids[0]}] ${client.user.tag} is reconnecting to Discord APIs.`);
|
||||
|
||||
// send message to system message channel for event
|
||||
if (systemOptions.systemMessageChannelId && systemOptions.systemUserId) {
|
||||
await client.channels.cache.get(systemOptions.systemMessageChannelId).send({
|
||||
embeds: [
|
||||
new EmbedBuilder()
|
||||
.setDescription(
|
||||
`${embedOptions.icons.warning} **${client.user.tag}** is **\`reconnecting\`**!` +
|
||||
`\n\n<@${systemOptions.systemUserId}>`
|
||||
)
|
||||
.setColor(embedOptions.colors.warning)
|
||||
]
|
||||
});
|
||||
if (systemOptions.systemMessageChannelId && systemOptions.systemUserId) {
|
||||
const channel = await client.channels.cache.get(systemOptions.systemMessageChannelId);
|
||||
if (channel) {
|
||||
await channel.send({
|
||||
embeds: [
|
||||
new EmbedBuilder()
|
||||
.setDescription(
|
||||
`${embedOptions.icons.warning} **${client.user.tag}** is **\`reconnecting\`**!` +
|
||||
`\n\n<@${systemOptions.systemUserId}>`
|
||||
)
|
||||
.setColor(embedOptions.colors.warning)
|
||||
]
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
Reference in new issue
Block a user