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

295
Views
Getting 'TOKEN_INVALID' error on discord.js while token is acutally valid

I want to make a discord bot using javascript but when I try to run it , I get the error "[Symbol(code)]: 'TOKEN_INVALID'". I double checked to see if my token is correct and I even regenerated it for a few times but to no avail. Here is my code:

client.on("ready", () => {
  console.log(`Logged in as ${client.user.tag}!`);
  client.login(process.env.CLIENT_TOKEN); 

And here is my .env file:

CLIENT_TOKEN='token'

Note: Im new to javascript so try to explain it noob friendly please.

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!