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

313
Views
createMessageComponentCollector permite solo al oponente discord.js@v13

Me esfuerzo mucho por createMessageComponentCollector (MessageButton), pero no sé qué código permitiría que el oponente pueda presionarlo solo.

alguien sabe, por favor ayúdame!

Aquí mi código:

 const filter = m => m.customId === 'accept' || 'decline' && m.author.id === member.id const collector = interaction.channel.createMessageComponentCollector({ filter: filter, max: 1, time: 30000 }); collector.on('collect', async (m) => { if (m.customId === 'accept') { await m.deferUpdate(); return await m.editReply({ content: `ACCEPT!`, embeds: [], components: [] }); } else if (m.customId === 'decline') { await m.deferUpdate(); return await m.editReply({ content: `DECLINE!`, embeds: [], components: [] }); } });
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

encontré el código

  • CÓDIGO AQUÍ:
 const filter = m => m.customId === 'accept' || 'decline' && m.member.id === member.id const collector = interaction.channel.createMessageComponentCollector({ filter: filter, max: 1, time: 30000 }); collector.on('collect', async (m) => { if (m.customId === 'accept') { await m.deferUpdate(); return await m.editReply({ content: `ACCEPT!`, embeds: [], components: [] }); } else if (m.customId === 'decline') { await m.deferUpdate(); return await m.editReply({ content: `DECLINE!`, embeds: [], components: [] }); } });
 const filter = m => m.customId === 'accept' || 'decline' && m.author.id === member.id

m.author.id use para djs@v12, pero para djs@v13 use m.member.id

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!