Сгенерил базовую модульную структуру спасибо Claude AI
Build and Push Docker Image / build (push) Successful in 2m15s
Build and Push Docker Image / build (push) Successful in 2m15s
This commit is contained in:
@@ -0,0 +1,3 @@
|
||||
"""
|
||||
Ядро приложения - создание бота и диспетчера.
|
||||
"""
|
||||
@@ -0,0 +1,23 @@
|
||||
from aiogram import Bot, Dispatcher
|
||||
from aiogram.enums import ParseMode
|
||||
from aiogram.client.default import DefaultBotProperties
|
||||
|
||||
from bot.config import BOT_TOKEN
|
||||
from bot.utils.logging import logger
|
||||
|
||||
|
||||
def create_bot() -> Bot:
|
||||
"""Создание экземпляра бота."""
|
||||
bot = Bot(
|
||||
token=BOT_TOKEN,
|
||||
default=DefaultBotProperties(parse_mode=ParseMode.HTML)
|
||||
)
|
||||
logger.info("Бот создан")
|
||||
return bot
|
||||
|
||||
|
||||
def create_dispatcher() -> Dispatcher:
|
||||
"""Создание диспетчера."""
|
||||
dp = Dispatcher()
|
||||
logger.info("Диспетчер создан")
|
||||
return dp
|
||||
Reference in New Issue
Block a user