Javascript discord.js bot在尝试发送嵌入时报告[object]

Javascript discord.js bot在尝试发送嵌入时报告[object],javascript,embed,discord,discord.js,Javascript,Embed,Discord,Discord.js,我正在编写一个必须发送嵌入的bot。但是当发送嵌入时,bot会说[object] 嵌入代码: const embed9 = new Discord.MessageEmbed() .setTitle("1h Until Convoy - Sim1") .setURL("https://www.scanialtd.com/") .setColor(16571139) .setDescription("T

我正在编写一个必须发送嵌入的bot。但是当发送嵌入时,bot会说
[object]


嵌入代码:

const embed9 = new Discord.MessageEmbed()
            .setTitle("1h Until Convoy - Sim1")
            .setURL("https://www.scanialtd.com/")
            .setColor(16571139)
            .setDescription("There is 1 hour untill the convoy on Simulation 1 in ETS2. Get ready to join by launching ETS2 and logging on to Simulation 1. Join the Convoy Lounge while you wait.")
            .setFooter("Created by ScaniaLTD Convoy Announcements Bot, https://www.scanialtd.com/uploads/6/3/4/9/63493649/published/logo_3.png")
            .setImage("http://i.imgur.com/yVpymuV.png")
            .setThumbnail("https://www.scanialtd.com/uploads/6/3/4/9/63493649/published/logo_3.png")
            .setTimestamp()
        message.channel.send('@ConvoyReminders' + {embed9})

您正在连接一个字符串和一个包含embed9的对象


要提及某人,您需要在
.setDescription
中添加
@
。然后您可以只执行
message.channel.send(嵌入9)

,因为您尝试在1个参数中发送stirng+embed对象。 你不能用他们的
name+@
来提及peaple,你需要使用
user.id
,比如
来表示角色

正确的方式:

const embed9 = new Discord.MessageEmbed()
            .setTitle("1h Until Convoy - Sim1")
            .setURL("https://www.scanialtd.com/")
            .setColor(16571139)
            .setDescription("There is 1 hour untill the convoy on Simulation 1 in ETS2. Get ready to join by launching ETS2 and logging on to Simulation 1. Join the Convoy Lounge while you wait.")
            .setFooter("Created by ScaniaLTD Convoy Announcements Bot, https://www.scanialtd.com/uploads/6/3/4/9/63493649/published/logo_3.png")
            .setImage("http://i.imgur.com/yVpymuV.png")
            .setThumbnail("https://www.scanialtd.com/uploads/6/3/4/9/63493649/published/logo_3.png")
            .setTimestamp()

        message.channel.send('@ConvoyReminders', embed9)

简化标题和问题