diff --git a/telethon/events/__init__.py b/telethon/events/__init__.py index a4ec83b2..4fc9144a 100644 --- a/telethon/events/__init__.py +++ b/telethon/events/__init__.py @@ -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.