Add examples to all events

This commit is contained in:
Lonami Exo
2020-02-20 10:18:26 +01:00
parent 9f73c35621
commit 3a6c955c90
10 changed files with 143 additions and 0 deletions

View File

@@ -17,6 +17,17 @@ class ChatAction(EventBuilder):
Note that "chat" refers to "small group, megagroup and broadcast
channel", whereas "group" refers to "small group and megagroup" only.
Example
.. code-block:: python
from telethon import events
@client.on(events.ChatAction)
async def handler(event):
# Welcome every new user
if event.user_joined:
await event.reply('Welcome to the group!')
"""
@classmethod
def build(cls, update, others=None, self_id=None):