Verify working
diff --git a/src/events/commandError.ts b/src/events/commandError.ts
index 8ed01d2..ff5f4ae 100644
--- a/src/events/commandError.ts
+++ b/src/events/commandError.ts
@@ -6,26 +6,19 @@
export const event = "commandError";
export async function callback(_: NucleusClient, interaction: CommandInteraction | ButtonInteraction | ContextMenuCommandInteraction, error: string) {
+ const embed = new EmojiEmbed()
+ .setTitle("Something went wrong")
+ .setDescription(error)
+ .setStatus("Danger")
+ .setEmoji("CONTROL.BLOCKCROSS")
if (interaction.replied || interaction.deferred) {
await interaction.followUp({
- embeds: [
- new EmojiEmbed()
- .setTitle("Something went wrong")
- .setDescription(error)
- .setStatus("Danger")
- .setEmoji("CONTROL.BLOCKCROSS")
- ],
+ embeds: [embed],
ephemeral: true
});
} else {
await interaction.reply({
- embeds: [
- new EmojiEmbed()
- .setTitle("Something went wrong")
- .setDescription(error)
- .setStatus("Danger")
- .setEmoji("CONTROL.BLOCKCROSS")
- ],
+ embeds: [embed],
ephemeral: true
});
}