diff --git a/src/middleware/rest/SlashCommandManager.js b/src/middleware/rest/SlashCommandManager.js index 2adec5e..9d12c4d 100644 --- a/src/middleware/rest/SlashCommandManager.js +++ b/src/middleware/rest/SlashCommandManager.js @@ -29,6 +29,7 @@ class SlashCommandManager { } async guild(commands, { guilds = [], clientId }) { + if (!guilds.length) guilds = this.client._options.discord.slashCommands.developerGuilds; const cmdHash = hash(commands); diff --git a/src/structure/client/Intercom.js b/src/structure/client/Intercom.js index 57b5bab..b0c66d8 100644 --- a/src/structure/client/Intercom.js +++ b/src/structure/client/Intercom.js @@ -27,10 +27,10 @@ class Intercom { .filter((c) => c._type === 'command' && c.slash) .map((c) => c.shape); - if (process.env.NODE_ENV === 'development') return this.send('commands', { type: 'guild', commands, clientId }); + if (process.env.NODE_ENV !== 'production') return this.send('commands', { type: 'guild', commands, clientId }); this.send('commands', { type: 'global', commands, clientId }); - this.send('commands', { type: 'guild', commands, clientId }); + //this.send('commands', { type: 'guild', commands, clientId }); }