feat: add trading system with dedicated modules and centralize embed creation for commands
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user