Syntax error - Node.js Discord Bot

0

I'm having this error:

C:\Users\Administrator\Desktop\Bot BackForTeam>node app.js
C:\Users\Administrator\Desktop\Bot BackForTeam\app.js:148
});
  ^

SyntaxError: Unexpected end of input
    at createScript (vm.js:80:10)
    at Object.runInThisContext (vm.js:139:10)
    at Module._compile (module.js:607:28)
    at Object.Module._extensions..js (module.js:654:10)
    at Module.load (module.js:556:32)
    at tryModuleLoad (module.js:499:12)
    at Function.Module._load (module.js:491:3)
    at Function.Module.runMain (module.js:684:10)
    at startup (bootstrap_node.js:187:16)
    at bootstrap_node.js:608:3

In this code:

 if (command === "bin") {
    const bin = args.join(" ");
    if (bin.lenght < 1) return message.channel.send("Digite uma bin valida");
    else if (bin.length < 6) return message.channel.send("Digite uma bin de 6 digitos");
    else if (bin.length > 6) return message.channel.send("Digite uma bin de 6 digitos");

    var bin2 = "http://loocalhost.kinghost.net/ferramentas/bin.php?bin="+bin+"&gate=1";
    http.get(bin2, (resposta) => {

    let data = '';

    resposta.on('data', (x) => {

    data += x;

    message.channel.sendMessage(data);
  });

});

}

Note: It is a bot discord.js

    
asked by anonymous 04.02.2018 / 22:56

1 answer

0

If something goes wrong in your code, but you do not know where else the error might be, you can refer to it in other ways, such as using the if rule:

if(papapa == 1){
alert("eae");
}else if(papapa == 2){
alert("eae2");
}else{
alert("eae3");
}
    
05.02.2018 / 02:47