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

252
Views
Discord.js v13 , Read status of users and give/remove role

So it returns the error cannot read properties of .includes and idk whats wrong (v13 djs) can someone help and explain?

client.on('presenceUpdate', async (oldPresence, newPresence) => {
            const role = newPresence.guild.roles.cache.get('915254184046100540');
            const member = newPresence.member;
            const activities = member.presence.activities[0];
            
            if (activities && (activities.state.includes('Hi'))) {
                return newPresence.member.roles.add(role);
            }
            else if (member.roles.cache.get(role.id)) {
                newPresence.member.roles.remove(role);
            }
          });
about 4 years ago · Juan Pablo Isaza
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!