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

315
Vistas
Cannot get presence informations even thought developer portal switches are enabled discord.js

I have my code here :

// ...
    run: (client,message,args) =>{
        let member = message.member
        console.log(member.presence) // null
        if(!member.presence) return message.say(`${n} - I cannot access **${member.nickname || member.user.tag}**'s presence.`)
        if(!member.presence.activities[0]) return message.reply(`${n} - No activity detected from \`${member.user.tag} !\``)
        message.reply('Informations logged on the console.')
        console.log(member.presence)
    }

I keep having my bot sending this :

No activity detected

After having checked if other people got the same issue I only saw people who didn't activated the following check boxes :

The switches

The thing is I already did and no matter how many times I rerun my bot, member.presence keeps being null and I can't understand why.

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

Okay so I've been checking around a little more and I found out it's just because I didn't put GUILD_PRESENCES in my intents, silly me.

I just had to change this

const client = new Discord.Client({
  intents : [
    "GUILDS",
    "GUILD_MEMBERS",
    "GUILD_MESSAGES"
  ]
})

to this :

const client = new Discord.Client({
  intents : [
    "GUILDS",
    "GUILD_MEMBERS",
    "GUILD_MESSAGES",
    "GUILD_PRESENCES"
  ]
})

And restarting my bot fixed it all!

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