#Slash Command does not appear

1 messages · Page 1 of 1 (latest)

eager bayBOT
desert tendon
#

!!whynoslash

slate warrenBOT
#

Most common issues

  1. You didn't invite the bot to your guild with the application.commands oauth enabled. Go to the developer portal, make an invite with both bot and applications.commands enabled, and re-authorize your bot for your server.

  2. You're using global commands and probably haven't waited (up to) an hour for them to appear.

  3. You're adding the cogs with slash commands in them too late inside of your bot. You either need to add them before on_connect is called (preferably before the bot is even started), or run the global and/or guild sync methods manually.

Lesser common issues

  1. Discord gets weird sometimes and doesn't refresh available commands. Try restarting your Discord client.

  2. You're overriding on_connect, which adds the application commands to bot/client (including ones inside cogs) and rolls out global commands. Either stop overriding it, or add bot.add_all_application_commands() and await bot.sync_application_commands() to it.

  3. You're overriding on_guild_available, which rolls out commands to guilds. Either stop overriding it, or add the following codeblock to it:

try:
    await bot.sync_application_commands(guild_id=guild.id)
except Forbidden:
    pass
hollow sphinx