node-telegram-bot-api icon indicating copy to clipboard operation
node-telegram-bot-api copied to clipboard

sendAnimation() with stream as source

Open shevernitskiy opened this issue 3 years ago • 0 comments

Bug Report

I have read:

I am using the latest version of the library.

Expected Behavior

Pass the stream with gif data to sendAnimation() method and get gif animation in chat.

Actual Behavior

When i used sendAnimation() method with stream as source, gif appeard in chat like file with filename name. I can't pass any file options to this method, like i doing in other methods (sendAudio() for exmaple)

Steps to reproduce the Behavior

I recieve stream with axios and then try to use sendAnimation() method

axios.get(url, { responseType: 'stream' }).then((res) => {
  bot.sendVideo(msg.chatId, res.data as Stream)
})

shevernitskiy avatar May 12 '22 09:05 shevernitskiy