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

254
Views
Vs code, no autocomplete with javascript (discord.js)

So I've been working with discord.js for a little while but whenever I type any discord related function/object, the intellisense proposition are totally unrelated or straight up missing. It's quite annoying and couldn't find why. Though it seems to work in the main file (index.js)

otherfile.js:

enter image description here

index.js:

enter image description here

What could the problem be?

about 4 years ago · Juan Pablo Isaza
2 answers
Answer question

0

I had the exact same problem. What fixed it for me? Actually switching to TypeScript. I set the client Type, to Client from discord.js, and now it is working. I know, it is not the easiest fix, but for sure one that works.

about 4 years ago · Juan Pablo Isaza Report

0

This should pretty much fix the issue

In other files, try adding this piece of code

const { Client } = require("discord.js")

module.exports = {
/**
  * 
  * @param {Client} client
  */
}

You can import other classes like Message with the respective paramater (for eg: message).

If you're still confused, type client. and press CTRL + SPACEBAR at the same time. This will bring the drop down menu of options.

about 4 years ago · Juan Pablo Isaza Report
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!