mirror of
https://github.com/MrSedan/neuro-reply-bot-reworked.git
synced 2026-01-15 05:59:43 +03:00
Added comments
This commit is contained in:
@@ -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
|
||||
Reference in New Issue
Block a user