bot
bot copied to clipboard
[BUG] DiscordAPIError[50013]: Missing Permissions
Is there an existing issue for this?
- [X] I have searched the existing issues
Current Behavior
01/07/23 23:37:42 [ERROR] DiscordAPIError[50013]: Missing Permissions
at handleErrors (/home/container/node_modules/.pnpm/@[email protected]/node_modules/@discordjs/rest/dist/index.js:640:13)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async SequentialHandler.runRequest (/home/container/node_modules/.pnpm/@[email protected]/node_modules/@discordjs/rest/dist/index.js:1021:23)
at async SequentialHandler.queueRequest (/home/container/node_modules/.pnpm/@[email protected]/node_modules/@discordjs/rest/dist/index.js:862:14)
at async REST.request (/home/container/node_modules/.pnpm/@[email protected]/node_modules/@discordjs/rest/dist/index.js:1387:22)
at async Guild.fetchAuditLogs (/home/container/node_modules/.pnpm/[email protected][email protected][email protected]/node_modules/discord.js/src/structures/Guild.js:759:18)
at async module.exports.run (/home/container/src/listeners/client/messageDelete.js:33:21) {
requestBody: { files: undefined, json: undefined },
**rawError: { message: 'Missing Permissions', code: 50013 },**
code: 50013,
status: 403,
method: 'GET',
url: 'https://discord.com/api/v10/guilds//audit-logs?limit=1&action_type=72'
seems like a race condition? Does not always happen and things still work.
Expected Behavior
No response
Steps To Reproduce
No response
Environment
- OS:
- Node:
- NPM:
- Bot:
Anything else?
No response
Are you sure this isn't an issue with the permissions you have assigned the bot in your Discord server? If not please give steps to reproduce
It happens intermittent, hence why I think race condition. Otherwise it works so perms are there
https://discordjs.guide/popular-topics/permissions-extended.html#missing-permissions still have no idea