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

168
Views
UnhandledPromiseRejectionWarning: TypeError: No se puede leer la propiedad 'guildes' de Discord.js indefinido

¿Pueden ayudarme? Solo necesito cambiar el estado del bot cada 10 segundos. Aquí está el código.

 const mySecret = process.env['token'] const Discord = require('discord.js') const client = new Discord.Client(); client.on('ready', () => { console.log(`Discord.js: Ready on: ${client.user.tag} ✅`) const activitives = [ `${this.client.guildes.cache.size} servers!`, `${this.client.channels.cache.size} channels!`, `${this.client.guildes.cache.reduce((a,b) => a + b.memberCount, 0)} users!`, ]; let i = 0 setInterval(() => this.client.user.serActivity(`?bhelp |${activities[i++ % activities.length]}`, { type : 'LISTENING'}), 20); })
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

De acuerdo, en primer lugar, su guild no es gremio también, tienes que eliminar la función guildes .this y redefinir el código para que logres lo que quieres

 const Discord = require('discord.js') const client = new Discord.Client(); client.on('ready', () => { console.log(`Discord.js: Ready on: ${client.user.tag} ✅`) const activities= [ `${client.guilds.cache.size} servers!`, `${client.channels.cache.size} channels!`, `${client.users.cache.size} users!`, ]; setInterval(() => { const index = Math.floor(Math.random() * (activities.length - 1) + 1); client.user.setActivity(`?bhelp | ${activities[index]}); }, 10000);

Esto debería ser más o menos porque su lógica y su código eran casi perfectos, solo algunos errores tipográficos y funciones mal utilizadas que arreglé.

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!