From 57dd0827f4812abddd441671c0670666acad796b Mon Sep 17 00:00:00 2001 From: Lonami Exo Date: Sun, 10 Nov 2019 14:56:00 +0100 Subject: [PATCH] Slight improvement on ChatAction's docs --- readthedocs/quick-references/events-reference.rst | 3 ++- telethon/events/chataction.py | 12 +++++++++++- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/readthedocs/quick-references/events-reference.rst b/readthedocs/quick-references/events-reference.rst index fe181851..eb83cce2 100644 --- a/readthedocs/quick-references/events-reference.rst +++ b/readthedocs/quick-references/events-reference.rst @@ -90,7 +90,8 @@ Full documentation for the `MessageRead ChatAction ========== -Occurs whenever a user joins or leaves a chat, or a message is pinned. +Occurs on certain chat actions, such as chat title changes, +user join or leaves, pinned messages, photo changes, etc. Full documentation for the `ChatAction `. diff --git a/telethon/events/chataction.py b/telethon/events/chataction.py index 781539f7..a38218ab 100644 --- a/telethon/events/chataction.py +++ b/telethon/events/chataction.py @@ -6,7 +6,17 @@ from ..tl import types, functions @name_inner_event class ChatAction(EventBuilder): """ - Occurs whenever a user joins or leaves a chat, or a message is pinned. + Occurs on certain chat actions: + + * Whenever a new chat is created. + * Whenever a chat's title or photo is changed or removed. + * Whenever a new message is pinned. + * Whenever a user joins or is added to the group. + * Whenever a user is removed or leaves a group if it has + less than 50 members or the removed user was a bot. + + Note that "chat" refers to "small group, megagroup and broadcast + channel", whereas "group" refers to "small group and megagroup" only. """ @classmethod def build(cls, update, others=None, self_id=None):