From 2cf2c2e98b4492157b4ba2901e8036b100662b00 Mon Sep 17 00:00:00 2001 From: Egor Date: Fri, 3 Jul 2020 16:07:46 +0500 Subject: [PATCH] feat: ChatType helper --- aiogram/api/types/chat.py | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/aiogram/api/types/chat.py b/aiogram/api/types/chat.py index 2e3163b2..7354d641 100644 --- a/aiogram/api/types/chat.py +++ b/aiogram/api/types/chat.py @@ -2,6 +2,7 @@ from __future__ import annotations from typing import TYPE_CHECKING, Optional +from ...utils import helper from .base import TelegramObject if TYPE_CHECKING: # pragma: no cover @@ -51,3 +52,20 @@ class Chat(TelegramObject): """For supergroups, name of group sticker set. Returned only in getChat.""" can_set_sticker_set: Optional[bool] = None """True, if the bot can change the group sticker set. Returned only in getChat.""" + + +class ChatType(helper.Helper): + """ + List of chat types + :key: PRIVATE + :key: GROUP + :key: SUPER_GROUP + :key: CHANNEL + """ + + mode = helper.HelperMode.lowercase + + PRIVATE = helper.Item() # private + GROUP = helper.Item() # group + SUPER_GROUP = helper.Item() # supergroup + CHANNEL = helper.Item() # channel