gpt4 book ai didi

node.js - 有没有办法在 RichEmbed 中嵌入超链接?

转载 作者:搜寻专家 更新时间:2023-10-31 23:39:43 26 4
gpt4 key购买 nike

我正在尝试创建类似[this](https://stackoverflow.com/) 的链接,但我似乎无法找到任何可能的答案。

我已经尝试过 markdown 语法(如上所示),但我似乎找不到任何其他答案。

这是我目前使用的代码:

message.author.send({
embed: new Discord.RichEmbed()
.setTitle("DiscordBot Help")
.setColor("#42b6f4")
.addField("help cosmetic - Cosmetic help.", "All cosmetic commands")
.addField("help economy - Economy help.", "All economy commands")
.addField("facts - Gives you facts", "Subcommands required")
.addField("credits - Shows the developers", "All hail the Creators!")
.addField("info - Fun info about DiscordBot", "10 fun facts.. or what?")
.addField("patch - Shows current patch/updates.", "UPDATES ARE AWESOME!")
// This is the line I'm having trouble with.
.addField("Add DiscordBot to your server! [Click here](https://discordapp.com/oauth2/authorize?client_id=439778986050977792&scope=bot&permissions=8)", "Its mine now.")
// Here the line ends.
.addField("Enter prefix before the commands", "It wont work else ;)")
.addField("MIT License | Copyright © 2018, Technotype", "All rights reserved.")
.addField("More content coming soon!", "It'll just take time")
});

我希望代码的输出是这样的:

Add DiscordBot to your server! [Click here](https://discordapp.com/oauth2/authorize?client_id=439778986050977792&scope=bot&permissions=8)

但我得到的是输出:

Add DiscordBot to your server! \[Click here\]\(https://discordapp.com/oauth2/authorize?client_id=439778986050977792&scope=bot&permissions=8\)

最佳答案

字段名不能包含链接,但字段值可以。 所以这样的事情会起作用:

.addField("Its mine now", "Add DiscordBot to your server! [Click here](https://discordapp.com/oauth2/authorize?client_id=439778986050977792&scope=bot&permissions=8)")

关于node.js - 有没有办法在 RichEmbed 中嵌入超链接?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54753005/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com