Estoy escribiendo un telegrama-bot-cuestionario. Hubo un problema con el teclado, es decir, con un botón. Y el texto del botón después de hacer clic en él, por alguna razón lo envío al chat. ¿Cómo hacer que un bot envíe un mensaje inmediatamente después de presionar un botón? Por favor, dígame cómo resolver este problema.
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' }] ] } }) }}