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

169
Visualizações
About discord.js V13 start all Intents

The thing is like this, I try to upgrade my original robot to V13 , So I decided to rewrite the bot.

I don’t know how to get all Intents at once I tried Intents.all but it didn't work this is my code

const { Client, Intents, MessageEmbed } = require('discord.js');
const client = new Client({ intents: [Intents.FLAGS.GUILDS] });
const cofing = require("./cofig.json");

client.on('ready', () => {
    console.log("================");
    console.log("|i am ready|");
    console.log("================");
});

  client.on('message', async message => {
 if(message.content === 'test'){
     console.log("test")
 } 
});
client.login(cofing.token);

If you could tell me how to write this, I would be very grateful

about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

First of all: There is a small error in your message event (client.on('message', ... )), it's no longer 'message', but 'messageCreate' in v13, so keep in mind u have to update that.

About the intents: If you would like to use all intents (which I don't recommend), you can define all the intents in one intent via a Bitfield, you do this with the following code:

const allIntents = new Intents(32767);
const client = new Client({ intents: allIntents });

FYI: First in the beginning of v13 there was a flag called ALL (Intents.FLAGS.ALL), but that was removed afterwards, so this is the alternative to it.

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