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

153
Views
DiscordJS cannot read properties of null (reading 'status')

I have a user command and I implemented a field that shows the users status, dnd, idle and online works fine and if the user appears offline it works fine but if the user is actually offline it gives the error cannot read properties of null (reading 'status')

Code:

        const statusTypes = {
            online: '<:online:313956277808005120> Online',
            idle: '<:away:313956277220802560> Idle',
            dnd: '<:dnd:313956276893646850> Do Not Disturb',
            offline: '<:offline:313956277237710868> Offline'
        };
        // embed field
                {
                    name: 'Status',
                    value: `${statusTypes[member.presence.status]}`,
                    inline: true
                },
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!