From b1d01b414ef6bdc361b26f652c708cd8af868ebc Mon Sep 17 00:00:00 2001 From: ashley zomo Date: Sun, 13 Feb 2022 19:29:10 -0600 Subject: [PATCH] register commands for new guilds --- src/index.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/index.ts b/src/index.ts index 8b6aa41..48805a9 100644 --- a/src/index.ts +++ b/src/index.ts @@ -26,6 +26,11 @@ CLIENT.on('ready', client => { discordInit(client); }); +CLIENT.on('guildCreate', guild => { + if (guild.client.user) + registerCommands(TOKEN, guild.client.user.id, guild.id); +}); + CLIENT.on('interactionCreate', async interaction => { if (!interaction.isCommand()) return;