mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2025-08-08 12:59:46 +00:00
Add examples to all events
This commit is contained in:
@@ -36,6 +36,17 @@ def _requires_status(function):
|
||||
class UserUpdate(EventBuilder):
|
||||
"""
|
||||
Occurs whenever a user goes online, starts typing, etc.
|
||||
|
||||
Example
|
||||
.. code-block:: python
|
||||
|
||||
from telethon import events
|
||||
|
||||
@client.on(events.UserUpdate)
|
||||
async def handler(event):
|
||||
# If someone is uploading, say something
|
||||
if event.uploading:
|
||||
await client.send_message(event.user_id, 'What are you sending?')
|
||||
"""
|
||||
@classmethod
|
||||
def build(cls, update, others=None, self_id=None):
|
||||
|
Reference in New Issue
Block a user