Update commands.js

This commit is contained in:
Christer Warén 2021-12-12 05:56:29 +02:00
parent 3f3aab4c22
commit be97b271cf

View File

@ -60,6 +60,17 @@ module.exports = {
Routes.applicationCommands(client.user.id),
{ body: commands }
);
let guilds = await client.guilds.fetch();
guilds.forEach(async guild => {
try {
await rest.put(
Routes.applicationGuildCommands(client.user.id, guild.id),
{ body: [] }
);
} catch (DiscordAPIError) {
}
});
}
client.funcs.logger('Slash Commands', 'Successfully reloaded application (/) commands.' + "\n");