add ban and unban commands, integrate BanMiddleware, and extend database schema

This commit is contained in:
2026-07-02 22:12:05 +03:00
parent a097abf5bc
commit 1287fe7ec8
8 changed files with 138 additions and 5 deletions
+2 -1
View File
@@ -8,7 +8,7 @@ from aiogram.enums import ParseMode
from bot.config import settings
from bot.handlers import get_handlers_router
from bot.middlewares import LoggingMiddleware, I18nMiddleware
from bot.middlewares import LoggingMiddleware, I18nMiddleware, BanMiddleware
from bot.utils.db import db
from bot.ui_commands import set_bot_commands
@@ -37,6 +37,7 @@ async def main():
# Register middlewares (e.g. LoggingMiddleware)
dp.update.outer_middleware(LoggingMiddleware())
dp.update.outer_middleware(BanMiddleware())
dp.update.outer_middleware(I18nMiddleware())
# Register routers (handlers)