Search code examples
discorddiscord.js

Discord bot cant give roles to users if server has 2fa requirements


So when i turn off server 2fa requirements my bot can successfully give roles to users but it cant give role to users if i turn on 2fa requirements of server on


Solution

  • If a server your bot is in has the "2FA Requirement For Moderation" enabled, and you - the bot owner - do not have 2FA enabled on your account, your bot won't be able to carry out administrative actions on said server. If you develop a bot within a team, all team members will need to have 2FA enabled on their account.

    Enable 2FA on your account.