Keeps on saying that at Object.<anonymous> (/home/runner/yunho-steala/index.js:13:16)

Question:

Current behavior:

Desired behavior

Repl link:

const express = require("express");
const app = express();

app.listen(3000, () => {
  console.log("project is running!");
})

app.get("/", (req, res) => {
  res.send("Hello world!");
})

const Discord = require("discord.js");
const client = new Discord.Client({intents: ["GUILDS", "GUILD_MESSAGES"]});

client.on("message", message => {
  if(message.content === "ping") {
    message.channel.send("pong")
  }
})

client.login(process.env.token);

hey @rudylis, welcome to the community!

please give us the full error you’re getting so it’s easier for other members of the forum to help you

3 Likes

discord.js has been updated so that intent names are in title case, e.g. GUILDSGuilds

2 Likes