diff --git a/src/middleware/rest/SlashCommandManager.js b/src/middleware/rest/SlashCommandManager.js index 9d12c4d..3f0fb11 100644 --- a/src/middleware/rest/SlashCommandManager.js +++ b/src/middleware/rest/SlashCommandManager.js @@ -33,7 +33,7 @@ class SlashCommandManager { if (!guilds.length) guilds = this.client._options.discord.slashCommands.developerGuilds; const cmdHash = hash(commands); - for (const guild of guilds) { + for (const guild of [...guilds]) { // Skip guild update if hash is already up to date if (this.hash.guilds[guild] === cmdHash) guilds.splice(guilds.indexOf(guild), 1); // else update hash