register commands for new guilds
This commit is contained in:
@@ -26,6 +26,11 @@ CLIENT.on('ready', client => {
|
|||||||
discordInit(client);
|
discordInit(client);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
CLIENT.on('guildCreate', guild => {
|
||||||
|
if (guild.client.user)
|
||||||
|
registerCommands(TOKEN, guild.client.user.id, guild.id);
|
||||||
|
});
|
||||||
|
|
||||||
CLIENT.on('interactionCreate', async interaction => {
|
CLIENT.on('interactionCreate', async interaction => {
|
||||||
if (!interaction.isCommand()) return;
|
if (!interaction.isCommand()) return;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user