From 4601eedf0f0fbe71bb99681111858028dc7f4428 Mon Sep 17 00:00:00 2001 From: Eldinnie Date: Fri, 1 Sep 2017 08:41:15 +0200 Subject: [PATCH] Show status_updates in docs (#798) * Show status_updates in docs * Show status_updates in docs --- telegram/ext/filters.py | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/telegram/ext/filters.py b/telegram/ext/filters.py index 2f6de7c59..5a0e4bd43 100644 --- a/telegram/ext/filters.py +++ b/telegram/ext/filters.py @@ -353,6 +353,33 @@ class Filters(object): self.migrate(message) or self.pinned_message(message)) status_update = _StatusUpdate() + """Subset for messages containing a status update. + + Examples: + Use these filters like: ``Filters.status_update.new_chat_member`` etc. Or use just + ``Filters.status_update`` for all status update messages. + + Attributes: + chat_created (:obj:`Filter`): Messages that contain + :attr:`telegram.Message.group_chat_created`, + :attr:`telegram.Message.supergroup_chat_created` or + :attr:`telegram.Message.channel_chat_created`. + delete_chat_photo (:obj:`Filter`): Messages that contain + :attr:`telegram.Message.delete_chat_photo`. + left_chat_member (:obj:`Filter`): Messages that contain + :attr:`telegram.Message.left_chat_member`. + migrate (:obj:`Filter`): Messages that contain + :attr:`telegram.Message.migrate_from_chat_id` or + :attr: `telegram.Message.migrate_from_chat_id`. + new_chat_members (:obj:`Filter`): Messages that contain + :attr:`telegram.Message.new_chat_member`. + new_chat_photo (:obj:`Filter`): Messages that contain + :attr:`telegram.Message.new_chat_photo`. + new_chat_title (:obj:`Filter`): Messages that contain + :attr:`telegram.Message.new_chat_title`. + pinned_message (:obj:`Filter`): Messages that contain + :attr:`telegram.Message.pinned_message`. + """ class _Forwarded(BaseFilter): name = 'Filters.forwarded'