Missing Access

I have an error in my bot. I already invited the bot with bot and applications.commands and it doesn't work, and everything is correct (ClientId, GuildId, token)
4 Replies
d.js toolkit
d.js toolkit13mo ago
- What's your exact discord.js npm list discord.js and node node -v version? - Not a discord.js issue? Check out #other-js-ts. - Consider reading #how-to-get-help to improve your question! - Explain what exactly your issue is. - Post the full error stack trace, not just the top part! - Show your code! - Issue solved? Press the button! - Marked as resolved by staff
treble/luna
treble/luna13mo ago
read the bullet points again
Arangod
ArangodOP13mo ago
- DJS V: @14.14.1 // Node: v20.3.1 - Its discord.js issue
DiscordAPIError[50001]: Missing Access
at handleErrors (/home/runner/Xyla-DiscordJS-BOT/node_modules/@discordjs/rest/dist/index.js:722:13)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async SequentialHandler.runRequest (/home/runner/Xyla-DiscordJS-BOT/node_modules/@discordjs/rest/dist/index.js:1120:23)
at async SequentialHandler.queueRequest (/home/runner/Xyla-DiscordJS-BOT/node_modules/@discordjs/rest/dist/index.js:953:14)
at async _REST.request (/home/runner/Xyla-DiscordJS-BOT/node_modules/@discordjs/rest/dist/index.js:1266:22)
at async GuildApplicationCommandManager.fetch (/home/runner/Xyla-DiscordJS-BOT/node_modules/discord.js/src/managers/ApplicationCommandManager.js:117:18)
at async module.exports (/home/runner/Xyla-DiscordJS-BOT/src/utils/getApplicationCommands.js:11:2)
at async module.exports (/home/runner/Xyla-DiscordJS-BOT/src/events/ready/registerCommands.js:10:31)
at async Client.<anonymous> (/home/runner/Xyla-DiscordJS-BOT/src/handlers/eventHandler.js:16:4) {
requestBody: { files: undefined, json: undefined },
rawError: { message: 'Missing Access', code: 50001 },
code: 50001,
status: 403,
method: 'GET',
url: 'https://discord.com/api/v10/applications/1176151387697061908/guilds/1036765961321189397/commands'
}
DiscordAPIError[50001]: Missing Access
at handleErrors (/home/runner/Xyla-DiscordJS-BOT/node_modules/@discordjs/rest/dist/index.js:722:13)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async SequentialHandler.runRequest (/home/runner/Xyla-DiscordJS-BOT/node_modules/@discordjs/rest/dist/index.js:1120:23)
at async SequentialHandler.queueRequest (/home/runner/Xyla-DiscordJS-BOT/node_modules/@discordjs/rest/dist/index.js:953:14)
at async _REST.request (/home/runner/Xyla-DiscordJS-BOT/node_modules/@discordjs/rest/dist/index.js:1266:22)
at async GuildApplicationCommandManager.fetch (/home/runner/Xyla-DiscordJS-BOT/node_modules/discord.js/src/managers/ApplicationCommandManager.js:117:18)
at async module.exports (/home/runner/Xyla-DiscordJS-BOT/src/utils/getApplicationCommands.js:11:2)
at async module.exports (/home/runner/Xyla-DiscordJS-BOT/src/events/ready/registerCommands.js:10:31)
at async Client.<anonymous> (/home/runner/Xyla-DiscordJS-BOT/src/handlers/eventHandler.js:16:4) {
requestBody: { files: undefined, json: undefined },
rawError: { message: 'Missing Access', code: 50001 },
code: 50001,
status: 403,
method: 'GET',
url: 'https://discord.com/api/v10/applications/1176151387697061908/guilds/1036765961321189397/commands'
}
I have many files, it would be a lot of code
treble/luna
treble/luna13mo ago
You're trying to fetch commands from a guild the bot isnt in
Want results from more Discord servers?
Add your server