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

@@ -3,6 +3,7 @@ import { SlashCommandBuilder, EmbedBuilder } from "discord.js";
import { DrizzleClient } from "@/lib/DrizzleClient";
import { users } from "@/db/schema";
import { desc } from "drizzle-orm";
import { createWarningEmbed } from "@lib/embeds";
export const leaderboard = createCommand({
data: new SlashCommandBuilder()
@@ -29,7 +30,7 @@ export const leaderboard = createCommand({
});
if (leaders.length === 0) {
await interaction.editReply({ content: "❌ No users found." });
await interaction.editReply({ embeds: [createWarningEmbed("No users found.", "Leaderboard")] });
return;
}