Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

319
Visualizações
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 Respostas
Responde à pergunta

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 Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda