def forumlink(self, ctx, url):
post = Preview.getThread(url)
embed = discord.Embed(title=post["title"], url=url)
embed.description = shorten(post['description'], 2048, 12)
if post["image"]:
embed.set_image(url=post["image"] if post["image"][0] != "." else "https://autohotkey.com/boards" + post["image"][1:post["image"].find("&") + 1])
embed.set_author(name=post["user"]["name"], url="https://autohotkey.com/boards" + post["user"]["url"][1:],
icon_url="https://autohotkey.com/boards" + post["user"]["icon"][1:])
embed.set_footer(text='autohotkey.com')
await ctx.send(embed=embed)
评论列表
文章目录