如何在一封嵌入邮件中发送多个链接

时间:2020-11-04 01:10:13

标签: javascript discord discord.js bots

我正在处理邀请命令,但是我不知道如何在一条消息中发送多个链接 此刻我的代码

 const inviteembed = new Discord.MessageEmbed()
            .setTitle('Invite Wide!')
            .addField('Invite Me!', "[Click Here](https://discord.com/oauth2/authorize?client_id=729537680257450104&scope=bot&permissions=8)")
            .addField('Check me out on other websites!',  "[DBL](https://discordbotlist.com/bots/wide)" + "[Discord Bots](https://discord.bots.gg/bots/729537680257450104]" + "(BOD)[https://bots.ondiscord.xyz/bots/729537680257450104]", {split : true})
            .setColor('00FFFF')
            .setTimestamp()
            .setThumbnail(message.author.displayAvatarURL())
            message.channel.send(inviteembed)

Check me out on other websites!', "[DBL](https://discordbotlist.com/bots/wide)" + "[Discord Bots](https://discord.bots.gg/bots/729537680257450104]" + "(BOD)[https://bots.ondiscord.xyz/bots/729537680257450104]", {split : true}中,它不会使消息变蓝。

它不起作用,请帮助

1 个答案:

答案 0 :(得分:0)

您只是感到困惑,我已将其修复,并添加了\n以在新行上显示每个链接。

请记住,此格式嵌入了链接:[TEXT](LINK)

const inviteembed = new Discord.MessageEmbed()
    .setTitle('Invite Wide!')
    .addField('Invite Me!', "[Click Here](https://discord.com/oauth2/authorize?client_id=729537680257450104&scope=bot&permissions=8)")
    .addField('Check me out on other websites!',  "[DBL](https://discordbotlist.com/bots/wide)\n[Discord Bots](https://discord.bots.gg/bots/729537680257450104)\n[BOD](https://bots.ondiscord.xyz/bots/729537680257450104)")
    .setColor('00FFFF')
    .setTimestamp()
    .setThumbnail(message.author.displayAvatarURL())

message.channel.send(inviteembed)