Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

167
Vistas
Get the message id of a message a bot sent in response

I don't have any code to share as I am just stumped. I know how to get the message id of the message a user sent; for example, if I did !test, I could do message.id to get that id.

But I want to get the id of the message a bot replied with, so if I did !test and a bot replied with "working", I want to get the id of that "working" message. Any ideas?

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

You can wait for the message to be sent and grab its ID. send() returns the message, so the following will work:

client.on('messageCreate', async (message) => {
  if (message.author.bot) return;
  let sentMessage = await message.channel.send('It works');
  console.log(sentMessage.id);
});
about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda