Messages.py 文件源码

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

项目:paobot-Release 作者: cjoeml 项目源码 文件源码
def helpful_link(self, ctx, link: str):
        """Currently the most useless function in the world"""

        author = ctx.message.author
        description = ("Have a helpful link: "
                       "[LINK]({})".format(link))
        field_name = "Link name"
        field_contents = "This is link"
        footer_text = "Check out this link or not, who even cares."

        embed = discord.Embed(colour=0xFF0000, description=description) # Can use discord.Colour() as well
        embed.title = "Linky link"
        embed.set_author(name=str(author.name), icon_url=author.avatar_url)
        embed.add_field(name=field_name, value=field_contents) # Can add multiple fields.
        embed.set_footer(text=footer_text)

        await self.bot.say(embed=embed)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号