Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

181
Vistas
how can i make a bot status with member counter?

i wanted to set a member counter status for my bot the code is:

client.on('ready', () => {
    setInterval(() => {
      targetGuild = client.guilds.cache.get('I Pasted my Guild ID Here')
      if(targetGuild) {
          client.user.setPresence({ game: { name: targetGuild.memberCount + 'Members', type: 'WATCHING' }, status: 'online'  })
                .then(console.log)
                .catch(console.error);
      }
    }, 1000 * 60 * 5);

});

And the error is:

client.user.setPresence(...).then is not a function
about 4 years ago · Juan Pablo Isaza
2 Respuestas
Responde la pregunta

0

In discord.js v13, setPresence returns a ClientPresence, not a Promise as in v12, so there is no .then() method.

about 4 years ago · Juan Pablo Isaza Denunciar

0

If you are using djs v13 you need to use:

client.user.setPresence({ 
activities: [{ name: `${targetGuild.memberCount} Members`, type: 'WATCHING' }], 
status: 'online'
})

And also there is no .then() method because in discord.js v13 setPresence doesn't return a Promise but ClientPresence

about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda