From 93679f8828c804d81ed200c44f3a0f5d7d82a2f2 Mon Sep 17 00:00:00 2001 From: VinceC <33974776+VinceC3@users.noreply.github.com> Date: Sat, 4 Jan 2025 11:22:29 -0600 Subject: [PATCH] summary small update for bot output --- src/commands/CommandHandler.js | 11 +++++++++-- src/utils/embedBuilders.js | 11 +++++++++-- 2 files changed, 18 insertions(+), 4 deletions(-) diff --git a/src/commands/CommandHandler.js b/src/commands/CommandHandler.js index 791f5cb..85cf67c 100644 --- a/src/commands/CommandHandler.js +++ b/src/commands/CommandHandler.js @@ -211,8 +211,7 @@ class CommandHandler { const basicEmbed = new EmbedBuilder() .setTitle(`User: ${playerData.username || 'Unknown'}`) .setDescription(playerData.profile?.bio || 'No bio available') - .setColor('#0099ff') - .setImage('https://www.vrbattles.gg/assets/images/Qubi/vrwearcubesatad.png'); + .setColor('#0099ff'); // Add avatar if available if (playerData.profile?.avatar) { @@ -221,6 +220,14 @@ class CommandHandler { ); } + // Add badge image if available + if (playerData.profile?.current_level_badge) { + const badgeImageUrl = this.playerService.getBadgeImageUrl(playerData.profile.current_level_badge); + basicEmbed.setImage(badgeImageUrl); + } else { + basicEmbed.setImage('https://www.vrbattles.gg/assets/images/Qubi/vrwearcubesatad.png'); + } + // Add basic profile fields const profileFields = []; const profile = playerData.profile || {}; diff --git a/src/utils/embedBuilders.js b/src/utils/embedBuilders.js index 56f3398..09220e4 100644 --- a/src/utils/embedBuilders.js +++ b/src/utils/embedBuilders.js @@ -6,8 +6,7 @@ class EmbedBuilders { const embed = new EmbedBuilder() .setTitle(`User: ${playerData.username || 'Unknown'}`) .setDescription(profile.bio || 'No bio available') - .setColor('#0099ff') - .setImage('https://www.vrbattles.gg/assets/images/Qubi/vrwearcubesatad.png'); + .setColor('#0099ff'); // Add thumbnail (avatar) if (profile.avatar) { @@ -16,6 +15,14 @@ class EmbedBuilders { ); } + // Add badge image if available + if (profile.current_level_badge) { + const badgeImageUrl = playerService.getBadgeImageUrl(profile.current_level_badge); + embed.setImage(badgeImageUrl); + } else { + embed.setImage('https://www.vrbattles.gg/assets/images/Qubi/vrwearcubesatad.png'); + } + // Add profile fields const profileFields = []; if (profile.country) profileFields.push({ name: 'Country', value: profile.country, inline: true });