forked from engineering/crv2
interaction changes
parent
4fb3817702
commit
65950def3f
|
@ -13,8 +13,9 @@ export default class InteractionCreate extends DiscordEvent {
|
|||
if (!command) return console.error(`No command matching ${interaction.commandName} was found.`);
|
||||
try {
|
||||
await command.execute(interaction);
|
||||
console.info(`[Info - Discord] Command '${interaction.commandName}' executed by '${interaction.user.username}'`);
|
||||
} catch (error) {
|
||||
console.error(error);
|
||||
console.error(`Error executing command '${interaction.commandName}': by '${interaction.user.username}'\n${error}`);
|
||||
if (interaction.replied || interaction.deferred) {
|
||||
await interaction.followUp({ content: 'There was an error while executing this command!', ephemeral: true });
|
||||
} else {
|
||||
|
|
Loading…
Reference in New Issue