Error in the code when creating a bot vs. how to fix it?

  • 0
    When creating a Bot
    After entering command node shisa.js
    Throws some kind of error
    C: \ Users \ PC \ Desktop \ shisa \ shisa.js: 4
    let token = confing.token;
    ^

    ReferenceError: confing is not defined
    at Object. (C: \ Users \ PC \ Desktop \ shisa \ shisa.js: 4: 13)
    at Module._compile (internal / modules / cjs / loader.js: 1015: 30)
    at Object.Module._extensions..js (internal / modules / cjs / loader.js: 1035: 10)

    at Module.load (internal / modules / cjs / loader.js: 879: 32)
    at Function.Module._load (internal / modules / cjs / loader.js: 724: 14)
    at Function.executeUserEntryPoint [as runMain] (internal / modules / run_main.js
    : 60: 12)
    at internal / main / run_main_module.js: 17:47

    Code itself:
    const Discord = require ('discord.js');
    const shisa = new Discord.Client ();
    let config = require ('./ shisaconfig.json');
    let token = config.token;
    let prefix = config.prefix;

    shisa.on ('ready', () = & gt; {
    console.log (`Bot started $ {shisa.user.usernames}`)
    });

    shisa.on ('message', msg = & gt; {
    if (msg.content === 'ping') {
    msg.reply ('Pong!');
    }
    });

    shisa.login (token);
    JavaScript Anonymous, Nov 17, 2020

  • 0 Answers
Your Answer
To place the code, please use CodePen or similar tool. Thanks you!