You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

DiscordAPIError[50001]权限缺失问题求助

DiscordAPIError[50001]: Missing Access 问题求助

我查阅了很多关于该错误的帖子,但帮助有限。以下是我的错误信息:

DiscordAPIError[50001]: Missing Access at handleErrors (C:\Users\Administrator\Desktop\BOTS\masora_bots\masora_bot\node_modules\@discordjs\rest\dist\index.js:727:13) at process.processTicksAndRejections (node:internal/process/task_queues:105:5) at async SequentialHandler.runRequest (C:\Users\Administrator\Desktop\BOTS\masora_bots\masora_bot\node_modules\@discordjs\rest\dist\index.js:1128:23) at async SequentialHandler.queueRequest (C:\Users\Administrator\Desktop\BOTS\masora_bots\masora_bot\node_modules\@discordjs\rest\dist\index.js:959:14) at async _REST.request (C:\Users\Administrator\Desktop\BOTS\masora_bots\masora_bot\node_modules\@discordjs\rest\dist\index.js:1272:22) at async setCommands (C:\Users\Administrator\Desktop\BOTS\masora_bots\masora_bot\index.js:76:5) { requestBody: { files: undefined, json: Collection(19) [Map] { 'verifizierung' => [Object], 'regelwerk' => [Object], 'dc-regelwerk' => [Object], 'invites' => [Object], 'spenden' => [Object], 'frak-warn' => [Object], 'frak-offiziell' => [Object], 'team-warn' => [Object], 'team-uprank' => [Object], 'team-derank' => [Object], 'team-beitritt' => [Object], 'team-kick' => [Object], 'warnung' => [Object], 'team-announce' => [Object], 'umfrage' => [Object], 'team-umfrage' => [Object], 'frak-auflosung' => [Object], 'frak-liste' => [Object], 'changelog' => [Object] } }, rawError: { message: 'Missing Access', code: 50001 }, code: 50001, status: 403, method: 'PUT', url: 'https://discord.com/api/v9/applications/1296796680301187152/guilds/1296796680301187152/commands' }

我的代码如下:

async function setCommands() {
    const rest = new discord.REST({ version: '9' }).setToken('here_goes_my_token');
    await rest.put(discord.Routes.applicationGuildCommands(client.user.id, 'Client_ID??'), {
        body: commands,
    });
}

client.on('ready', async (readyClient) => {
    setCommands();
    updateActivity(readyClient);
    console.log(chalk.italic.hex('#6600FF').italic('[Lightning-System]'), chalk.italic.hex('#ffffff')('- [by Brxtty & Stumzey] |'), chalk.bold.hex('#00BFFF')('The Bot started successfully.'), chalk.reset());
});

我已确认AuthO区域的application.commands权限已勾选,但仍出现该错误,请求协助解决。


内容的提问来源于stack exchange,提问作者Brxtty Potter

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.06.16 05:43:19