Added is_supergroup member

This commit is contained in:
Konstantin M 2018-03-14 01:59:10 +03:00
parent a6be799ac8
commit 9e3daa31f3

View File

@ -85,6 +85,7 @@ class _EventCommon(abc.ABC):
and not broadcast
)
self.is_channel = isinstance(chat_peer, types.PeerChannel)
self.is_supergroup = self.is_group and self.is_channel
def _get_input_entity(self, msg_id, entity_id, chat=None):
"""
@ -280,6 +281,9 @@ class NewMessage(_EventBuilder):
is_group (:obj:`bool`):
True if the message was sent on a group or megagroup.
is_supergroup (:obj:`bool`):
True if the message was sent on a supergroup.
is_channel (:obj:`bool`):
True if the message was sent on a megagroup or channel.