feat: add trading system with dedicated modules and centralize embed creation for commands

This commit is contained in:
syntaxbullet
2025-12-13 12:43:27 +01:00
parent 5f4efd372f
commit 421bb26ceb
13 changed files with 667 additions and 41 deletions

View File

@@ -1,6 +1,7 @@
import { createCommand } from "@/lib/utils";
import { SlashCommandBuilder, EmbedBuilder } from "discord.js";
import { questService } from "@/modules/quest/quest.service";
import { createWarningEmbed } from "@lib/embeds";
export const quests = createCommand({
data: new SlashCommandBuilder()
@@ -12,12 +13,7 @@ export const quests = createCommand({
const userQuests = await questService.getUserQuests(interaction.user.id);
if (!userQuests || userQuests.length === 0) {
const embed = new EmbedBuilder()
.setTitle("📜 Quest Log")
.setDescription("You have no active quests.")
.setColor("Grey");
await interaction.editReply({ embeds: [embed] });
await interaction.editReply({ embeds: [createWarningEmbed("You have no active quests.", "Quest Log")] });
return;
}