#sob

39 messages · Page 1 of 1 (latest)

wanton lynxBOT
#

• What's your exact discord.js npm list discord.js and node node -v version?
• Post the full error stack trace, not just the top part!
• Show your code!
• Explain what exactly your issue is.
• Not a discord.js issue? Check out #useful-servers.

analog comet
#

What could I be doing wrong?

#

I do have a feeling there is something wrong on the Developer portal maybe

empty epoch
#

v12 is not supported anymore, upgrade to v14

#

and also dont deploy your commands on every start

#

and never use ChatGPT as it uses outdated information. djs is not for beginners, i recommend cheking out #resources to learn the basics of js

analog comet
#

Okay bet. Thank you!

analog comet
#

It should show the options right?

#

like this

#

but it does not show up for me;

boreal imp
#

redeploy your commands

#

probably added the string option after you deployed the first command

analog comet
#

okay i gotchu

#

thank you

#

yeah it works now thanks a lot

boreal imp
#

yay 😁

analog comet
#

The user.flags property are displayed as plain text instead of custom emojis.
Is there a way to display custom emoji badges instead of plain text for Discord user badges in a bot? Can custom emoji IDs be used to replace the default plain text badges provided by the user.flags property?

Here is an example of the code I have tried:
relevant code:

const badgeEmojis = {
  brilliance: ':brilliance:',
  bravery: ':bravery:'
};

const badges = user.flags?.toArray().map(flag => {
  const badgeEmoji = badgeEmojis[flag];
  return badgeEmoji ? badgeEmoji : flag;
});

embed code:

const embed = {
      title: `${user.username}'s Information`,
      thumbnail: {
        url: user.displayAvatarURL({ dynamic: true })
      },
      fields: [
        { name: 'User ID', value: user.id },
        { name: 'Creation Date', value: `<t:${Math.floor(user.createdTimestamp / 1000)}:R>`, inline: true },
        { name: 'Joining Date', value: `<t:${Math.floor(member.joinedTimestamp / 1000)}:R>`, inline: true },
        { name: 'Roles', value: member.roles.cache.map(role => role.toString()).join(' ') },
        { name: 'Badges', value: badges?.join(' ') || 'None' }
      ]
    };
 
#

How can I display custom emoji badges instead of plain text for Discord user badges in a bot?

empty epoch
#

add custom emotes and filter on the badges

analog comet
#

could you please
elaborate?

empty epoch
#

add the custom emotes in your server and based on the array .flags returns map them to the right emote

analog comet
#

i gotchu

#

okay it works now thankss

analog comet
#

the commands are showing up twice why is that happening?

#

it is happening for all commands

#

commands showing up twice

jolly coralBOT
#

If you have duplicate commands on your server, you registered both global and guild commands.

You can remove the duplicates by resetting either the global or guild commands

  • Resetting global commands: rest.put(Routes.applicationCommands(clientId), { body: [] })
  • Resetting guild commands: rest.put(Routes.applicationGuildCommands(clientId, guildId), { body: [] })
analog comet
#

thankss

analog comet
#

Can I incorporate prefix commands besides slash commands? if so how do you do that?

#

incorporate prefix commands besides slash commands

carmine shoal
#

Just listen to messageCreate

analog comet
#

oh yeah i realised thanks lmfaooo

analog comet
#

Buttons not working

#

How can I implement a dynamic button system in my Discord bot that allows users to navigate through a collection of memes fetched from an external API?

#
try {
      if (memes.length === 0 || currentIndex === -1 || currentIndex === memes.length - 1) {
        const response = await axios.get('https://api.imgflip.com/get_memes');
        memes = response.data.data.memes;
        currentIndex = 0;
      } else {
        currentIndex++;
      }
analog comet
#

How to implement a dynamic button system for navigation

analog comet
#

?

analog comet
#

sob