haxz
haxz
DIAdiscord.js - Imagine an app
Created by haxz on 1/3/2025 in #djs-questions
badges
Hello, I'm doing a command where I pull the badges from the user's profile and I'm trying to pull nitro, but I can't pull it, the code is this const badgeEmojis = { NITRO: ':z_nitro:' }; const badges = user.flags ? user.flags.toArray() : []; const isNitro = user.premiumType && user.premiumType > 0; // Verifica se o usuário possui Nitro if (isNitro) badges.push('NITRO'); const badgesWithEmojis = badges.map(badge => badgeEmojis[badge] || badge).join(' '); message.reply(${badgesWithEmojis}); but I can't get it to return in any way, is the name "NITRO" correct? Is it spelled differently or something?
16 replies