mirror of
https://github.com/yagop/node-telegram-bot-api
synced 2025-08-31 14:25:57 +00:00
doc: Add note on specifying additional Telegram query options
This commit is contained in:
14
doc/usage.md
14
doc/usage.md
@@ -129,6 +129,20 @@ const fileOptions = {
|
|||||||
bot.sendAudio(chatId, data, {}, 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>
|
<a name="sending-files-options"></a>
|
||||||
### File Options (metadata)
|
### File Options (metadata)
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user