Why doesn't it work. I need help ASAP. (javascript)

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.content === "hi") {

const mySecret = process.env['TOKEN']

in future, please send the error message


What do i write now?

oh, mb you also have to enable the MESSAGE CONTENT INTENT in the Bot tab of your app in the Discord Developer Portal

1 Like