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

311
Views
Discord.js v13 ¿Hay alguna forma de crear roles de reacción con emojis?

Estoy tratando de crear un comando que lo haga y una inserción que luego reaccione con un emoji. Si alguien hace clic en el emoji, agrega un rol, si elimina su reacción, entonces se elimina el rol. Sé cómo crear la inserción y reaccionar con el emoji, solo necesito el código que podría funcionar.

He intentado:

 const filter = (reaction, user) => { return reaction.emoji.name === '✅' && user.id === message.author.id; }; const collector = confirmation.createReactionCollector({filter}); collector.on('collect', async(reaction, user) => { const role = await message.guild.roles.fetch("916861450281156678"); message.guild.members.fetch(user.id).then(member => { member.roles.add(role); member.roles.remove("916929706182459392"); }); });

sin embargo, el ReactionCollector regresa con TypeError: Cannot read properties of undefined (reading 'createReactionCollector') por lo que no estoy seguro de cuál es el problema. Como referencia, aquí está el código de inserción.

 const { MessageEmbed } = require('discord.js'); module.exports = { name: 'rules', description: 'Server Rules', permission: "ADMINISTRATOR", async execute(message) { const rulemebed = new MessageEmbed() .setColor('#ffc7fe') .setTitle('Server Rules') .setDescription('Please click the check mark ✅ to verfiy that you read the rules and gain access to other channels') .setFooter('Abusing loop holes will result in fair punishment ') .addFields( {name: '#1', value:'...',}, ); const confirmation = await message.channel.send({ embeds: [rulemebed] }).then((sentMessage) => { sentMessage.react("✅"); });

en lo que basé al coleccionista

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!