#node .
81 messages · Page 1 of 1 (latest)
To help you we need more information:
- What are you trying to do?
- What is your code?
- What errors and debug logs do you have?
so im using visual studio code
im trying to code a discord bot.
java script
my error is node .
when i put the node . in the terminal of visual studio code it does absoulty nothing
run node -v
and try node <yourfilename>.js
when i run this it says module not found in green
show the output
and im in v18.16.1
would you like a screenshot
yes
well make sure you're in the right directory
and make sure you actually typed the file name correctly
the file name is Gentlemen Bot
then you typed the filename incorrectly
i put GentlemenBot.js
you didn't
you're missing the actual command node now...
i swear i downloaded it correcrtly and its in my varibles
...
...
you just forgot to put node
just do like you did before but with the right filename
so node.GentlemenBot.js ???
or nodeGentlemenBot.js
are you even trying at this point
you literally did it before
node <yourfile>.js
i did
i literally did
and did it work
no
and what error did you get
are you even reading waht i say
there needs to be a space, node filename.js
module not found
show your file structure
you need to run index.js
and you just leaked your token. reset it
alright
i reset it
rn
so i need to run the index correct?
yes
in the terminal
yes
i did that and a error pops up
which error
it says index.js is not recognized
did you prefix it with node? We've literally just been over this
yes and it says absolutly nothing
just goes to the next line
and do you have anything in your code that would log something
not atm would you want to see the full code?
well then of course you wont get any output
that activity setter is wrong thats one thing
and does the bot show up as online
thats what this code is for to make it online
also access the client from the param that is passed in the ready event
so no not yet
wdym?
ready passes in a client parameter, use that to set the activity
and can you run npm ls discord.js
i ran it in terminal
and what is wrong about the activity setter?
and what did it output
ClientUser#setActivity()
Sets the activity the client user is playing.
and now what?
Yeah
I highly doubt your code is saved at all
how?
ok