mirror of
https://github.com/aiogram/aiogram.git
synced 2026-04-08 16:37:47 +00:00
Added deprecation warning to SUPER_GROUP value
This commit is contained in:
parent
fe1fc0b906
commit
b84c50d58b
1 changed files with 6 additions and 2 deletions
|
|
@ -10,7 +10,7 @@ from .chat_member import ChatMember
|
|||
from .chat_permissions import ChatPermissions
|
||||
from .chat_photo import ChatPhoto
|
||||
from .input_file import InputFile
|
||||
from ..utils.deprecated import deprecated
|
||||
from ..utils.deprecated import deprecated, DeprecatedReadOnlyClassVar
|
||||
|
||||
|
||||
class Chat(base.TelegramObject):
|
||||
|
|
@ -502,10 +502,14 @@ 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
|
||||
|
||||
SUPER_GROUP: DeprecatedReadOnlyClassVar[ChatType, helper.Item] \
|
||||
= DeprecatedReadOnlyClassVar(
|
||||
"SUPER_GROUP chat type is deprecated, use SUPERGROUP instead.",
|
||||
new_value_getter=lambda cls: cls.SUPERGROUP)
|
||||
|
||||
@staticmethod
|
||||
def _check(obj, chat_types) -> bool:
|
||||
if hasattr(obj, 'chat'):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue