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

350
Views
Discord JS - DiscordAPIError: mensaje desconocido

me sale un error:

 DiscordAPIError: Unknown Message at RequestHandler.execute (D:\Programming\Discord Bot\node_modules\discord.js\src\rest\RequestHandler.js:298:13) at processTicksAndRejections (node:internal/process/task_queues:96:5) at async RequestHandler.push (D:\Programming\Discord Bot\node_modules\discord.js\src\rest\RequestHandler.js:50:14) at async MessageManager.delete (D:\Programming\Discord Bot\node_modules\discord.js\src\managers\MessageManager.js:205:5) at async Message.delete (D:\Programming\Discord Bot\node_modules\discord.js\src\structures\Message.js:741:5) at async AudioPlayer.<anonymous> (D:\Programming\Discord Bot\src\commands\next.js:44:21) { method: 'delete', path: '/channels/888095042437259287/messages/909879363472855080', code: 10008, httpStatus: 404, requestData: { json: undefined, files: [] } }

al intentar eliminar anterior. mensaje como este:

 await client.message.channel.send({ content: `Song "${client.currentSong}" is playing`, components: [row], }) .then(message => { client.player.on(AudioPlayerStatus.Idle, async () => { await message.delete(); }); });

Este código se ejecuta a través de un código de evento más:

 client.player.on(AudioPlayerStatus.Idle, () => { if (!client.loop) client.playlist.shift(); if (client.playlist.length === 0) return; next.run(client.message, client.args, client); });

Por que no funciona?

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Está creando un detector de eventos infinito, lo que significa que cada vez que el reproductor de audio esté inactivo, intentará eliminar el mensaje (incluso si ya se eliminó). client.player.once para que el oyente se elimine la primera vez.

 .then(message => { client.player.once(AudioPlayerStatus.Idle, async () => { await message.delete(); }); })
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!