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)
评论列表
文章目录