commands.py 文件源码

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

项目:AceBot 作者: Run1e 项目源码 文件源码
def embedwiki(self, ctx, wiki):
        embed = discord.Embed()

        sum = wiki.summary
        if len(sum) > 1024:
            sum = sum[0:1024] + '...'

        embed.description = sum
        embed.set_author(name=wiki.title, url=wiki.url, icon_url='https://i.imgur.com/qIor1ag.png')

        image = ''
        for img in wiki.images:
            if not img.endswith('.svg'):
                image = img
                break

        if image:
            embed.set_image(url=image)

        embed.set_footer(text='wikipedia.com')
        await ctx.send(embed=embed)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号