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

84
Views
messageReactionAdd no se activa a pesar de la configuración adecuada Discord.js

Todo el archivo a continuación. He estado intentando durante una cantidad de tiempo impío hacer que funcione un comando de roles de reacción. Actualmente uso MongoDB y todo está configurado correctamente, no hay errores, mi esquema ha funcionado correctamente y no hay problemas. A pesar de que todo funciona, no puedo hacer que mi evento se active en absoluto con múltiples revisiones. Cualquier ayuda sería fenomenal en este caso, ya que soy demasiado nuevo en todo esto para resolverlo por mí mismo...

 const Schema = require('../reactions'); const Discord = require('discord.js'); const { client, intents } = require('..') module.exports = { name: 'messageReactionAdd', run: async (reaction, message, user) => { if (reaction.message.partial) await reaction.message.fetch(); if (reaction.partial) await reaction.fetch(); const { guild } = reaction.message; if (!guild) return; if (!guild.me.permissions.has("MANAGE_ROLES")) return; isEmoji = function(emoji) { const e = Discord.Util.parseEmoji(emoji); if (e.id === null) { return { name: e.name, id: e.id, animated: e.animated, response: false } } else { return { name: e.name, id: e.id, animated: e.animated, response: true } } } const member = guild.members.cache.get(user.id); await Schema.findOne({ guild_id: guild.id, msg_id: reaction.message.id }, async (err, db) => { if (!db) return; if (reaction.message.id != db.msg_id) return; const data = db.rcs; for (let i in data) { if (reaction.emoji.id === null) { if (reaction.emoji.name === data[i].emoji) { member.roles.add(data[i].roleId, ['reaction role']).catch(err => console.log(err)); } } else { if (reaction.emoji.id === data[i].emoji) { member.roles.add(data[i].roleId, ['reaction role']).catch(err => console.log(err)); } } } }); }, };```
about 4 years ago · Santiago Gelvez
1 answers
Answer question

0

intenciones

Necesita GUILD_MESSAGE_REACTIONS en su cliente

about 4 years ago · Santiago Gelvez 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!