因此,我正在为roblox创建一个神话猎人机器人,我想复制具有一定等级的所有用户,但是这不是我想做的,我只是想知道为什么这行不通。没有错误也没有答复
var args = message.content.substring(prefix.length).split(" ");
switch (args[0].toLowerCase()) {
case "info":
let mythUser = message.content.replace("mh>info ", "");
if (mythUser === "fodloca") {
var fodLoceEmb = new discord.RichEmbed()
.setTitle("User: Fodloca")
.addField("ID: 663751421", "Description: Hey, I'm Fodloca..")
.setThumbnail("https://www.roblox.com/outfit-thumbnail/image?userOutfitId=663751421&width=420&height=420&format=png")
message.channel.send(forLoceEmb);
}
break;
}
答案 0 :(得分:0)
使用==而不是===
var args = message.content.substring(prefix.length).split(" ");
switch (args[0].toLowerCase()) {
case "info":
let mythUser = message.content.replace("mh>info ", "");
if (mythUser == "fodloca") {
var fodLoceEmb = new discord.RichEmbed()
.setTitle("User: Fodloca")
.addField("ID: 663751421", "Description: Hey, I'm Fodloca..")
.setThumbnail("https://www.roblox.com/outfit-thumbnail/image?userOutfitId=663751421&width=420&height=420&format=png")
message.channel.send(forLoceEmb);
}
break;
}