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:
@@ -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):
|
||||
|
Reference in New Issue
Block a user