Javascript /n不';不显示为换行符
Javascript /n不';不显示为换行符,javascript,node.js,discord,discord.js,Javascript,Node.js,Discord,Discord.js,/n没有中断我的嵌入消息。我的代码和它发送的嵌入位于下面。有人能帮忙吗 代码部分: client.on("message", (message) => { if (!message.content.startsWith(prefix) || message.author.bot) return; if (message.content.toLowerCase().startsWith(prefix + `rules`)) { const embed = new Disc
/n
没有中断我的嵌入消息。我的代码和它发送的嵌入位于下面。有人能帮忙吗
代码部分:
client.on("message", (message) => {
if (!message.content.startsWith(prefix) || message.author.bot) return;
if (message.content.toLowerCase().startsWith(prefix + `rules`)) {
const embed = new Discord.RichEmbed()
.setTitle(`OFFICIAL SERVER RULES`)
.setColor(0xCF40FA)
.setDescription(`Official rules for the USA discord server. Last updated: 1st October 2018`)
.addField(`**GENERAL RULES**`, `1.Swearing is allowed, But not targeted towards a person./n2. Be respectful to everyone in the server./n3. No form of racism./n4. No public arguments./n5. Anything not suitable for work if forbidden./n6. All conversations are limited to English./n7. Spamming or mass mentioning is strictly forbidden./n8. Keep messages in their respective channels./n9. Fake or bad links, advertising anything non-US related, stays out of this discord./n10. Keep bot commands in #bot-commands ./n11. No talking in #announcements .`)
message.channel.send({ embed: embed });
}
});
换行符的正确转义字符是
\n
不是/n
换行符的正确转义字符是\n
不是/n如果这是唯一的问题,则是反斜杠:\n
。如果这是唯一的问题,则是反斜杠:\n
。