def role_or_permissions(ctx, check, **perms):
if not isinstance(ctx.channel, discord.abc.GuildChannel):
raise commands.NoPrivateMessage
role = discord.utils.find(check, ctx.author.roles)
if role:
return True
if await check_permissions(ctx, perms):
return True
return False
评论列表
文章目录