From 5b64f3d5383cc86b1c97a9bb3abc0d8e305d6172 Mon Sep 17 00:00:00 2001 From: "Navy.gif" Date: Fri, 22 Apr 2022 17:26:13 +0300 Subject: [PATCH] prepping for staging env --- src/middleware/rest/SlashCommandManager.js | 1 + src/structure/client/Intercom.js | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) 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 }); }