最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - discord.js error 50001: Missing Access while creating slash commands - Stack Overflow

programmeradmin5浏览0评论

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
Add a ment  | 

3 Answers 3

Reset to default 5

When 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

发布评论

评论列表(0)

  1. 暂无评论