forked from syntaxbullet/AuroraBot-discord
feat: Add /sell command, enhance inventory service, and refactor student ID card generation with new constellation graphics and dynamic backgrounds.
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
import { createCommand } from "@/lib/utils";
|
||||
import { SlashCommandBuilder, EmbedBuilder, AttachmentBuilder } from "discord.js";
|
||||
import { SlashCommandBuilder, AttachmentBuilder } from "discord.js";
|
||||
import { userService } from "@/modules/user/user.service";
|
||||
import { classService } from "@/modules/class/class.service";
|
||||
import { generateStudentIdCard } from "@/graphics/studentID";
|
||||
|
||||
export const profile = createCommand({
|
||||
@@ -17,10 +16,6 @@ export const profile = createCommand({
|
||||
await interaction.deferReply();
|
||||
|
||||
const targetUser = interaction.options.getUser("user") || interaction.user;
|
||||
const targetMember = await interaction.guild?.members.fetch(targetUser.id).catch(() => null);
|
||||
const targetUserClass = await userService.getUserClass(targetUser.id);
|
||||
const classBalance = await classService.getClassBalance(targetUserClass?.id || BigInt(0));
|
||||
|
||||
const user = await userService.getOrCreateUser(targetUser.id, targetUser.username);
|
||||
|
||||
const cardBuffer = await generateStudentIdCard({
|
||||
@@ -30,7 +25,6 @@ export const profile = createCommand({
|
||||
level: user!.level || 1,
|
||||
xp: user!.xp || 0n,
|
||||
au: user!.balance || 0n,
|
||||
cu: classBalance || 0n,
|
||||
className: user!.class?.name || "D"
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user