Question about a bot
everytime i go to turn my bot on it just repeats this C:\Users\andre\Desktop\discordbot>
What do i do i have tried node main.js, node . all of it idk what to do anymore
13 Replies
- What's your exact discord.js
npm list discord.js
and node node -v
version?
- Not a discord.js issue? Check out #other-js-ts.
- 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!Sounds like it isnt trying to log in
easy try catch should help that
:waitWhat:
Cant try catch something that isnt there
whats they are stating is that the process is just exiting without doing anything. With not very much context, putting all the code in a try catch with a console log nearly always will find the problem
is what i was getting at
least temporarily
So no, very vague and non-specific advice. If the client.login() line exists at all the process either wont exit, or will error
then maybe its not client.login, its another function, statement or section thats failing
just guessing here
A discord.js bot process exiting silently almost always indicates that client.login() wasnt called
true
Yeah I have no idea
My guess was I put something in wrong
This is my first time having the problem
Ok I use node.js

Thats the whole code
real quick you should reset your token
aside from that
1. that looks like v12 (or older) code
2. you haven't saved your code
so assuming you're using a supported version of discord.js, that code would error after you save
if you're unfamiliar with discord.js overall, you could consider starting from the beginning of an updated guide
or in general you'll need to update your code (and remember to save)