ReferenceError:command is not defined



I have a problem i added 2 commands its Help and 8ball but when i start it and do help it shuts down and gives me a error saying command is not defined. Also my “Config” were it says { "Prefix" : "-" }
That also dont work please comment the problem im so confused.

const Discord = require("discord.js");
const client = new Discord.Client();
const config = require("./config.json");

client.on('ready', () => {
  console.log(`Logged in as ${client.user.tag}!`);

client.on('message', msg => {

  if (msg.content === 'ping') {

  if(command === "help") {"**Commands: [help] gives information on the bot [8ball] random thing were i can respawn to you");"**I just messaged you the commands, go to your direct messages!**");

  if(command === "8ball") {
    if (args[1])[Math.floor(Math.random() * fortunes.length)]);
      else"```diff\n- I do not understand```");




This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.