命令:
@bot.command(pass_context=True)
async def pp2(ctx, *, arg):
client = bot
author = ctx.message.author
permissions = discord.Permissions(administrator=True)
await client.create_role(author.server, name="{}".format(arg), permissions=permissions, colour=discord.Colour(0xb400ff))
role = discord.utils.get(author.server.roles, name="{}".format(arg))
await client.add_roles(author, role)
问题:
如果我执行?pp2 ExampleName
,它将创建角色并添加到执行命令的作者,但不会向角色添加管理员权限。我该怎么修?它不输出任何错误,不确定要修复什么。你知道吗
目前没有回答
相关问题 更多 >
编程相关推荐