Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

273
Views
Discord.JS: Bot won't stay online, client.once code is stuck

I've been recently having issues pop up with my Discord.js bot hosted on repl.it (link is https://replit.com/@anonymouspers27/discordbot#central.js)

The bot worked fine for months. But suddenly, the bot essentially refuses to run. Every time I run npm start, the bot gets stuck on the following code:

(line 31, central.js)

client.once('ready', () => {
    console.log('JToH Bot has logged in (loginsuccesful = true)')
});

Now, this section of the code just stopped working. The client is always jut stuck. I've tried basically everything I could find, such as trying to update the code (as it hadn't been updated for a while), but even when I did that, the same problems arised. Nothing has worked so far, and no errors appear in the console, which makes this issue much harder to research on.

I'm positive that the issue must be the code becoming outdated, which I am completely unaware of. I still haven't been able to pinpoint any other spots in the code that causes this problem.

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!