I have some trouble with this code:

Question:

Im having this error with the code below here:

Repl link:
I have some trouble with this code:

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

client.on("ready", () => {
  console.log(`Logged in as ${client.user.tag}!`);
});
client.on("message", (msg) => {
  if (msg.author.bot == false) {
    if (msg.content.includes("ping")) {
      msg.reply("pong");
    }
  }
});
client.login(
  "[REDACTED - CHANGE ASAP]",
);

im trying to work a basic example, which only acts when user says ‘ping’, the server says ‘pong’ and no more. Its possible? Thanks anyway for seeing my question.

Hello @drfrankatron!
Please do not provide your client key in the code. Instead, use environment variables.

Ok, sorry for beeing too late but now i will protect keys forever.

An object with the key intents and an array of Intents needs to be provided.
See here: Creating the main file | discord.js Guide