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.`);
|
if (!command) return console.error(`No command matching ${interaction.commandName} was found.`);
|
||||||
try {
|
try {
|
||||||
await command.execute(interaction);
|
await command.execute(interaction);
|
||||||
|
console.info(`[Info - Discord] Command '${interaction.commandName}' executed by '${interaction.user.username}'`);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error(error);
|
console.error(`Error executing command '${interaction.commandName}': by '${interaction.user.username}'\n${error}`);
|
||||||
if (interaction.replied || interaction.deferred) {
|
if (interaction.replied || interaction.deferred) {
|
||||||
await interaction.followUp({ content: 'There was an error while executing this command!', ephemeral: true });
|
await interaction.followUp({ content: 'There was an error while executing this command!', ephemeral: true });
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in New Issue