Added comments

This commit is contained in:
2024-02-15 16:58:37 +03:00
parent 19cf282e08
commit dba5c60080
42 changed files with 388 additions and 11 deletions

View File

@@ -6,6 +6,7 @@ from aiogram.filters import Filter
class MessageHandlerABC(ABC):
"""Base class for all message handlers"""
bot: Bot
def __init__(self, bot: Bot, *args: Any, **kwargs: Dict[str, Any]) -> None:
@@ -14,13 +15,16 @@ class MessageHandlerABC(ABC):
@abstractmethod
def _command(self, *args, **kwargs):
"""Handler for the command"""
raise NotImplementedError
@property
def handler(self) -> Coroutine[None, None, None]:
"""Command handler method"""
return self._command
@property
@abstractmethod
def filter(self) -> Filter:
"""Filter for the command"""
raise NotImplementedError