mirror of
https://github.com/darksaid98/cadence-discord-bot.git
synced 2026-12-04 14:38:49 +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
@@ -8,7 +8,9 @@ module.exports = {
|
||||
isDebug: false,
|
||||
isPlayerEvent: true,
|
||||
execute: async (queue, track) => {
|
||||
logger.error(`player.events.on('playerSkip'): Failed to play '${track.url}'.`);
|
||||
logger.error(
|
||||
`[Shard ${queue.metadata.client.shard.ids[0]}] player.events.on('playerSkip'): Failed to play '${track.url}'.`
|
||||
);
|
||||
|
||||
await queue.metadata.channel.send({
|
||||
embeds: [
|
||||
@@ -21,16 +23,19 @@ module.exports = {
|
||||
});
|
||||
|
||||
if (systemOptions.systemMessageChannelId && systemOptions.systemUserId) {
|
||||
await queue.metadata.client.channels.cache.get(systemOptions.systemMessageChannelId).send({
|
||||
embeds: [
|
||||
new EmbedBuilder()
|
||||
.setDescription(
|
||||
`${embedOptions.icons.error} **player.events.on('playerSkip')**\n${track.url}` +
|
||||
`\n\n<@${systemOptions.systemUserId}>`
|
||||
)
|
||||
.setColor(embedOptions.colors.error)
|
||||
]
|
||||
});
|
||||
const channel = await queue.metadata.client.channels.cache.get(systemOptions.systemMessageChannelId);
|
||||
if (channel) {
|
||||
await channel.send({
|
||||
embeds: [
|
||||
new EmbedBuilder()
|
||||
.setDescription(
|
||||
`${embedOptions.icons.error} **player.events.on('playerSkip')**\n${track.url}` +
|
||||
`\n\n<@${systemOptions.systemUserId}>`
|
||||
)
|
||||
.setColor(embedOptions.colors.error)
|
||||
]
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
process.env.NODE_ENV === 'development' ? logger.trace(queue, 'Queue object') : null;
|
||||
|
||||
Reference in new issue
Block a user