Trying to register commands: DiscordAPIError[50001]: Missing Access(正在尝试注册命令:DiscordAPIError[50001]:缺少访问)
问题描述
紧随其后;https://discordjs.guide/creating-your-bot/creating-commands.html#command-deployment-script
我正在尝试运行node deploy-commands.js将我的命令注册到单个行会,但收到以下错误。
C:Users\\hello-world-discord-bot>node deploy-commands.js
DiscordAPIError[50001]: Missing Access
at SequentialHandler.runRequest (C:\\hello-world-discord-bot
ode_modules@discordjs
estdistlibhandlersSequentialHandler.js:198:23)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at async SequentialHandler.queueRequest (C:\\hello-world-discord-bot
ode_modules@discordjs
estdistlibhandlersSequentialHandler.js:99:20)
at async C:\\hello-world-discord-botdeploy-commands.js:17:3 {
rawError: { message: 'Missing Access', code: 50001 },
code: 50001,
status: 403,
method: 'put',
url: 'https://discord.com/api/v9/applications/877359061669118003/guilds/447125601757691915/commands'
}
我已经尝试删除机器人,并在重新添加之前通过开发人员Web控制台重新授予其权限。我检查并重新添加了tokenclientId和guildId,每次都得到相同的错误消息。我可以看到它没有获得访问权限,但我不知道还会从哪里授予访问权限。
我的deploy-commands.js如下所示:
{
"clientId": "123456789012345678",
"guildId": "876543210987654321",
"token": "my-token-goes-here"
}
推荐答案
您是否确保在不一致开发人员门户中您的机器人的OAuth2设置的作用域部分中选中了"Applications.Commands"作用域?
这篇关于正在尝试注册命令:DiscordAPIError[50001]:缺少访问的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:正在尝试注册命令:DiscordAPIError[50001]:缺少访问
基础教程推荐
- npm start 错误与 create-react-app 2022-01-01
- 检查 HTML5 拖放文件类型 2022-01-01
- Fabric JS绘制具有活动形状的多边形 2022-01-01
- 在 contenteditable 中精确拖放 2022-01-01
- 原生拖动事件后如何获取 mouseup 事件? 2022-01-01
- Bootstrap 模态出现在背景下 2022-01-01
- 即使用户允许,Gmail 也会隐藏外部电子邮件图片 2022-01-01
- fetch 是否支持原生多文件上传? 2022-01-01
- Bokeh Div文本对齐 2022-01-01
- 如何添加到目前为止的天数? 2022-01-01
