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

198
Views
Cuando edito mi inserción, se envían argumentos incorrectos

El comando debería ser así:

Yo - "! nota"

Robot - "Pregunta 1"

Yo - "Respuesta"

Bot: (envía incrustaciones a un canal específico con la primera respuesta como título)

Robot - "Pregunta 2"

Yo - "Respuesta 2"

Bot - (Edita la inserción y agrega una descripción con la segunda respuesta)

Código:

 module.exports = { name: 'note', description: 'Note', async execute(client, message, args, Discord) { let filter = m => m.author.id === message.author.id message.channel.send(`Question 1`) let collected = await message.channel.awaitMessages({ filter, max: 1, time: 10000, errors: ['time'] }); let answer = collected.first(); let embed = new Discord.MessageEmbed() .setTitle(`${answer}`) .setDescription(`No second answer yet`) const notechannel = client.channels.cache.get("<channel id>") const sent = await notechannel.send({embeds:[embed]}) await message.channel.send(`Second question - **${answer}**?`) let collected2 = await message.channel.awaitMessages({ filter, max: 1, time: 10000, errors: ['time'] }); let answer2 = collected.first(); let embed2 = new Discord.MessageEmbed() .setTitle(`${answer}`) .setDescription(`${answer2}`) sent.edit({embeds:[embed2]}) } }

Ahora, todo funciona bien excepto la última parte. Cuando respondo la segunda pregunta, el bot edita la inserción, pero edita la descripción con la primera respuesta, no con la segunda. ¿Hay una manera de resolver esto?

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!