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

559
Vistas
How to use editMessageText with the Telegraf framework?

I have to edit a message when an inline button is pressed. Here is my code:

bot.action("option2", (ctx) => {
  ctx.answerCbQuery();

  bot.telegram.editMessageText(
    ctx.update.callback_query.message.chat.id,
    ctx.update.callback_query.message.message_id,
    `Hello`
  );
});

I'm getting the error:

{
  response: {
    ok: false,
    error_code: 400,
    description: 'Bad Request: message text is empty'  
  },
  on: {
    method: 'editMessageText',
    payload: {
      text: undefined,
      chat_id: 'Hello',
      message_id: { chat_id: -684957676, message_id: 578 },
      inline_message_id: undefined
    }
  }
}

I'm using the Telegraf framework

I believe that I don't understand the order in which I should pass arguments.

How do I use the editMessageText?

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

0

You don't have to make it complex this way.

Just do this:

ctx.editMessageText('Hello')
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