@client.command()
@commands.has_role('Must Have Role')
@commands.has_any_role('Role One', 'Role Two')
async def role_test(ctx):
await ctx.send("Hey this worked")
# This would only send if the user has 'Must Have Role' and either 'Role One' or 'Role Two'
因此,这里有一种方法可以做到这一点。使用^{} 和^{} ,您可以确保用户拥有一个特定的角色以及给定的角色之一
相关问题 更多 >
编程相关推荐