mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2025-08-05 03:22:29 +00:00
Add examples to all events
This commit is contained in:
@@ -12,6 +12,16 @@ class Raw(EventBuilder):
|
||||
types (`list` | `tuple` | `type`, optional):
|
||||
The type or types that the :tl:`Update` instance must be.
|
||||
Equivalent to ``if not isinstance(update, types): return``.
|
||||
|
||||
Example
|
||||
.. code-block:: python
|
||||
|
||||
from telethon import events
|
||||
|
||||
@client.on(events.Raw)
|
||||
async def handler(update):
|
||||
# Print all incoming updates
|
||||
print(update.stringify())
|
||||
"""
|
||||
def __init__(self, types=None, *, func=None):
|
||||
super().__init__(func=func)
|
||||
|
Reference in New Issue
Block a user