Discord.js 嵌入式消息错误,但据我所知一切都在那里

Discord.js embedded message error while as far as I know everything is there

有人能告诉我为什么我总是收到错误消息吗?说 运行 它不能发送空消息。

Image 1

Image 2

你所要做的就是将 message.channel.send(embed) 更改为 message.channel.send({ embeds: [embed] }) 因为当你使用 message.channel.send(embed) 时,Discord 认为变量 embed 必须是一个字符串并尝试发送它但是它意识到它不是,因此发生了错误。