mirror of
https://github.com/yagop/node-telegram-bot-api
synced 2025-08-22 18:07:16 +00:00
doc: added missing documentation related to events (#938)
This commit is contained in:
parent
e114682f2e
commit
0f33cb5ab7
23
doc/usage.md
23
doc/usage.md
@ -1,9 +1,14 @@
|
|||||||
# Usage
|
# Usage
|
||||||
|
|
||||||
* [Events](#events)
|
- [Usage](#usage)
|
||||||
* [WebHooks](#webhooks)
|
- [Events](#events)
|
||||||
* [Sending files](#sending-files)
|
- [WebHooks](#webhooks)
|
||||||
* [Error handling](#error-handling)
|
- [Sending files](#sending-files)
|
||||||
|
- [File Options (metadata)](#file-options-metadata)
|
||||||
|
- [Performance Issue](#performance-issue)
|
||||||
|
- [Error handling](#error-handling)
|
||||||
|
- [Polling errors](#polling-errors)
|
||||||
|
- [WebHook errors](#webhook-errors)
|
||||||
|
|
||||||
<a name="events"></a>
|
<a name="events"></a>
|
||||||
## Events
|
## Events
|
||||||
@ -35,9 +40,13 @@ that emits the following events:
|
|||||||
1. `shipping_query`: Received a new incoming shipping query
|
1. `shipping_query`: Received a new incoming shipping query
|
||||||
1. `pre_checkout_query`: Received a new incoming pre-checkout query
|
1. `pre_checkout_query`: Received a new incoming pre-checkout query
|
||||||
1. `poll`: Received a new incoming poll
|
1. `poll`: Received a new incoming poll
|
||||||
1. `polling_error`: Error occurred during polling. See [polling errors](#polling-errors).
|
2. `poll_answer`: A user has changed their answer in a non-anonymous poll (Only polls sent by the bot)
|
||||||
1. `webhook_error`: Error occurred handling a webhook request. See [webhook errors](#webhook-errors).
|
3. `chat_member`: A chat member's status was updated in a chat
|
||||||
1. `error`: Unexpected error occurred, usually fatal!
|
4. `my_chat_member`: The bot's chat member status was updated in a chat
|
||||||
|
5. `chat_join_request`: A request to join the chat has been sent (The bot must have the can_invite_users administrator right)
|
||||||
|
5. `polling_error`: Error occurred during polling. See [polling errors](#polling-errors).
|
||||||
|
6. `webhook_error`: Error occurred handling a webhook request. See [webhook errors](#webhook-errors).
|
||||||
|
7. `error`: Unexpected error occurred, usually fatal!
|
||||||
|
|
||||||
**Tip:** Its much better to listen a specific event rather than on
|
**Tip:** Its much better to listen a specific event rather than on
|
||||||
`message` in order to stay safe from the content.
|
`message` in order to stay safe from the content.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user