Skip to content

Commit

Permalink
doc: added missing documentation related to events (#938)
Browse files Browse the repository at this point in the history
  • Loading branch information
toniop99 authored Feb 6, 2022
1 parent e114682 commit 0f33cb5
Showing 1 changed file with 16 additions and 7 deletions.
23 changes: 16 additions & 7 deletions doc/usage.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
# Usage

* [Events](#events)
* [WebHooks](#webhooks)
* [Sending files](#sending-files)
* [Error handling](#error-handling)
- [Usage](#usage)
- [Events](#events)
- [WebHooks](#webhooks)
- [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>
## Events
Expand Down Expand Up @@ -35,9 +40,13 @@ that emits the following events:
1. `shipping_query`: Received a new incoming shipping query
1. `pre_checkout_query`: Received a new incoming pre-checkout query
1. `poll`: Received a new incoming poll
1. `polling_error`: Error occurred during polling. See [polling errors](#polling-errors).
1. `webhook_error`: Error occurred handling a webhook request. See [webhook errors](#webhook-errors).
1. `error`: Unexpected error occurred, usually fatal!
2. `poll_answer`: A user has changed their answer in a non-anonymous poll (Only polls sent by the bot)
3. `chat_member`: A chat member's status was updated in a chat
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
`message` in order to stay safe from the content.
Expand Down

0 comments on commit 0f33cb5

Please sign in to comment.