0

I'm trying to fetch a specific user in a server with 1000+ members that Is offline, but It doesnt get It.
How i can fetch offline users in a server with 1000+ members?
My current code:

let user = client.guilds.cache.get('server id').members.cache.get('memember id') || client.guilds.cache.get('server id').members.fetch('member id')

if(user) {
   console.log('the user is in the server')
}

Thanks in advance and Sorry for bad english!

BlackdestinyXX
  • 331
  • 3
  • 17
  • 2
    Does this answer your question? [None of my discord.js guildmember events are emitting, my user caches are basically empty, and my functions are timing out?](https://stackoverflow.com/questions/64559390/none-of-my-discord-js-guildmember-events-are-emitting-my-user-caches-are-basica) – Zsolt Meszaros Dec 21 '21 at 06:43
  • Nope, I already have the members intent activated. – BlackdestinyXX Dec 21 '21 at 12:22
  • Both in your developer portal *and* listed in your client options? – Elitezen Dec 21 '21 at 14:10
  • 1
    Also, you don't need to check the cache first and then fetch, fetching first checks the cache anyway unless you pass `force: true` in its options parameter. – Viriato Dec 21 '21 at 17:20
  • @Elitezen yes, all is enabled – BlackdestinyXX Dec 21 '21 at 21:20

0 Answers0