#Can help me to create my bot pls

30 messages · Page 1 of 1 (latest)

silent hamlet
#

Can help me to create my bot pls

restive raptorBOT
#
  • What's your exact discord.js npm list discord.js and node node -v version?
  • Not a discord.js issue? Check out #1081585952654360687.
  • Consider reading #how-to-get-help to improve your question!
  • Explain what exactly your issue is.
  • Post the full error stack trace, not just the top part!
  • Show your code!
  • Issue solved? Press the button!
scarlet emberBOT
#

Suggestion for @silent hamlet:
guide Home: Introduction - Before you begin...
read more

silent hamlet
#

can help me i not understand this error

scarlet emberBOT
#

Suggestion for @silent hamlet:
guide Popular Topics: Gateway Intents
read more

silent hamlet
#

What should I do?

torn field
#

did you read the what i sent?

silent hamlet
#

I tried yes

torn field
#

that does not help them

silent hamlet
#

Should I put it where?

const { Client, GatewayIntentBits } = require('discord.js');

const client = new Client({
    intents: [
        GatewayIntentBits.Guilds,
        GatewayIntentBits.GuildMessages,
        GatewayIntentBits.MessageContent,
        GatewayIntentBits.GuildMembers,
    ],
});
torn field
#

you already added them

#

save your code and run your bot

#

their code is correct

#

thats what he's supposed to do

silent hamlet
torn field
#

you're not being very helpful

torn field
silent hamlet
#

ok thanks

#

ReferenceError: Client is not defined

#

hmm

copper summit
#

Import it from discord.js

silent hamlet
#

?

torn field
#

!

#

please use words

silent hamlet
#
const Discord = require("discord.js");
const config = require("./config.json");
const client = new Discord.Client({
    intents: [
        GatewayIntentBits.Guilds,
        GatewayIntentBits.GuildMessages,
        GatewayIntentBits.MessageContent,
        GatewayIntentBits.GuildMembers,
    ],
});
client.login(config.BOT_TOKEN);
torn field
#

they dont need to do that

#

they can do Discord.GatewayIntentBits