我希望我的机器人像这样将消息发送到聊天室:
await ctx.send("This country is not supported, you can ask me to add it here")
但是要将“此处”变成可点击的链接,在 HTML 中我会这样做,对吗?
<a href="https://www.youtube.com/" > This country is not supported, you can ask me to add it here </a>
我怎样才能在 python 中做到这一点?
原文由 Moder New 发布,翻译遵循 CC BY-SA 4.0 许可协议
正如另一个答案所解释的那样,您不能在普通消息中添加超链接,但 可以 在嵌入中添加。我不明白您为什么不想使用 Embed 作为错误消息,特别是考虑到它增加了更多功能,所以您应该考虑使用它。
随意使用嵌入并添加一些字段、标题、颜色以及您可能想要做的任何其他事情以使其看起来更好。相关 API 文档 中的更多信息。