how to edit a message by id using telegraf.js

22 views Asked by At

I'm writing a bot connecting 2 messengers, using telegraf.js. A message with a multimedia attachment was attached to Telegram from the first messenger. Next, the media is deleted (correction of this message). How can I edit this message in a telegram by turning the media message into a text message?

    await telegraf.telegram.editMessageMedia(
      telegramMessage.chat_id,
      telegramMessage.telegram_message_id,
      null,
      //{
        //type: type,
       // media: attachment.url,
        //caption: data.content,
      //}
      '',
    );

Doesn't work with empty attachment

0

There are 0 answers