Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

discord.errors.Forbidden: 403 Forbidden (error code: 50013): Missing Permissions error for setting up roles

I am trying to setup roles for my discord bot but keep getting this error:

discord.errors.Forbidden: 403 Forbidden (error code: 50013)

My Code:

@client.event
async def on_member_join(member):
   guild = client.get_guild(688568885968109756)
   role = discord.utils.get(member.guild.roles, id=689916456871133311)
   await member.add_roles(role)
like image 490
Darrow Hartman Avatar asked Dec 17 '22 13:12

Darrow Hartman


1 Answers

If your bot have enough permission, Then it's coming due to the hierarchy of roles. Check-in server settings for the hierarchy.

For changing the hierarchy, you can move the roles up down in the settings.

like image 88
Bhola Kumar Avatar answered Jan 03 '23 10:01

Bhola Kumar