[Solved] Permission error for discord.py bot despite having admin permissions


I have the correct answer for that. When inviting a bot to any server, there is special 2Oauth link for inviting the bot. Now, this is something you need to worry about.

There are two things you need to actually do to complete what you want to do.

  1. Assigning the Bot role proper permissions using the correct invite link.
    For example:
    This link is a general link that is generated when invite is created for the bot.
https://discord.com/oauth2/authorize?client_id=xxxxxxxxxxxxxxxxxx&permissions=8&scope=bot

Now the permission in the link is set to 8 which only provides you with the Administrator permission and nothing else.

But if you change that permission value in the link then you can get every single permission you want.

https://discord.com/oauth2/authorize?client_id=xxxxxxxxxxxxxxxxxx&permissions=2113928959&scope=bot

The permission integer: 2113928959 gives all the permissions to be bot. So when you invite the bot using a link, make sure you change that integer.

  1. Bot Role has to be at the top.

If you are using your bot to assign roles, I would prefer to keep it at the top. This is because whenever you want to add some role to someone, it would be easy. You won’t have to move it up and down again and again. Keeping it on the top will allow is to add any role (role shouldn’t be a role of any Bot) to any member you want, using the bot.

So move the Bot role to the top of the server role list. Else you can just place it above the role you want the bot to add to another member.

Thank You! 😀

2

solved Permission error for discord.py bot despite having admin permissions