forked from syntaxbullet/AuroraBot-discord
feat: add trading system with dedicated modules and centralize embed creation for commands
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import { createCommand } from "@lib/utils";
|
||||
import { KyokoClient } from "@lib/KyokoClient";
|
||||
import { SlashCommandBuilder, EmbedBuilder, PermissionFlagsBits } from "discord.js";
|
||||
import { createErrorEmbed } from "@lib/embeds";
|
||||
|
||||
export const reload = createCommand({
|
||||
data: new SlashCommandBuilder()
|
||||
@@ -23,12 +24,7 @@ export const reload = createCommand({
|
||||
await interaction.editReply({ embeds: [embed] });
|
||||
} catch (error) {
|
||||
console.error(error);
|
||||
const embed = new EmbedBuilder()
|
||||
.setTitle("❌ Reload Failed")
|
||||
.setDescription("An error occurred while reloading commands. Check console for details.")
|
||||
.setColor("Red");
|
||||
|
||||
await interaction.editReply({ embeds: [embed] });
|
||||
await interaction.editReply({ embeds: [createErrorEmbed("An error occurred while reloading commands. Check console for details.", "Reload Failed")] });
|
||||
}
|
||||
}
|
||||
});
|
||||
Reference in New Issue
Block a user