繁体   English   中英

如何制作不和谐的嵌入链接

[英]How can I make a discord embeded link

我尝试在我的代码中编写 Clickhere,但它不起作用,而是总是发送 [Clickhere](链接)。 我也试过消息嵌入。 但它说“不和谐没有定义”。 这是我的代码:

module.exports = {
    name: 'name',
    description: "description",
    
    execute(message, args){const today = new Date().getDay();
        switch (today) {
          case 0:
             message.channel.send (
                'message');
      
            break;
          case 1:
               botInfo= '[Click here!](https://support.discord.com/hc/en-us/community/posts/360038398572-Hyperlink-Markdown)'
             message.channel.send (
                '[Click here!](https://support.discord.com/hc/en-us/community/posts/360038398572-Hyperlink-Markdown)');
             message.channel.send(botInfo);
        

目前,超链接仅在嵌入消息中可用,仅在描述和字段值中可用。


const Discord = require("discord.js");

const Embed = new Discord.MessageEmbed();
Embed.setDescription("[Click here!](https://support.discord.com/hc/en-us/community/posts/360038398572-Hyperlink-Markdown)");
message.channel.send(Embed);

或者你可以做

const {MessageEmbed} = require("discord.js");

const Embed = new MessageEmbed()
.setDescription("[Click here!](https://support.discord.com/hc/en-us/community/posts/360038398572-Hyperlink-Markdown)");
message.channel.send(Embed);

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM