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

182
Vistas
Telegram bot for poll. Keyboard (Node.js)

I am writing a telegram-bot-questionnaire. There was a problem with the keyboard, namely with one button. And the text of the button after clicking on it, for some reason I send to the chat. How to make a bot send a message immediately after pressing a button? Please tell me how to solve this problem?

if (text === '/start') {
await bot.sendMessage(msg.chat.id, 'message 1')
await bot.sendMessage(msg.chat.id, 'message 2', {
  reply_markup: {
    keyboard: [
      [{
        text: 'event 1'
      }]
    ]
  }
})

if ('event 1') {
  await bot.sendMessage(msg.chat.id, "message 3")
  await bot.sendMessage(msg.chat.id, "message 4", {
    reply_markup: {
      keyboard: [
        [{
          text: 'event 2'
        }]
      ]
    }
  })
}

}

about 4 years ago · Juan Pablo Isaza
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