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)
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With