Refactoring: handlers now implemented as classes. Module structure

This commit is contained in:
2024-02-11 12:40:11 +03:00
parent c2d7fd41d7
commit f3cdeeff3c
15 changed files with 330 additions and 316 deletions

View File

@@ -0,0 +1,14 @@
from aiogram import types
from aiogram.filters import Command
from neuroapi.types import BotSettings
from .handler import MessageHandlerABC
class SettingsCommand(MessageHandlerABC):
filter = Command('settings')
async def _command(self, message: types.Message):
self.settings = BotSettings.get_instance()
s = f"Текущие настройки:\n{self.settings.get_text()}"
await message.answer(s)