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
¿Cómo obtengo el estado personalizado de un usuario? discord.js versión 13

Estoy creando un bot y quiero crear un comando de status que básicamente muestre el estado personalizado de un usuario. Intenté hacer interaction.member.activities.find(a => a.type === 'CUSTOM_STATUS').state pero dice que no puede leer find .

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Es porque no hay una propiedad member.activities . Es member.presence.activities y su type no puede ser CUSTOM_STATUS . Es uno de PLAYING , STREAMING , LISTENING , WATCHING , CUSTOM , COMPETING , por lo que deberá encontrar CUSTOM :

 let activity = interaction.member.presence?.activities.find( (a) => a.type === 'CUSTOM' ) console.log(activity?.state)

PD: asegúrese de que la intención GUILD_PRESENCES esté habilitada (es decir, agregue Intents.FLAGS.GUILD_PRESENCES a la matriz de intents de su client ). Sin ese miembro, la member.presence será null .

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!