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

168
Views
No puedo responder o reaccionar al mensaje recopilado. Discordia.js V13

Por lo tanto, quería agregar el comando /custom y después de eso, el usuario ingresaría sus apodos a través de mensajes. El bot debe verificar si su apodo está en el juego (función asíncrona checkIfSummonerExist(m) ) y si existe, el bot debe recopilar su nombre y datos y enviarlos a la matriz (función asíncrona getSummonerProfile(m.content) ). Ahora quería agregar reacciones de bot a esos mensajes, si existe un apodo, debería agregar una reacción (por ejemplo, pulgar hacia arriba), y si el nombre no existe, uno debería agregar un pulgar hacia abajo. Así que probé con m.react(), pero no funciona. También probé con m.reply("User approved") pero no recibo respuesta. Soy nuevo en hacer discord bot.

 const { SlashCommandBuilder } = require("@discordjs/builders"); const { getSummonerProfile } = require("./../functions/summonerData"); const { calculateRank } = require("./../functions/calculateRank"); let arrayOfSummoners = []; async function checkIfSummonerExist(m) { const test = await getSummonerProfile(m.content); if (test) { return true; } else { return false; } } module.exports = { data: new SlashCommandBuilder() .setName("custom") .setDescription( "Enter the name of the user." ), async execute(interaction) { await interaction.deferReply(); // `m` is a message object that will be passed through the filter function const filter = (m) => checkIfSummonerExist(m); const collector = interaction.channel.createMessageCollector({ filter, time: 15000, }); collector.on("collect", (m) => { m.reply('User approved'); m.react('😄'); arrayOfSummoners.push(getSummonerProfile(m.content)); }); collector.on("end", (collected) => { // return interaction.editReply(`Collected ${collected.size} items`); // calculateRank(arrayOfSummoners); }); // return interaction.editReply(); }, };
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!