jonathonor / syncBot

A bot that syncs roles between multiple discord servers.
https://www.jonsbots.com/syncBot
30 stars 16 forks source link

Bot crashes if it lacks permission to assign a role on target server(s) #23

Open AlexJFox opened 1 year ago

AlexJFox commented 1 year ago

DiscordAPIError[50013]: Missing Permissions at SequentialHandler.runRequest (/home/container/node_modules/@discordjs/rest/dist/index.js:933:15) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) at async SequentialHandler.queueRequest (/home/container/node_modules/@discordjs/rest/dist/index.js:712:14) at async REST.request (/home/container/node_modules/@discordjs/rest/dist/index.js:1321:22) at async GuildMemberRoleManager.add (/home/container/node_modules/discord.js/src/managers/GuildMemberRoleManager.js:131:7) { rawError: { message: 'Missing Permissions', code: 50013 }, code: 50013, status: 403, method: 'PUT', url: 'https://discord.com/api/v10/guilds/1067429100723118141/members/97026170465316864/roles/1067429100836376698', requestBody: { files: undefined, json: undefined } }

jonathonor commented 1 year ago

Have you moved the bot role higher than the roles it is trying to assign?