Skip to content

Commit 8208490

Browse files
committed
doc: update docs
1 parent a29bb36 commit 8208490

File tree

2 files changed

+15
-15
lines changed

2 files changed

+15
-15
lines changed

doc/api.md

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ TelegramBot
6161
* [.sendChecklist(businessConnectionId, chatId, checklist, [options])](#TelegramBot+sendChecklist) ⇒ <code>Promise</code>
6262
* [.sendDice(chatId, [options])](#TelegramBot+sendDice) ⇒ <code>Promise</code>
6363
* [.sendChatAction(chatId, action, [options])](#TelegramBot+sendChatAction) ⇒ <code>Promise</code>
64-
* [.setMessageReaction(chatId, messageId, [options])](#TelegramBot+setMessageReaction) ⇒ <code>[ &#x27;Promise&#x27; ].&lt;Boolean&gt;</code>
64+
* [.setMessageReaction(chatId, messageId, [options])](#TelegramBot+setMessageReaction) ⇒ <code>Promise.&lt;Boolean&gt;</code>
6565
* [.getUserProfilePhotos(userId, [options])](#TelegramBot+getUserProfilePhotos) ⇒ <code>Promise</code>
6666
* [.setUserEmojiStatus(userId, [options])](#TelegramBot+setUserEmojiStatus) ⇒ <code>Promise</code>
6767
* [.getFile(fileId, [options])](#TelegramBot+getFile) ⇒ <code>Promise</code>
@@ -161,7 +161,7 @@ TelegramBot
161161
* [.setGameScore(userId, score, [options])](#TelegramBot+setGameScore) ⇒ <code>Promise</code>
162162
* [.getGameHighScores(userId, [options])](#TelegramBot+getGameHighScores) ⇒ <code>Promise</code>
163163
* [.deleteMessage(chatId, messageId, [options])](#TelegramBot+deleteMessage) ⇒ <code>Promise</code>
164-
* [.deleteMessages(chatId, messageIds, [options])](#TelegramBot+deleteMessages) ⇒ <code>[ &#x27;Promise&#x27; ].&lt;Boolean&gt;</code>
164+
* [.deleteMessages(chatId, messageIds, [options])](#TelegramBot+deleteMessages) ⇒ <code>Promise.&lt;Boolean&gt;</code>
165165
* [.getAvailableGifts([options])](#TelegramBot+getAvailableGifts) ⇒ <code>Promise</code>
166166
* [.sendGift(giftId, [options])](#TelegramBot+sendGift) ⇒ <code>Promise</code>
167167
* [.giftPremiumSubscription(userId, monthCount, starCount, [options])](#TelegramBot+giftPremiumSubscription) ⇒ <code>Promise</code>
@@ -188,7 +188,7 @@ TelegramBot
188188
* [.deleteStory(businessConnectionId, storyId, [options])](#TelegramBot+deleteStory) ⇒ <code>Promise</code>
189189
* _static_
190190
* [.errors](#TelegramBot.errors) : <code>Object</code>
191-
* [.messageTypes](#TelegramBot.messageTypes) : <code>[ &#x27;Array&#x27; ].&lt;String&gt;</code>
191+
* [.messageTypes](#TelegramBot.messageTypes) : <code>Array.&lt;String&gt;</code>
192192

193193
<a name="new_TelegramBot_new"></a>
194194

@@ -209,7 +209,7 @@ Emits `message` when a message arrives.
209209
| [options.polling.autoStart] | <code>Boolean</code> | <code>true</code> | Start polling immediately |
210210
| [options.polling.params] | <code>Object</code> | | Parameters to be used in polling API requests. See https://core.telegram.org/bots/api#getupdates for more information. |
211211
| [options.polling.params.timeout] | <code>Number</code> | <code>10</code> | Timeout in seconds for long polling. |
212-
| [options.polling.params.allowed_updates] | <code>Array</code> \| <code>String</code> | | A JSON-serialized list of the update types you want your bot to receive. For example, specify ["message", "edited_channel_post", "callback_query"] to only receive updates of these types. |
212+
| [options.polling.params.allowed_updates] | <code>Array.&lt;String&gt;</code> \| <code>String</code> | | A JSON-serialized list of the update types you want your bot to receive. For example, specify ["message", "edited_channel_post", "callback_query"] to only receive updates of these types. |
213213
| [options.webHook] | <code>Boolean</code> \| <code>Object</code> | <code>false</code> | Set true to enable WebHook or set options |
214214
| [options.webHook.host] | <code>String</code> | <code>&quot;0.0.0.0&quot;</code> | Host to bind to |
215215
| [options.webHook.port] | <code>Number</code> | <code>8443</code> | Port to bind to |
@@ -601,7 +601,7 @@ If some of the specified messages can't be found or forwarded, they are skipped.
601601
| --- | --- | --- |
602602
| chatId | <code>Number</code> \| <code>String</code> | Unique identifier for the target chat or username of the target channel (in the format `@channelusername`) or username of the target channel (in the format `@channelusername`) |
603603
| fromChatId | <code>Number</code> \| <code>String</code> | Unique identifier for the chat where the original message was sent (or channel username in the format `@channelusername`) |
604-
| messageIds | <code>[ &#x27;Array&#x27; ].&lt;(Number\|String)&gt;</code> | Identifiers of 1-100 messages in the chat from_chat_id to forward. The identifiers must be specified in a strictly increasing order. |
604+
| messageIds | <code>Array.&lt;(Number\|String)&gt;</code> | Identifiers of 1-100 messages in the chat from_chat_id to forward. The identifiers must be specified in a strictly increasing order. |
605605
| [options] | <code>Object</code> | Additional Telegram query options |
606606

607607
<a name="TelegramBot+copyMessage"></a>
@@ -994,14 +994,14 @@ Use this method when you need to tell the user that something is happening on th
994994

995995
<a name="TelegramBot+setMessageReaction"></a>
996996

997-
### telegramBot.setMessageReaction(chatId, messageId, [options]) ⇒ <code>[ &#x27;Promise&#x27; ].&lt;Boolean&gt;</code>
997+
### telegramBot.setMessageReaction(chatId, messageId, [options]) ⇒ <code>Promise.&lt;Boolean&gt;</code>
998998
Use this method to change the chosen reactions on a message.
999999
- Service messages can't be reacted to.
10001000
- Automatically forwarded messages from a channel to its discussion group have the same available reactions as messages in the channel.
10011001
- In albums, bots must react to the first message.
10021002

10031003
**Kind**: instance method of [<code>TelegramBot</code>](#TelegramBot)
1004-
**Returns**: <code>[ &#x27;Promise&#x27; ].&lt;Boolean&gt;</code> - True on success
1004+
**Returns**: <code>Promise.&lt;Boolean&gt;</code> - True on success
10051005
**See**: https://core.telegram.org/bots/api#setmessagereaction
10061006

10071007
| Param | Type | Description |
@@ -2419,7 +2419,7 @@ Note: No more than 50 results per query are allowed.
24192419
| Param | Type | Description |
24202420
| --- | --- | --- |
24212421
| inlineQueryId | <code>String</code> | Unique identifier of the query |
2422-
| results | <code>[ &#x27;Array&#x27; ].&lt;InlineQueryResult&gt;</code> | An array of results for the inline query |
2422+
| results | <code>Array.&lt;InlineQueryResult&gt;</code> | An array of results for the inline query |
24232423
| [options] | <code>Object</code> | Additional Telegram query options |
24242424

24252425
<a name="TelegramBot+answerWebAppQuery"></a>
@@ -2642,17 +2642,17 @@ Use this method to delete a message, including service messages, with the follow
26422642

26432643
<a name="TelegramBot+deleteMessages"></a>
26442644

2645-
### telegramBot.deleteMessages(chatId, messageIds, [options]) ⇒ <code>[ &#x27;Promise&#x27; ].&lt;Boolean&gt;</code>
2645+
### telegramBot.deleteMessages(chatId, messageIds, [options]) ⇒ <code>Promise.&lt;Boolean&gt;</code>
26462646
Use this method to delete multiple messages simultaneously. If some of the specified messages can't be found, they are skipped.
26472647

26482648
**Kind**: instance method of [<code>TelegramBot</code>](#TelegramBot)
2649-
**Returns**: <code>[ &#x27;Promise&#x27; ].&lt;Boolean&gt;</code> - True on success
2649+
**Returns**: <code>Promise.&lt;Boolean&gt;</code> - True on success
26502650
**See**: https://core.telegram.org/bots/api#deletemessages
26512651

26522652
| Param | Type | Description |
26532653
| --- | --- | --- |
26542654
| chatId | <code>Number</code> \| <code>String</code> | Unique identifier for the target chat or username of the target channel (in the format @channelusername) |
2655-
| messageIds | <code>[ &#x27;Array&#x27; ].&lt;(Number\|String)&gt;</code> | Identifiers of 1-100 messages to delete. See deleteMessage for limitations on which messages can be deleted |
2655+
| messageIds | <code>Array.&lt;(Number\|String)&gt;</code> | Identifiers of 1-100 messages to delete. See deleteMessage for limitations on which messages can be deleted |
26562656
| [options] | <code>Object</code> | Additional Telegram query options |
26572657

26582658
<a name="TelegramBot+getAvailableGifts"></a>
@@ -2786,7 +2786,7 @@ Requires the **can_delete_outgoing_messages** business bot right to delete messa
27862786
| Param | Type | Description |
27872787
| --- | --- | --- |
27882788
| businessConnectionId | <code>String</code> | Unique identifier of the business connection on behalf of which to delete the message. |
2789-
| messageIds | <code>[ &#x27;Array&#x27; ].&lt;Number&gt;</code> | List of 1-100 identifiers of messages to delete. All messages **must be from the same chat**. |
2789+
| messageIds | <code>Array.&lt;Number&gt;</code> | List of 1-100 identifiers of messages to delete. All messages **must be from the same chat**. |
27902790
| [options] | <code>Object</code> | Additional Telegram query options. |
27912791

27922792
<a name="TelegramBot+setBusinessAccountName"></a>
@@ -3053,7 +3053,7 @@ The different errors the library uses.
30533053
**Kind**: static property of [<code>TelegramBot</code>](#TelegramBot)
30543054
<a name="TelegramBot.messageTypes"></a>
30553055

3056-
### TelegramBot.messageTypes : <code>[ &#x27;Array&#x27; ].&lt;String&gt;</code>
3056+
### TelegramBot.messageTypes : <code>Array.&lt;String&gt;</code>
30573057
The types of message updates the library handles.
30583058

30593059
**Kind**: static property of [<code>TelegramBot</code>](#TelegramBot)

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@
5858
"is": "^3.2.1",
5959
"is-ci": "^1.0.10",
6060
"istanbul": "^1.1.0-alpha.1",
61-
"jsdoc-to-markdown": "^3.0.3",
61+
"jsdoc-to-markdown": "^9.1.3",
6262
"mocha": "^3.5.3",
6363
"mocha-lcov-reporter": "^1.3.0",
6464
"node-static": "^0.7.10"
@@ -71,4 +71,4 @@
7171
"url": "https://github.com/yagop/node-telegram-bot-api/issues"
7272
},
7373
"homepage": "https://github.com/yagop/node-telegram-bot-api"
74-
}
74+
}

0 commit comments

Comments
 (0)