mirror of
https://github.com/darksaid98/cadence-discord-bot.git
synced 2026-12-04 06:28:53 +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
@@ -46,7 +46,9 @@ module.exports = {
|
||||
const currentModeUserString = loopModesFormatted.get(currentMode);
|
||||
|
||||
if (!mode && mode !== 0) {
|
||||
logger.debug(`User used command ${interaction.commandName} but no mode was provided.`);
|
||||
logger.debug(
|
||||
`[Shard ${interaction.guild.shardId}] User used command ${interaction.commandName} but no mode was provided.`
|
||||
);
|
||||
|
||||
return await interaction.editReply({
|
||||
embeds: [
|
||||
@@ -63,7 +65,7 @@ module.exports = {
|
||||
|
||||
if (mode === currentMode) {
|
||||
logger.debug(
|
||||
`User used command ${interaction.commandName} but loop mode was already set to ${modeUserString}.`
|
||||
`[Shard ${interaction.guild.shardId}] User used command ${interaction.commandName} but loop mode was already set to ${modeUserString}.`
|
||||
);
|
||||
|
||||
return await interaction.editReply({
|
||||
@@ -80,7 +82,9 @@ module.exports = {
|
||||
queue.setRepeatMode(mode);
|
||||
|
||||
if (!queue.repeatMode === mode) {
|
||||
logger.debug(`User used command ${interaction.commandName} but failed to change loop mode.`);
|
||||
logger.debug(
|
||||
`[Shard ${interaction.guild.shardId}] User used command ${interaction.commandName} but failed to change loop mode.`
|
||||
);
|
||||
|
||||
return await interaction.editReply({
|
||||
embeds: [
|
||||
@@ -94,7 +98,9 @@ module.exports = {
|
||||
}
|
||||
|
||||
if (queue.repeatMode === 0) {
|
||||
logger.debug(`User used command ${interaction.commandName} and disabled loop mode.`);
|
||||
logger.debug(
|
||||
`[Shard ${interaction.guild.shardId}] User used command ${interaction.commandName} and disabled loop mode.`
|
||||
);
|
||||
|
||||
return await interaction.editReply({
|
||||
embeds: [
|
||||
@@ -112,7 +118,9 @@ module.exports = {
|
||||
}
|
||||
|
||||
if (queue.repeatMode === 3) {
|
||||
logger.debug(`User used command ${interaction.commandName} and enabled autoplay.`);
|
||||
logger.debug(
|
||||
`[Shard ${interaction.guild.shardId}] User used command ${interaction.commandName} and enabled autoplay.`
|
||||
);
|
||||
|
||||
return await interaction.editReply({
|
||||
embeds: [
|
||||
@@ -129,7 +137,9 @@ module.exports = {
|
||||
});
|
||||
}
|
||||
|
||||
logger.debug(`User used command ${interaction.commandName} and enabled loop mode.`);
|
||||
logger.debug(
|
||||
`[Shard ${interaction.guild.shardId}] User used command ${interaction.commandName} and enabled loop mode.`
|
||||
);
|
||||
|
||||
return await interaction.editReply({
|
||||
embeds: [
|
||||
|
||||
Reference in new issue
Block a user