Bot: Clear global commands when running as dev

This commit is contained in:
2023-07-31 17:18:22 +02:00
committed by Minz
parent 643c027ce8
commit de37b9d348

View File

@@ -21,6 +21,7 @@ module.exports = {
await rest.put(Routes.applicationGuildCommands(CLIENT_ID, process.env.GUILD_ID), {body: [] }); //Clear Guild commands on prod await rest.put(Routes.applicationGuildCommands(CLIENT_ID, process.env.GUILD_ID), {body: [] }); //Clear Guild commands on prod
console.log("Global commands registered"); console.log("Global commands registered");
} else { } else {
await rest.put(Routes.applicationCommands(CLIENT_ID), {body: [] }); //Clear global commands on dev
await rest.put(Routes.applicationGuildCommands(CLIENT_ID, process.env.GUILD_ID), {body: commands }); await rest.put(Routes.applicationGuildCommands(CLIENT_ID, process.env.GUILD_ID), {body: commands });
console.log("Local commands registered"); console.log("Local commands registered");
} }