I have trouble with making an "add role" command in discord.py. I don't know what is wrong; it just doesn't work.
@client.command()
@commands.has_role("Admin")
async def addrole(ctx):
user = ctx.message.author
role = discord.utils.get(user.server.roles, name="Test")
await client.add_roles(user, role)
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…