mirror of
https://github.com/eternnoir/pyTelegramBotAPI.git
synced 2023-08-10 21:12:57 +03:00
Update README with webhooks information.
This commit is contained in:
parent
d6552eb4c6
commit
8eb6e034fe
@ -208,7 +208,7 @@ tb.polling(none_stop=False, interval=0, block=True)
|
||||
user = tb.get_me()
|
||||
|
||||
# setWebhook
|
||||
tb.set_webhook(url="http://example.com", cert=open('mycert.pem'))
|
||||
tb.set_webhook(url="http://example.com", certificate=open('mycert.pem'))
|
||||
# unset webhook
|
||||
tb.remove_webhook()
|
||||
|
||||
@ -374,7 +374,9 @@ bot.polling()
|
||||
```
|
||||
|
||||
### Using webhooks
|
||||
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.
|
||||
When using webhooks telegram sends one Update per call, for processing it you should call process_new_messages([update.message]) when you recieve it.
|
||||
|
||||
There are some examples using webhooks in the *examples/webhook_examples* directory.
|
||||
|
||||
### Logging
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user