purge.py 文件源码

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

项目:apex-sigma-core 作者: lu-ci 项目源码 文件源码
def generate_log_embed(message, target, channel, deleted):
    response = discord.Embed(color=0x696969, timestamp=arrow.utcnow().datetime)
    response.set_author(name=f'#{channel.name} Has Been Pruned', icon_url=user_avatar(message.author))
    if target:
        target_text = f'{target.mention}\n{target.name}#{target.discriminator}'
    else:
        target_text = 'No Filter'
    response.add_field(name='?? Prune Details',
                       value=f'Amount: {len(deleted)} Messages\nTarget: {target_text}', inline=True)
    author = message.author
    response.add_field(name='?? Responsible',
                       value=f'{author.mention}\n{author.name}#{author.discriminator}',
                       inline=True)
    response.set_footer(text=f'ChannelID: {channel.id}')
    return response


# noinspection PyBroadException
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号