【发布时间】:2020-11-08 15:14:07
【问题描述】:
我试图让我的机器人在用户加入服务器时赋予角色,但该事件不起作用。 它没有显示任何错误或任何东西,它只是不给角色。
我的代码:
@Client.event
async def on_member_join(member):
intents = discord.Intents().all()
client = commands.Bot(command_prefix = prefix, intents=intents)
role = discord.utils.get(ctx.guild.roles, name='Unverified')
await member.add_roles(role)
【问题讨论】:
标签: python discord.py