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

130
Views
¿Por qué mi bot de Discord solo busca usuarios en línea?

Creé un bot Discord simple en Node.js. He habilitado los intentos de GUILD_MEMBERS y GUILD_PRESENCES , pero cuando intento recuperar a todos los miembros, solo regresan los miembros en línea.

 import { Client } from "discord.js"; const client = new Client({intents: ["GUILDS","GUILD_MESSAGES","GUILD_MEMBERS","GUILD_MESSAGE_REACTIONS", "GUILD_PRESENCES"]}); const guildId = '<guild_id>'; client.on("ready", async () => { console.log(`logged in as ${client.user.tag}`); const guild = await client.guilds.fetch(guildId); const members = await guild.members.fetch(); members.forEach(member => console.log(member.displayName); });

Salida, con mi cuenta principal en línea y mi alt fuera de línea:

 logged in as bot1#tagg mainaccount bot1

Salida, con mi cuenta principal online y mi alt online:

 logged in as bot1#tagg mainaccount altaccount bot1

Y cuando cambio el registro a console.log(member.presence.status) , el resultado es

 logged in as bot1#tagg online online online

Como puede ver, estoy buscando a todos los miembros y registrando sus nombres para mostrar. Actualmente tengo mi cuenta principal, mi cuenta alternativa y la cuenta bot en el servidor, pero solo registra los nombres de los miembros que están actualmente en línea. ¿Por qué es esto y cómo puedo solucionarlo?

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