monitorchannel.py 文件源码

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

项目:dogbot 作者: slice 项目源码 文件源码
def guild_fields(self, g: Guild):
        """Returns a list of fields to be passed into :method:``monitor_send`` from a guild."""
        ratio = botcollection.user_to_bot_ratio(g)
        humans = utils.commas(sum(1 for u in g.members if not u.bot))
        bots = utils.commas(sum(1 for u in g.members if u.bot))

        return [
            ('Guild', f'{g.name}\n`{g.id}`'),
            ('Owner', f'{g.owner.mention} {g.owner}\n`{g.owner.id}`'),
            ('Info', f'Created {utils.ago(g.created_at)}'),
            ('Members', f'Members: {len(g.members)} (UTBR: {ratio})\n{humans} human(s), {bots} bot(s)')
        ]
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号