Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

228
Views
¿Cómo implementar correctamente el reenvío de un mensaje de un bot a un canal de Telegram?

tengo un error No entiendo cómo reenviar un mensaje de un bot de Telegram a un canal. Uso telegraf.js Después de enviar el primer mensaje, quiero enviar el segundo y el primero se reenvía. La primera foto son las respuestas en el bot. La segunda foto es lo que entra en el canal.

El código en sí que implementé:

 bot.on('message', async (ctx) => { const getFilmId = await kinoInfo(ctx.message.text); const infoFilm = getFilmId.data.data; const id = infoFilm.filmId; const name = infoFilm.nameRu; ctx.reply(name, { reply_markup: { inline_keyboard: [ [{ text: `Watch`, url: 'https://www.instagram.com/' }], [{ text: 'Telegram channel 1', callback_data: 'ONE' }], ], }, }); bot.on('callback_query', (ctx) => { const data = ctx.update.callback_query.data; if (data === 'ONE') { postToChannel(ctx); } }); const postToChannel = (ctx) => { ctx.telegram.sendMessage('@fgdsfsdfsd', name, { parse_mode: 'html', reply_markup: { inline_keyboard: [[{ text: `Watch`, url: 'https://www.instagram.com/' }]], }, }); }; });

Primera foto

Segunda foto

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

utilice el método ForwardMessage() en la función postToChannel . y especifique message_id . Tengo una solución funcional para esto. ¡de nada!

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!