title: ReferenceError: message is not defined, please resolve this
body: <p>I am new to javascript as well have discord js, i am getting an error when running my discord bot, here, Also please fix the code and tell me what i did wrong, thankyou.</p>
  <p>I have been making a all feature discord bot, and this is the first error i have found which i am unable to fix, i'd appreciate it greatly if any of you could help.</p>
  <pre class="lang-js prettyprint-override"><code>let args = message.content.slice(prefix.length).trim().split(' ');
  </code></pre>
  <blockquote>
  <p>ReferenceError: message is not defined</p>
  </blockquote>
  <pre class="lang-js prettyprint-override"><code>// Constant Variables
  const Discord = require(&quot;discord.js&quot;);
  const prefix = &quot;!&quot;;
  const client = new Discord.Client();
  
  // Startup 1 Below Listener Events
  client.once(&quot;ready&quot;, () =&gt; {
    console.log(&quot;Countless Is Up And Running, Wooohooo&quot;);
  });
  
  // Moderation 2 Below
  client.on(&quot;Message&quot;, (Message) =&gt; {
    if (Message.member.hasPermission([&quot;KICK_MEMBERS&quot;])) {
      //console.log(message.content);
  
      if (Message.content.startsWith(`${prefix}kick`)) {
        //message.channel.send(&quot;Kick&quot;)
  
        let member = Message.mentions.members.first();
        member.kick().then((member) =&gt; {
          Message.channel.send(
            &quot;https://gph.is/2iBA79h :wave: &quot; +
              member.displayName +
              &quot; has been kicked!&quot;
          );
        });
      }
    }
  });
  
  client.on(&quot;Message&quot;, (Message) =&gt; {
    if (Message.member.hasPermission([&quot;BAN_MEMBERS&quot;])) {
      //console.log(message.content);
  
      if (Message.content.startsWith(`${prefix}ban`)) {
        //message.channel.send(&quot;Ban&quot;)
  
        let member = Message.mentions.members.first();
        member.ban().then((member) =&gt; {
          Message.channel.send(
            &quot;https://gph.is/29507Ei :wave: &quot; +
              member.displayName +
              &quot; has been banned!&quot;
          );
        });
      }
    }
  });
  
  // Variables
  let args = message.content.slice(prefix.length).trim().split(&quot; &quot;);
  let cmd = args.shift().toLowerCase();
  
  // Return Statements
  if (Message.author.bot) return; // Ignores All Bots
  if (!Message.content.startWith(prefix)) return; // Returns Messages if doesnt start with the prefix
  
  // Command Handler
  try {
    // Bonus: Auto-Reload ()
    delete require.cache[require.resolve(`./commands/${cmd}.js`)];
  
    let commandFile = require(`./commands/${cmd}.js`);
    commandFile.run(client, Message, args);
  } catch (e) {
    // Will catch any errors within code or commands
    console.log(e.stack);
  }
  
  client.login(token);
  </code></pre>