这是代码,它说“ else”语句需要一个“ Declaration or statement” (.addfield()中的下划线实际上是单词,但我不希望有人窃取我的想法)
if(command === 'start'){
const embed = new Discord.MessageEmbed()
.setTitle('START MENU')
.addField('Options-')
.addField('Hello and welcome to the world of pokémon! Pick your first pokémon from the list below with the command `p!pick <pokemon>`')
.addField('Bulbasaur, Charmander, Squirtle')
.addField('Chikorita, Cyndaquil, Totodile')
.addField('Treecko, Torchic, Mudkip'
.addField('Turtwig, Chimchar, Piplup')
.addField('Snivy, Tepig, Oshawott')
.addField('Chespin, Fennekin, Froakie')
.addField('Rowlet, Litten, Popplio')
.addField('Grookey, Scorbunny, Sobble')
.addField('______,______,______')
.setColor(0x036f5a))
message.channel.send(embed)
}}); else {
message.channel.send('INVALID COMMAND')
}
答案 0 :(得分:0)
我会在else
之前的双大括号,括号和分号上打2便士。 IMO,它应该只是一个大括号。