Skip to content

Commit 9478054

Browse files
committed
docs: update api documentation
1 parent 4af0635 commit 9478054

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

doc/api.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -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> | | 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</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 |

src/telegram.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ class TelegramBot extends EventEmitter {
130130
* @param {Object} [options.polling.params] Parameters to be used in polling API requests.
131131
* See https://core.telegram.org/bots/api#getupdates for more information.
132132
* @param {Number} [options.polling.params.timeout=10] Timeout in seconds for long polling.
133-
* @param {Array|String} [options.polling.params.allowed_updates] A JSON-serialized list of the update types you want your bot to receive.
133+
* @param {Array<String>|String} [options.polling.params.allowed_updates] A JSON-serialized list of the update types you want your bot to receive.
134134
* For example, specify ["message", "edited_channel_post", "callback_query"] to only receive updates of these types.
135135
* @param {Boolean|Object} [options.webHook=false] Set true to enable WebHook or set options
136136
* @param {String} [options.webHook.host="0.0.0.0"] Host to bind to

0 commit comments

Comments
 (0)