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
d.js toolkit
d.js toolkit2d ago
- 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!
monbrey
monbrey2d ago
Sounds like it isnt trying to log in
⌁ Ky ⌁
easy try catch should help that
monbrey
monbrey2d ago
:waitWhat: Cant try catch something that isnt there
⌁ Ky ⌁
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
monbrey
monbrey2d ago
So no, very vague and non-specific advice. If the client.login() line exists at all the process either wont exit, or will error
⌁ Ky ⌁
then maybe its not client.login, its another function, statement or section thats failing just guessing here
monbrey
monbrey2d ago
A discord.js bot process exiting silently almost always indicates that client.login() wasnt called
⌁ Ky ⌁
true
KYMSO
KYMSOOP2d ago
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
KYMSO
KYMSOOP19h ago
No description
KYMSO
KYMSOOP19h ago
Thats the whole code
duck
duck19h ago
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)

Did you find this page helpful?