Set embed title to a clickable link

左心房为你撑大大i 提交于 2020-08-05 18:17:05

问题


I have a RichEmbed and I want to make it so I can have a field title that when I click on it, it will lead me to a link.


回答1:


If you want the title of the embed to be a link, you can add a .url property to it, either by using RichEmbed.setURL(), manually setting it or adding it to the object you pass in the constructor.

If you want the title of a field to be a link that can't be done since that, unfortunately, doesn't support markdown :\
If you want you can add the link in the value text of the field, using markdown:

embed.addField("Field title", "Your text here: [link](http://example.com)")



回答2:


It's MessageEmbed and this is old now but:

embed.setURL('url here')


来源:https://stackoverflow.com/questions/54134880/set-embed-title-to-a-clickable-link

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!