title: Discord bot won't log messages
body: <p>Currently new to coding Discord bots, and was following along with an online tutorial.</p>
  <p>I'm stuck on trying to get the client's message method to log the message that the user typed.</p>
  <p>Here's my code:</p>
  <pre><code>  require('dotenv').config(); 
    const Discord = require('discord.js');
    const client = new Discord.Client({ intents: [&quot;GUILD_MESSAGES&quot;] });
    client.on('ready', () =&gt; {
       console.log(`${client.user.tag} has logged in`);
    });
  
   client.on('message', (msg) =&gt; {
      console.log(msg.content);
   });
  
   client.login(process.env.TOKEN);
  </code></pre>
  <p>The tutorial is a bit outdated since Discordjs has been updated, and I'm not sure if the problem has to do with the intent or something else.</p>
  <p>The bot is able to login to the server and shows up as online, with the console registering the login.</p>
  <p>However, the console is never able to log any messages sent. Any help would be appreciated.</p>