mirror of
https://github.com/aiogram/aiogram.git
synced 2026-04-08 16:37:47 +00:00
Make BotCommandScope classmethod instead of method
This commit is contained in:
parent
056bd5a8db
commit
e8c1728835
1 changed files with 2 additions and 1 deletions
|
|
@ -32,7 +32,8 @@ class BotCommandScope(base.TelegramObject):
|
|||
"""
|
||||
type: base.String = fields.Field()
|
||||
|
||||
def from_type(self, type: str, **kwargs: typing.Any):
|
||||
@classmethod
|
||||
def from_type(cls, type: str, **kwargs: typing.Any):
|
||||
if type == BotCommandScopeType.DEFAULT:
|
||||
return BotCommandScopeDefault(type=type, **kwargs)
|
||||
if type == BotCommandScopeType.ALL_PRIVATE_CHATS:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue