#'ClientMissingIntents'
54 messages · Page 1 of 1 (latest)
Ive read that already and im still struggling to understand what its saying. Ive done what it was asking and still failed to work.
If you would have done what its saying, you wouldn't have this error.
The error is telling you that you didn't provide any intents to the client constructor.
This part specifically https://discordjs.guide/popular-topics/intents.html#enabling-intents
well, i already added the script to the project and i still get the error.
Show the full error
I modified the script a little and got it to work. Now the error it gives me now is Identifier 'client' has already been declared.
Those are all basic JS problems
you declared client twice
Yeah, i just started node
Its showing where i posted the intents where its showing where its already been declared
Couldnt i replace where it says new client for just client?
You should familiarise yourself with javascript before you start making a bot
This isn't a trivial task
Well, i must start somewhere. I managed to script the entire thing tho.
And evidentially it's not working
#resources has some good stuff to get started with javascript
ok.
Thanks for helping.
ok. I got the intentions and everything set up now and hes good to go. Now my only problem is now It isnt pasting anything to the discord bot.
wdym
I have him set up where he is supposed to send his chat logs and his command logs to a discord server in a specific channel but he isnt sending anything
show your code + client constructor
Theirs his code and im working with nodejs and JavaScript
you are not even listening for messages on the server
you are listening for messages on the discord
Well shoot. What do add for him to listen on the server?
should also be messageCreate (assuming you use v14)
and might want to reset your token
I am
What do i add for him to listen on the server?
listen to the chat event
bot.on('chat', (username, message) => {
// Do something with the message
})
I already changed it
ok
Im having a little trouble figuring it out.
ok. So this is what i have rn.
The last bit of script is listen?
Im not too entirely sure if i did that correctly
this is still how to get messages from the server
ok didnt quite have it
Maybe like that?
messageCreate
the discord chat isn't relevant here
idk why he didnt remove it yet
now if you use template literals properly, then yes
Template literals (Template strings)
Template literals are literals delimited with backtick (`) characters, allowing for multi-line strings, string interpolation with embedded expressions, and special constructs called tagged templates.
I havent fucked with this enough to know lmao
we gettin somewhere lol
Popular Topics: Gateway Intents