permissions.py 文件源码

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

项目:Chiaki-Nanami 作者: Ikusaba-san 项目源码 文件源码
def _display_plonked(self, ctx, entries, plonk):
        # things = channels, members

        colour, action = _plonk_embed_mappings[plonk]
        embed = (discord.Embed(colour=colour)
                 .set_author(name=f'{action.title()} successful!', icon_url=PLONK_ICON)
                 )

        for thing in map(list, partition(lambda e: isinstance(e, discord.TextChannel), entries)):
            if not thing:
                continue

            name = f'{_get_class_name(thing[0])}{"s" * (len(thing) != 1)} {action}ed'
            value = truncate(', '.join(map(str, thing)), 1024, '...')
            embed.add_field(name=name, value=value, inline=False)

        await ctx.send(embed=embed)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号