interaction changes

pull/1/head
Matthew 2024-10-24 20:40:14 -04:00
parent 4fb3817702
commit 65950def3f
Signed by: matthew
SSH Key Fingerprint: SHA256:piIXekA9q1p0ZGi4ogFbNY1embip5Ytbi3v8AZ8UYq4
1 changed files with 2 additions and 1 deletions

View File

@ -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 {