[英]Inline embed field doesn't work
After having done an update of Node.js, embeds don't work correctly now... 更新完Node.js后,嵌入现在无法正常工作...
I tried to reinstall node.js and discord.js but nothing happened. 我尝试重新安装node.js和discord.js,但没有任何反应。 I also tried to rewrite the code but it's the same thing, inline embeds don't work... 我也试图重写代码,但这是同一回事,内联嵌入无法正常工作...
const Discord = require("discord.js")
const client = new Discord.Client({disableEveryone: true})
const prefix = "&"
client.on("message", message => {
if (message.content === prefix + "test") {
let myembed = new Discord.RichEmbed()
.setColor("RANDOM")
.setAuthor("AUTHOR", message.author.avatarURL)
.setFooter("FOOTER", client.user.avatarURL)
.setTimestamp(new Date())
.setTitle("TITLE")
.addField("FIELD 1", "SUBFIELD 1", true)
.addField("FIELD 2", "SUBFIELD 2", true)
message.channel.send(myembed)
}
})
client.login("token")
And this is what I have: 这就是我所拥有的:
This is a bug version 11.4.0, he is already known and will be fixed in the next version. 这是一个错误版本11.4.0,他已经众所周知,将在下一版本中修复。 You can revert to the previous version by writing to the console npm i discord.js@11.3.2
您可以通过向控制台npm i discord.js@11.3.2
写入来恢复到以前的版本
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.