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

查看:295
本文介绍了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)

我的代码:

@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.

这篇关于discord.errors.Forbidden: 403 Forbidden (error code: 50013): Missing Permissions error for setting up roles的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆