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

311
Visualizações
How do I fix CLIENT_MISSING_INTENTS error?

I started learning about discord.js but now I am facing this issue. I tried some googling but couldn't manage to fix it.

const Discord = require('discord.js');
// const Discord = require('discord.js');

// using Intents class
const client = new Discord.Client();

client.on('message', (msg) => {
  // Send back a reply when the specific command has been written by a user.
  if (msg.content === '!hello') {
    msg.reply('Hello World!');
  }
});

client.login('my_token');

This is the error I am getting:

enter image description here

over 4 years ago · Santiago Trujillo
5 Respostas
Responde à pergunta

0

client = new Discord.Client({intents: 32767})
over 4 years ago · Santiago Trujillo Relatório

0

Add Intents.

const { Client, Intents } = require('discord.js');
// Create a new client instance
const client = new Client({ intents: [Intents.FLAGS.GUILDS] });

You can also use the template available on discordJS docs. docs

over 4 years ago · Santiago Trujillo Relatório

0

You need to update your node to V16 just search node.js in google and go in their offical site, download the setup from there and install it!

over 4 years ago · Santiago Trujillo Relatório

0

You can instead just degrade discord.js version by typing this into shell:

npm i discord.js@12.5.3

The latest discord.js version doesn't function very good so I use v12 - no complicated script.

over 4 years ago · Santiago Trujillo Relatório

0

You need to specify the events which you want your bot to receive using gateway intents.

Instead of

const client = new Discord.Client();

Use

const client = new Discord.Client({ intents: [Enter intents here] })

For example

const client = new Discord.Client({ intents: ["GUILDS", "GUILD_MESSAGES"] })

Here's another useful link: https://discord.com/developers/docs/topics/gateway

over 4 years ago · Santiago Trujillo 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