title: Discord.Js: TypeError: Cannot read properties of undefined (reading 'FLAGS')
body: <p>my code is fine and everything is fine but i get an error.</p>
  <p>My code:</p>
  <pre><code>const { Client, Intents } = require('discord.js');
  
  const client = new Client({ intents: [Intents.FLAGS.GUILDS] });
  
  client.once('ready', () =&gt; {
      console.log('Ready!');
    client.user.setPresence({ activities: [{ name: 'Discord' }], status: 'idle' });
  });
  
  client.login(process.env.token);
  </code></pre>
  <p>The error:</p>
  <pre><code>TypeError: Cannot read properties of undefined (reading 'FLAGS')
      at Object.&lt;anonymous&gt; (/home/runner/discordjs-bot/index.js:5:47)
      at Module._compile (node:internal/modules/cjs/loader:1101:14)
  </code></pre>
  <p><strong>Any help?</strong></p>