2
0
mirror of https://github.com/yagop/node-telegram-bot-api synced 2025-08-30 13:58:27 +00:00

doc: Add note on specifying additional Telegram query options

This commit is contained in:
GochoMugo 2017-12-11 18:32:19 +03:00
parent 4051117ed0
commit d7197998dd
No known key found for this signature in database
GPG Key ID: 7B6A01CB57AA39E4

View File

@ -129,6 +129,20 @@ const fileOptions = {
bot.sendAudio(chatId, data, {}, fileOptions);
```
**NOTE:** You **MUST** provide an empty object (`{}`) in place of
*Additional Telegram query options*, if you have **no** query options
to specify. For example,
```js
// WRONG!
// 'fileOptions' will be taken as additional Telegram query options!!!
bot.sendAudio(chatId, data, fileOptions);
// RIGHT!
bot.sendAudio(chatId, data, {}, fileOptions);
```
<a name="sending-files-options"></a>
### File Options (metadata)