2022-01-28 13:34:16 +03:00
|
|
|
from .base import EventBuilder
|
2021-09-12 14:27:13 +03:00
|
|
|
from .._misc import utils
|
2018-04-28 14:37:19 +03:00
|
|
|
|
|
|
|
|
|
|
|
class Raw(EventBuilder):
|
|
|
|
"""
|
2019-06-11 12:09:22 +03:00
|
|
|
Raw events are not actual events. Instead, they are the raw
|
|
|
|
:tl:`Update` object that Telegram sends. You normally shouldn't
|
|
|
|
need these.
|
2018-04-28 14:37:19 +03:00
|
|
|
|
2020-02-20 12:18:26 +03:00
|
|
|
Example
|
|
|
|
.. code-block:: python
|
|
|
|
|
|
|
|
from telethon import events
|
|
|
|
|
|
|
|
@client.on(events.Raw)
|
|
|
|
async def handler(update):
|
|
|
|
# Print all incoming updates
|
|
|
|
print(update.stringify())
|
2018-04-28 14:37:19 +03:00
|
|
|
"""
|
2018-07-19 02:47:32 +03:00
|
|
|
@classmethod
|
2022-02-15 13:57:55 +03:00
|
|
|
def _build(cls, client, update, entities):
|
2018-07-11 12:22:43 +03:00
|
|
|
return update
|