forked from syntaxbullet/AuroraBot-discord
feat: Add user existence checks to economy commands and refactor trade service to expose sessions for testing.
This commit is contained in:
@@ -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() });
|
||||
|
||||
|
||||
Reference in New Issue
Block a user