Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

207
Visualizações
Replying to a specific msg in telegraf framework

I'm making a telegram bot with telegraf frame work ( it means Node.js ) So I want when someone send good morning The bot will reply to his own msg, I searched alot but i didn't find the answer

Example:- I want the reply to be like this

enter image description here

about 4 years ago · Juan Pablo Isaza
2 Respostas
Responde à pergunta

0

The documentation for telegraf is here: https://www.npmjs.com/package/telegraf

From what I have read, this should work:

const { Telegraf } = require('telegraf')

const bot = new Telegraf(process.env.BOT_TOKEN)
bot.hears('good morning', (ctx) => ctx.reply('Good morning to you too!'))
bot.launch()

// Enable graceful stop
process.once('SIGINT', () => bot.stop('SIGINT'))
process.once('SIGTERM', () => bot.stop('SIGTERM'))

This is edited code from the first example in the docs.

about 4 years ago · Juan Pablo Isaza Relatório

0

You can do something like

bot.command(key, (ctx) => {
    ctx.reply('A Reply', {
        reply_to_message_id: ctx.message.message_id
    })
})
about 4 years ago · Juan Pablo Isaza Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda