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

179
Views
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 answers
Answer question

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 Report

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 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!