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

163
Views
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 answers
Answer question

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 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!