diff options
Diffstat (limited to 'lib/utils/BotClientUtils.ts')
-rw-r--r-- | lib/utils/BotClientUtils.ts | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/utils/BotClientUtils.ts b/lib/utils/BotClientUtils.ts index a251bdf..1dd46bf 100644 --- a/lib/utils/BotClientUtils.ts +++ b/lib/utils/BotClientUtils.ts @@ -469,7 +469,10 @@ export class BotClientUtils { if (!(channel in channels)) throw new TypeError(`Invalid channel provided (${channel}), must be one of ${Object.keys(channels).join(' ')}`); - const channelId = channels[channel]; + const channelConfig = channels[channel]; + const environment = this.client.config.environment; + + const channelId = typeof channelConfig === 'string' ? channelConfig : channelConfig[environment]; if (channelId === '') return null; const res = await this.client.channels.fetch(channelId); |