You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 8eb6e03
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: README.md
+7-5Lines changed: 7 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -118,7 +118,7 @@ To start the bot, simply open up a terminal and enter `python echo_bot.py` to ru
118
118
119
119
All types are defined in types.py. They are all completely in line with the [Telegram API's definition of the types](https://core.telegram.org/bots/api#available-types), except for the Message's `from` field, which is renamed to `from_user` (because `from` is a Python reserved token). Thus, attributes such as `message_id` can be accessed directly with `message.message_id`. Note that `message.chat` can be either an instance of `User` or `GroupChat` (see [How can I distinguish a User and a GroupChat in message.chat?](#how-can-i-distinguish-a-user-and-a-groupchat-in-messagechat)).
120
120
121
-
The Message object also has a `content_type`attribute, which defines the type of the Message. `content_type` can be one of the following strings:
121
+
The Message object also has a `content_type`attribute, which defines the type of the Message. `content_type` can be one of the following strings:
If you prefer using web hooks to the getUpdates method, you can use the `process_new_messages(messages)` function in TeleBot to make it process the messages that you supply. It takes a list of Message objects. This function is still incubating.
376
+
### Using webhooks
377
+
When using webhooks telegram sends one Update per call, for processing it you should call process_new_messages([update.message]) when you recieve it.
378
+
379
+
There are some examples using webhooks in the *examples/webhook_examples* directory.
378
380
379
381
### Logging
380
382
@@ -423,4 +425,4 @@ We now have a Telegram Channel as well! Keep yourself up to date with API change
423
425
424
426
## Bots using this API
425
427
*[SiteAlert bot](https://telegram.me/SiteAlert_bot) ([source](https://github.com/ilteoood/SiteAlert-Python)) by *ilteoood* - Monitors websites and sends a notification on changes
426
-
Want to have your bot listed here? Send a Telegram message to @eternnoir or @pevdh.
428
+
Want to have your bot listed here? Send a Telegram message to @eternnoir or @pevdh.
0 commit comments