checks.py 文件源码

python
阅读 20 收藏 0 点赞 0 评论 0

项目:Inkxbot 作者: InkxtheSquid 项目源码 文件源码
def role_or_permissions(ctx, check, **perms):
    if check_permissions(ctx, perms):
        return True

    ch = ctx.message.channel
    author = ctx.message.author
    if ch.is_private:
        return False # can't have roles in PMs

    role = discord.utils.find(check, author.roles)
    return role is not None
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号