info.py 文件源码

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

项目:dogbot 作者: slice 项目源码 文件源码
def permissions(self, ctx):
        """
        Views my permissions in this server.

        This does not view my permissions in this channel. In other words,
        channel permission overwrites are not taken into account here.
        """
        perms = ctx.guild.me.guild_permissions

        paginator = commands.Paginator()

        max_perm_length = max(len(checks.beautify_permission_name(p[0])) for p in perms)

        for attr, value in perms:
            indicator = '\U00002705' if value else '\U0000274c'
            paginator.add_line(f'{checks.beautify_permission_name(attr): <{max_perm_length}} {indicator}')

        for page in paginator.pages:
            await ctx.send(page)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号