feat: Add user existence checks to economy commands and refactor trade service to expose sessions for testing.

This commit is contained in:
syntaxbullet
2026-01-05 12:57:22 +01:00
parent 599684cde8
commit d0b4cb80de
7 changed files with 48 additions and 36 deletions

View File

@@ -23,6 +23,8 @@ export const balance = createCommand({
const user = await userService.getOrCreateUser(targetUser.id, targetUser.username);
if (!user) throw new Error("Failed to retrieve user data.");
const embed = createBaseEmbed(undefined, `**Balance**: ${user.balance || 0n} AU`, "Yellow")
.setAuthor({ name: targetUser.username, iconURL: targetUser.displayAvatarURL() });