Версия 1.0

This commit is contained in:
Whyverum
2025-05-20 09:12:05 +07:00
commit 0b3b957c0a
34 changed files with 1964 additions and 0 deletions

30
main.py Normal file
View File

@@ -0,0 +1,30 @@
# main.py
from aiogram import Bot, Dispatcher
from aiogram.client.default import DefaultBotProperties
from BotCode.config import BOT_TOKEN, BOT_DEBUG_TOKEN, DEBUG_MODE, PARSE_MODE
dp: Dispatcher = Dispatcher()
TOKEN: str = BOT_DEBUG_TOKEN if DEBUG_MODE else BOT_TOKEN
bot: Bot = Bot(
token=TOKEN,
default=DefaultBotProperties(
parse_mode=PARSE_MODE,
link_preview_show_above_text=True,
)
)
async def main() -> None:
from aiogram.types import User
from BotCode.loggers import logs
from BotCode.handlers import router as main_router
bot_info: User = await bot.get_me()
logs.start(text=f"Бот @{bot_info.username} запущен!")
dp.include_router(main_router)
await dp.start_polling(bot)
if __name__ == "__main__":
from asyncio import run
run(main())