Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

263
Visualizações
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 Respostas
Responde à pergunta

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 Relatório

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 Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda