feat(*): init

This commit is contained in:
h
2026-01-20 21:38:01 +01:00
commit b9703da2fc
57 changed files with 3246 additions and 0 deletions

View File

@@ -0,0 +1,7 @@
from aiogram import Router
from . import initialize, start
router = Router()
router.include_routers(start.router, initialize.router)

View File

@@ -0,0 +1,3 @@
from .initializer import router
__all__ = ["router"]

View File

@@ -0,0 +1,18 @@
from aiogram import Bot, Router, types
from utils.logging import logger
router = Router()
@router.startup()
async def startup(bot: Bot) -> None:
await bot.set_my_commands(
[types.BotCommand(command="/start", description="Start bot")]
)
logger.info(f"[green]Started as[/] @{(await bot.me()).username}")
@router.shutdown()
async def shutdown() -> None:
logger.info("Shutting down bot...")

View File

@@ -0,0 +1,3 @@
from .start import router
__all__ = ["router"]

View File

@@ -0,0 +1,9 @@
from aiogram import Router, types
from aiogram.filters import CommandStart
router = Router()
@router.message(CommandStart())
async def on_start(message: types.Message) -> None:
await message.answer("hi")