feat(global): init structure

This commit is contained in:
h
2025-07-01 12:55:01 +03:00
commit 1b21f23294
37 changed files with 1208 additions and 0 deletions

View File

@@ -0,0 +1,14 @@
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,17 @@
from aiogram import Bot, Router, types
from rich import print
router = Router()
@router.startup()
async def startup(bot: Bot):
await bot.set_my_commands(
[types.BotCommand(command="/start", description="Запустить бота")]
)
print(f"[green]Started as[/] @{(await bot.me()).username}")
@router.shutdown()
async def shutdown():
print("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):
await message.reply("hewo everynyan")