N
N
Nikita Stechkin2021-10-24 01:42:19
API
Nikita Stechkin, 2021-10-24 01:42:19

How to send multiple messages to telegram bot api?

Hello. I am writing a bot on node js with the telegraf framework. The bot needs to send a text message and a photo when writing a certain command. When I run it on my home computer, the bot sends them, but when uploaded to aws, it only sends the first message. I tried to set the delay using setTimeout, but it did not help

bot.command("text",  async (ctx) => {
    
  await ctx.replyWithPhoto({source: "https://example.com"});

  return ctx.reply("text" );
});

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question