Reputation:
I've been trying to make slash commands in discord.js for a discord bot (a personal project to practice coding) and I've been getting this error, with no success in trying to solve it... I've already given OAuth2 access to the command creation, so I have no idea what I'm doing wrong.
EDIT: Solved, apparently I just removed some permissions and now it works... I have no clue why it works this way, but ok.
Upvotes: 1
Views: 7853
Reputation: 1
Anyone encountering this problem the solution is pretty simple.
It DOES NOT depend on the permissions that have been provided to the bot when creating the OAuth2 link to invite the bot. It is not enough to just select the bot option, the applications.commands option also needs to be selected, see captured screenshot in the following link
Upvotes: -1
Reputation:
EDIT: Solved, apparently I just removed some permissions and now it works... I have no clue why it works this way, but ok.
Upvotes: 1
Reputation: 1353
When your bot is added to a server via an OAuth2 link it requires the application.commands
to be able to register slash commands.
Even if you update the scopes in your link the bot has to be removed and then re-added back to the server with the new link for the changes to take effect.
Learn more about discord OAauth2 scopes here
Upvotes: 5