I have a discord bot that adds a role to a user when under certain conditions. It's been working for other discord servers but on this specific server I always get the error:
DiscordAPIError[50001]: Missing Access
I'm using discord.js and I've confirmed the following assumptions:
I've also tried to use the Discord Rest API instead but I get the same error.
Is there anything else I could check that might not allow me to assign a role to a user?
Ok, found the issue. This Discord Server requires Two-Factor Authentication and so for the bot to work, the Discord account associated with the Discord App created for the bot needed also to have 2FA enabled. As soon as 2FA was enabled for the bot developer on Discord, it started working as expected.