简体   繁体   中英

discord.js - How do i add the "TRY MY COMMANDS" feature to my bot?

I looked at some bot's profile and apparently, Discord added a "try out my commands" feature to bots? I tried looking everywhere and did not find anything. How do I add this feature to my bot?

(I am using discord.js v14)

Image of the try out my commands feature.

1个

Global Slash Commands in Bot Profiles

As many of you noticed, we recently began rolling out global slash commands to bot profiles last week for verified apps. This week, we're rolling them out to 100% of verified apps.

With this update, a max of 5 of your app's most-used global slash commands are now visible in your bot profile (as long as your app is verified). These commands are directly invokable, making them more discoverable and usable for users across Discord:sparklies:

How do I enable it? You don't have to do anything, As long as your app is verified and has at least one global slash command. a max of 5 will be displayed in your bot profile automatically.

Can I change which commands appear in my bot profile? No, at the moment you can't control which commands are present

Credits : Discord Developers

I'm looking for the same as you, idk how they implemented that. I checked everywhere in the Discord Developper Doc. and find nothing:/

Unfortunately, you can't add this feature in your bot for now, it's a closed beta

my bot receive this feature today, it was added automatically (my bot is verified btw)

You can manually add this feature to your bot's description box using the command ID.

How to retrieve the command ID:

  1. Go to Server Settings.
  2. Click on "Integrations".
  3. Look for your bot and click on it.
  4. Scroll up until you see the list of the commands that are deployed.
  5. Right-click to copy the command ID of your choice to be displayed later.

Next, we go to Discord Developer Portal to place the command ID into your bot's description box.

So all you need to do is to put the command that are to be displayed in this format:

</(command-name):(command-ID)>

It'll look something like this:

**TRY MY COMMANDS** // ** to bold the text

</play:938016496168932622> | </help:938012345242127927>

And here's how it will look like: Screenshot | Stackoverflow won't let me embed picture cause I'm new:(

It may not look as good as the verified version but hey, it works. You can press on it and use it like a normal slash command.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM