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

133
Views
discord-modals TypeError: no se pueden leer las propiedades de undefined (leyendo 'EFÍMERO')

Estoy usando el paquete discord-modals para crear mejores modales con mi bot discord.

Cuando quiero responder a SlashCommandInteraction (en realidad es el evento de escucha modalResponse ), entonces no puedo hacer que la respuesta sea efímera. Cuando elimino el bool ephemeral , funciona perfectamente. Pero no entiendo por qué no funciona con una acción de respuesta normal.

 await event.reply({content: `${replymsg}`, ephemeral: true});

Entonces, si uso esto, obtengo el siguiente error:

 TypeError: Cannot read properties of undefined (reading 'EPHEMERAL') at ModalSubmitInteraction.reply (C:\Users\david_h7tqe3i\WebstormProjects\musicbottest\node_modules\discord-modals\src\v14\interfaces\InteractionResponses.js:51:57) at processTicksAndRejections (node:internal/process/task_queues:96:5) at async Client.<anonymous> (C:\Users\david_h7tqe3i\WebstormProjects\musicbottest\src\index.js:107:9) Emitted 'error' event on Client instance at: at emitUnhandledRejectionOrErr (node:events:384:10) at processTicksAndRejections (node:internal/process/task_queues:85:21) Process finished with exit code 1

Y si uso el siguiente código, funciona:

 await event.reply({content: `${replymsg}`});
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Hay un error en discord-modals . Utiliza MessageFlags.FLAGS.EPHEMERAL , pero MessageFlags.FLAGS no está undefined . Para una solución rápida, puede editar node_modules/discord-modals/src/v14/interfaces/InteractionResponses.js y reemplazar en la línea 51

 data.flags = options.ephemeral ? MessageFlags.FLAGS.EPHEMERAL : undefined;

con

 data.flags = options.ephemeral ? MessageFlags.Ephemeral : undefined;

También abrí un PR , con suerte, el mantenedor lo aceptará pronto.

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!