diff --git a/aiogram/types/bot_command_scope.py b/aiogram/types/bot_command_scope.py index 2705e0e3..e3091a7e 100644 --- a/aiogram/types/bot_command_scope.py +++ b/aiogram/types/bot_command_scope.py @@ -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: