作者热门文章
- Java 双重比较
- java - 比较器与 Apache BeanComparator
- Objective-C 完成 block 导致额外的方法调用?
- database - RESTful URI 是否应该公开数据库主键?
我正在尝试创建类似[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/
我是一名优秀的程序员,十分优秀!