Question

One question: How do you get a slash command to appear in the bot's profile? That is, below its description.
9 Replies
d.js toolkit
d.js toolkit5mo ago
- 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!
Seren_Modz 21
Seren_Modz 215mo ago
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
Kexour
KexourOP5mo ago
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.
Seren_Modz 21
Seren_Modz 215mo ago
you'll want to use integration types to hide the command. context only limits where it can be used, not where its visible
d.js docs
d.js docs5mo ago
:method: SlashCommandBuilder#setIntegrationTypes() discord.js@14.21.0 Sets the integration types of this command.
Seren_Modz 21
Seren_Modz 215mo ago
No description
Kexour
KexourOP5mo ago
InteractionContextType .setContexts([InteractionContextType.Guild]) That's how I have it
Samtino
Samtino5mo ago
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 SlashCommandBuilder
Kexour
KexourOP5mo ago
Could you please provide an example? Otherwise, I now get "unknown integration."

Did you find this page helpful?