feat: implement basic balance command

This commit is contained in:
syntaxbullet
2025-12-03 12:13:07 +01:00
parent 25c7ba46f0
commit 0d05623076
2 changed files with 25 additions and 0 deletions

View File

@@ -0,0 +1,13 @@
import type { Command } from "@lib/types";
import { getUserBalance } from "@/modules/economy/economy.service";
import { SlashCommandBuilder, EmbedBuilder } from "discord.js";
export const balance: Command = {
data: new SlashCommandBuilder().setName("balance").setDescription("Check your balance"),
execute: async (interaction) => {
const balance = await getUserBalance(interaction.user.id) || 0;
const embed = new EmbedBuilder().setDescription(`Your balance is ${balance}`);
await interaction.reply({ embeds: [embed] });
}
};