feat: add prod check
This commit is contained in:
parent
393806051c
commit
a06c0e0abf
|
@ -32,8 +32,8 @@ const rest = new REST().setToken(process.env.TOKEN!);
|
||||||
|
|
||||||
// The put method is used to fully refresh all commands in the guild with the current set
|
// The put method is used to fully refresh all commands in the guild with the current set
|
||||||
const data = await rest.put(
|
const data = await rest.put(
|
||||||
Routes.applicationGuildCommands('872411739155726336', '1127731341283307520'),
|
process.env.PROD === '1' ? Routes.applicationCommands('872411739155726336') : Routes.applicationGuildCommands('872411739155726336', '1127731341283307520'),
|
||||||
{ body: commandsArray.map(cmd => cmd.builder) },
|
{ body: commandsArray.map(cmd => cmd.builder) }
|
||||||
);
|
);
|
||||||
|
|
||||||
console.log(`Successfully reloaded ${commands.size} application (/) commands.`);
|
console.log(`Successfully reloaded ${commands.size} application (/) commands.`);
|
||||||
|
|
Loading…
Reference in a new issue