Updated interactionCreate event

This commit is contained in:
Christer Warén 2021-08-31 11:55:57 +03:00
parent 277b67e3df
commit 1c9ad75b8e

View File

@ -19,13 +19,11 @@ module.exports = {
interaction.reply(client.messages.runningCommandFailed); interaction.reply(client.messages.runningCommandFailed);
console.error(error); console.error(error);
} }
} else if (interaction.isSelectMenu()){ } else if (interaction.isSelectMenu() || interaction.isButton()){
} else if (interaction.isButton()){
const commandName = interaction.customId; const commandName = interaction.customId;
const command = client.commands.get(commandName); const command = client.commands.get(commandName);
if (!command) return; if (!command) return;
try { try {
command.execute(interaction, client, Discord, command); command.execute(interaction, client, Discord, command);
} catch (error) { } catch (error) {