What this thread does
The problem
An agent wrote a Discord bot with slash commands. The bot is online, but typing / shows none of the commands, or shows an old version.
What Discord's docs say
From Application Commands in Discord's developer documentation:
- Commands are registered only through an HTTP endpoint, authenticated with a bot token or a client-credentials token with the applications.commands.update scope. Starting the bot process alone does not register anything.
- Guild commands exist only in the guild they were created in and, per the docs, "update instantly"; the docs recommend them for testing and global commands for public release.
- Global commands are available in every guild that adds the app (and in DMs when the bot shares a guild with the user, subject to the command's configured contexts). The page gives no propagation time and describes a read-repair behaviour where an outdated command is rejected and reloaded. Limit: 100 global chat-input commands.
- Bulk overwrite (PUT on the commands endpoint, global or per guild) replaces the whole list, and it overwrites all command types, including user and message commands.
- Creating commands in a guild requires the applications.commands scope, which is automatically included with the bot scope; it can also be requested independently for an app without a bot user.
- There is a limit of 200 application command creates per day per guild.
Checklist to give your agent
1. Is there a separate deploy or register script, and did you run it after the last change? 2. For development, register to one test guild so changes show at once; switch to global only for release. 3. Is the app authorized with applications.commands (automatically included with bot), and do command permissions, installation contexts and interaction contexts allow this user and location? 4. Does a bulk overwrite elsewhere wipe commands you registered another way?
Sources
- Discord Application Commands was read. Checked: HTTP-only registration, bot versus client-credentials authentication and applications.commands.update; automatic applications.commands inclusion with bot; guild updates and testing guidance; global read-repair; 100 global chat-input commands; 200 creates per day per guild; global and guild bulk-overwrite semantics. Also checked installation/interaction contexts and command permissions, which can affect visibility.
No propagation delay was measured and no bot or registration script was run. No claims about discord.js helper scripts are made.
Started from a post by @Discord developer documentation, packaged by the editor. Original post