您可能从我今天早些时候的帖子中认出了我,但我试图展开+help命令,以提供有关命令的特定信息。然而,代码涉及回退-内回。
在JS中,多行字符串由backticks 表示。然而,在不一致的情况下,内联代码也是由一对反代码显示的,而块代码则由一对三个反代码显示。(注意:我想为+help本身提供帮助信息,而不是您在代码中看到的+ping,+help帮助是多行的。因此,我只需要使用多行+ping帮助,因为如果只有一行,我可以使用引号,而不是回拨。)
if (args[0] === "ping") {
const Help = new Discord.MessageEmbed()
.setColor("#FF0000")
.setTitle("Info about `+help`")
.setAuthor("Bots for Guilds")
.setDescription(`
If you write:
```
+ping
```
you get a response of "pong", as shown in the image below.
`)
.setImage("http://bfg.atharvnadkarni.com/bfg1.png");
}
message.channel.send(Help);你能帮帮我吗?
发布于 2021-05-18 19:22:20
我不确定我是否正确地理解了你的问题,但你可能想像这样逃避后排:
if (args[0] === 'ping') {
const helpEmbed = new Discord.MessageEmbed()
.setColor('#FF0000')
.setTitle('Info about `+help`')
.setAuthor('Bots for Guilds')
.setDescription(
`If you write:
\`\`\`+ping\`\`\`
you get a response of "pong", as shown in the image below.`,
)
.setImage('http://bfg.atharvnadkarni.com/bfg1.png');
message.channel.send(helpEmbed);
}

https://stackoverflow.com/questions/67589741
复制相似问题