#'ClientMissingIntents'

54 messages · Page 1 of 1 (latest)

drowsy cryptBOT
lavish perch
#

Ive read that already and im still struggling to understand what its saying. Ive done what it was asking and still failed to work.

dense crown
#

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.

lavish perch
#

well, i already added the script to the project and i still get the error.

dense crown
#

Show the full error

lavish perch
#

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.

dense crown
#

Those are all basic JS problems

#

you declared client twice

lavish perch
#

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?

dense crown
#

You should familiarise yourself with javascript before you start making a bot

#

This isn't a trivial task

lavish perch
#

Well, i must start somewhere. I managed to script the entire thing tho.

dense crown
#

And evidentially it's not working

#

#resources has some good stuff to get started with javascript

lavish perch
#

ok.

#

Thanks for helping.

lavish perch
#

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.

wide pecan
#

wdym

lavish perch
#

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

wide pecan
#

show your code + client constructor

lavish perch
#

Theirs his code and im working with nodejs and JavaScript

dense crown
#

you are not even listening for messages on the server

#

you are listening for messages on the discord

lavish perch
#

Well shoot. What do add for him to listen on the server?

wide pecan
#

should also be messageCreate (assuming you use v14)

#

and might want to reset your token

lavish perch
#

I am

#

What do i add for him to listen on the server?

dense crown
#

listen to the chat event

#
bot.on('chat', (username, message) => {
  // Do something with the message
})
glacial matrix
#

go reset your token

lavish perch
glacial matrix
#

ok

lavish perch
#

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

dense crown
lavish perch
#

ok didnt quite have it

#

Maybe like that?

wide pecan
#

messageCreate

dense crown
#

idk why he didnt remove it yet

dense crown
drowsy cryptBOT
#

mdn 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.

lavish perch
#

I havent fucked with this enough to know lmao

#

we gettin somewhere lol