discord/discord-api-docs

Slash commands not appearing on new servers

Closed this issue · 2 comments

aaxc commented

My bots slash commands do not appear on new servers anymore. It has been multiple hours. I have tried rejoining the bot. I have also tried ctrl+R. Even restarted the bot. Nothing.

The commands work fine on other servers, where the bot has been for multiple years, and on some newer ones, but recently I have noticed high bot removal from new servers and found out, the commands do not appear.

I have created my own server to test this and the commands seem to not appear even after 24h!

The commands have basic implementation, nothing fancy, as far as I know:

module.exports.build = async (bot) => {
  // Make commands
  await getApp(bot).commands.post({
    "data": { ... }
  });
};

// Fetch bot
const getApp = (bot) => {
  const app = bot.api.applications(bot.user.id);
  return app;
}

I have implemented the commands almost as soon as thay became available and have not changed anything since then.
Have there been some code-breaking changes that I have to implement to push the commands to new servers? Or what is the matter here?

aaxc commented

Ok, I found the answer. Apparently to invite link has to be modified. Instead of scope=bot it now needs to be scope=bot%20applications.commands.

No idea why this is not a setting in the developer panel for bots.

it is in the oauth2 url generator, and it is documented

E8D08785-DCFC-46B1-8834-BAC9ACB1C356

8CA00FBE-C7BE-42FC-BB63-6F2BC1F92D69