feat: Initialize database and restructure application source code.
This commit is contained in:
13
src/commands/economy/balance.ts
Normal file
13
src/commands/economy/balance.ts
Normal file
@@ -0,0 +1,13 @@
|
||||
import { createCommand } from "@lib/utils";
|
||||
import { getUserBalance } from "@/modules/economy/economy.service";
|
||||
import { SlashCommandBuilder, EmbedBuilder } from "discord.js";
|
||||
|
||||
export const balance = createCommand({
|
||||
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] });
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user