mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2024-11-22 01:16:35 +03:00
Encourage to use active polling
parent
44b726c338
commit
7d07a715a2
|
@ -1,5 +1,7 @@
|
|||
There are two ways in which you may want to use the library. Some people will simply want to show information about updates as they come, or invoke other requests as certain events happen, while other people don't care about processing updates at all. A mix between all of these is also possible.
|
||||
|
||||
If you're going to have the main thread idle (e.g. `while True: sleep(1)`), you should instead put it to good use as described on [Reacting to updates](#reacting-to-updates) instead just "listening" for updates.
|
||||
|
||||
## Listening for updates
|
||||
|
||||
By default, the library won't process updates at all (while it will still send periodic pings to ensure that the connection stays alive). If you want to listen for updates, simply add a new handler:
|
||||
|
|
Loading…
Reference in New Issue
Block a user