1
0
mirror of https://github.com/toast-ts/Daggerbot-TS.git synced 2024-12-27 20:35:38 -05:00

Remove archive server id from command registration

This commit is contained in:
AnxietyisReal 2023-01-02 21:18:04 +11:00
parent 931a79a06e
commit 4238303fa9

View File

@ -14,7 +14,7 @@ client.on('ready', async()=>{
}, 60000);
// ['929807948748832798', '468835415093411861', '1058183358267543552', '549114074273677314'] - 0=Dev Server, 1=Main Server, 2=Throne, 3=Toast's test server
if (client.config.botSwitches.registerCommands){
['929807948748832798', '468835415093411861', '1058183358267543552', '549114074273677314'].forEach((guildId)=>(client.guilds.cache.get(guildId) as Discord.Guild).commands.set(client.registry).catch((e:Error)=>{
['929807948748832798', '468835415093411861', '1058183358267543552'].forEach((guildId)=>(client.guilds.cache.get(guildId) as Discord.Guild).commands.set(client.registry).catch((e:Error)=>{
console.log(`Couldn't register slash commands for ${guildId} because`, e.stack);
(client.channels.resolve(client.config.mainServer.channels.errors) as Discord.TextChannel).send(`Cannot register slash commands for **${client.guilds.cache.get(guildId).name}** (\`${guildId}\`):\n\`\`\`${e.message}\`\`\``)
}));