From fe1fc0b90650205d2eda420537b9c7a49692925c Mon Sep 17 00:00:00 2001 From: Groosha Date: Tue, 6 Oct 2020 17:04:02 +0300 Subject: [PATCH] Added SUPERGROUP chat type, because SUPER_GROUP is incorrect and confusing. --- aiogram/types/chat.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/aiogram/types/chat.py b/aiogram/types/chat.py index 28cc5ed0..5e179822 100644 --- a/aiogram/types/chat.py +++ b/aiogram/types/chat.py @@ -494,6 +494,7 @@ class ChatType(helper.Helper): :key: PRIVATE :key: GROUP :key: SUPER_GROUP + :key: SUPERGROUP :key: CHANNEL """ @@ -502,6 +503,7 @@ class ChatType(helper.Helper): PRIVATE = helper.Item() # private GROUP = helper.Item() # group SUPER_GROUP = helper.Item() # supergroup + SUPERGROUP = helper.Item() # supergroup CHANNEL = helper.Item() # channel @staticmethod @@ -543,7 +545,7 @@ class ChatType(helper.Helper): :param obj: :return: """ - return cls._check(obj, [cls.SUPER_GROUP]) + return cls._check(obj, [cls.SUPER_GROUP, cls.SUPERGROUP]) @classmethod @deprecated("This filter was moved to ChatTypeFilter, and will be removed in aiogram v3.0") @@ -554,7 +556,7 @@ class ChatType(helper.Helper): :param obj: :return: """ - return cls._check(obj, [cls.GROUP, cls.SUPER_GROUP]) + return cls._check(obj, [cls.GROUP, cls.SUPER_GROUP, cls.SUPERGROUP]) @classmethod @deprecated("This filter was moved to ChatTypeFilter, and will be removed in aiogram v3.0")