I've been trying to make slash mands 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 mand 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.
I've been trying to make slash mands 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 mand 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.
Share Improve this question edited Mar 10, 2023 at 9:59 asked Nov 28, 2021 at 23:13 user17535184user17535184 3- Please supply a minimum reproductible example, showing the code you have tried. We cannot help you fix a problem if we can't see the code – HPringles Commented Nov 28, 2021 at 23:15
-
1
Enable
application.mands
in your Discord Developer Portal – Elitezen Commented Nov 29, 2021 at 0:14 - 2 Does this answer your question? Can't registry slash mands. Getting missing access error – MrMythical Commented Nov 29, 2021 at 0:17
3 Answers
Reset to default 5When your bot is added to a server via an OAuth2 link it requires the application.mands
to be able to register slash mands.
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
EDIT: Solved, apparently I just removed some permissions and now it works... I have no clue why it works this way, but ok.
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.mands option also needs to be selected, see captured screenshot in the following link