added page indicators
diff --git a/src/events/commandError.ts b/src/events/commandError.ts
new file mode 100644
index 0000000..ba47426
--- /dev/null
+++ b/src/events/commandError.ts
@@ -0,0 +1,21 @@
+import generateEmojiEmbed from "../utils/generateEmojiEmbed.js";
+
+export const event = 'commandError'
+
+export async function callback(client, interaction, error) {
+ if (interaction.replied || interaction.deferred) {
+ await interaction.followUp({embeds: [new generateEmojiEmbed()
+ .setTitle("Something went wrong")
+ .setDescription(error.message ?? error.toString())
+ .setStatus("Danger")
+ .setEmoji("CONTROL.BLOCKCROSS")
+ ], ephemeral: true})
+ } else {
+ await interaction.reply({embeds: [new generateEmojiEmbed()
+ .setTitle("Something went wrong")
+ .setDescription(error.message ?? error.toString())
+ .setStatus("Danger")
+ .setEmoji("CONTROL.BLOCKCROSS")
+ ], ephemeral: true})
+ }
+}