2
0
mirror of https://github.com/yagop/node-telegram-bot-api synced 2025-08-31 06:16:07 +00:00

src/telegram: Emit 'info' on stream from TelegramBot#getFileStream()

This commit is contained in:
GochoMugo
2017-12-08 19:25:56 +03:00
parent b968e893d3
commit 04e8b892aa
4 changed files with 32 additions and 5 deletions

View File

@@ -846,7 +846,11 @@ which returns just path to file on remote server (you will have to manually buil
### telegramBot.getFileStream(fileId, [options]) ⇒ <code>stream.Readable</code>
Return a readable stream for file.
`fileStream.path` is the specified file ID i.e. `fileId`.
`fileStream` emits event `info` passing a single argument i.e.
`info` with the interface `{ uri }` where `uri` is the URI of the
file on Telegram servers.
This method is a sugar extension of the [getFileLink](#TelegramBot+getFileLink) method,
which returns the full URI to the file on remote server.