小编I_b*_*ode的帖子

使用 discord.py 允许一个命令具有多个角色

我将如何制作它以便管理员或版主可以清除 Discord 聊天?

@commands.has_role("Admin")
async def addrole(ctx, rol='member'):
    member = ctx.message.author
    role = get(member.server.roles, name=rol)
    await bot.add_roles(member, role)
Run Code Online (Sandbox Code Playgroud)

python discord.py

2
推荐指数
1
解决办法
1803
查看次数

标签 统计

discord.py ×1

python ×1