Question
One question: How do you get a slash command to appear in the bot's profile? That is, below its description.
9 Replies
- What's your exact discord.js
npm list discord.js and node node -v version?
- Not a discord.js issue? Check out #other-js-ts.
- Consider reading #how-to-get-help to improve your question!
- Explain what exactly your issue is.
- Post the full error stack trace, not just the top part!
- Show your code!
- Issue solved? Press the button!the bot has to verified and used regularly, then discord will populate it automatically
however, we unfortunately don't have any control over this and is dependent on discord populating it for us
Ok, another question, I used .setContext in a slash command so that it is only available on servers, but they appear on servers where the bot is not using that command.
you'll want to use integration types to hide the command. context only limits where it can be used, not where its visible
:method: SlashCommandBuilder#setIntegrationTypes()
discord.js@14.21.0
Sets the integration types of this command.
InteractionContextType
.setContexts([InteractionContextType.Guild])
That's how I have it
Context type simply restricts a command to either guilds or DMs...integration type limits to how the bot is installed (to a server or to a user)
If you want to limit it to only where the bot is installed, use integrationType
Also, you do
.setContext() and .setIntegrationType() on SlashCommandBuilderCould you please provide an example? Otherwise, I now get "unknown integration."