discord.py 带表情的角色命令

discord.py role command with emote

我有一个带有表情的角色, Staff,我尝试使用 :8ball: Staff Staff 但命令不起作用 命令有什么方法可以与当前角色一起使用吗?因为管理员不想更改表情

@client.command()
@commands.has_role(' Staff')
async def test(ctx):
    await ctx.send("This is a test")

您可以通过角色 IS 检查到:

@client.command()
@commands.has_role(id=112233445566778899)
async def test(ctx):
    await ctx.send("This is a test")

参考文献: