diff options
author | TymanWasTaken <32660892+tymanwastaken@users.noreply.github.com> | 2021-05-26 10:53:16 -0600 |
---|---|---|
committer | TymanWasTaken <32660892+tymanwastaken@users.noreply.github.com> | 2021-05-26 10:53:16 -0600 |
commit | 53d8d5e551e9a239fd4c48c7dca4e1f6fb8d81e9 (patch) | |
tree | 15896b71e22fd7d1d002364c969bf14a00a29af0 /src/listeners/client | |
parent | 9c345bf5f62eeb3f9f7246d8259e0978a18c7bc0 (diff) | |
download | tanzanite-53d8d5e551e9a239fd4c48c7dca4e1f6fb8d81e9.tar.gz tanzanite-53d8d5e551e9a239fd4c48c7dca4e1f6fb8d81e9.tar.bz2 tanzanite-53d8d5e551e9a239fd4c48c7dca4e1f6fb8d81e9.zip |
pronouns command and use guild slash commands for testing not global
Diffstat (limited to 'src/listeners/client')
-rw-r--r-- | src/listeners/client/syncslashcommands.ts | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/listeners/client/syncslashcommands.ts b/src/listeners/client/syncslashcommands.ts index 66f530f..da42185 100644 --- a/src/listeners/client/syncslashcommands.ts +++ b/src/listeners/client/syncslashcommands.ts @@ -8,6 +8,12 @@ export default class CreateSlashCommands extends BotListener { }); } async exec(): Promise<void> { - await this.client.util.syncSlashCommands(); + if (this.client.config.dev && this.client.config.devGuild) { + // Use guild slash commands for instant registration in dev + await this.client.util.syncSlashCommands(false, this.client.config.devGuild); + } else { + // Use global in production + await this.client.util.syncSlashCommands(); + } } } |