node-telegram-bot-api
node-telegram-bot-api copied to clipboard
sendAnimation() with stream as source
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)
})