Files
PrimoWorldsBot/main.py

27 lines
815 B
Python
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# main.py
# Основной код проекта, который и соединяет в себе все его возможности
import asyncio
from BotLibrary import *
# Запуск основного кода
async def main():
# Функция создания логеров и получения информации о боте
await setup_logger()
await bot_get_info()
logger.bind(log_type="AEP", user="@Console").info(f"Начало запуска бота @{BotInfo.username}...")
# Нужно ли удалить веб-хук
if Permissions.delete_webhook:
await bot.delete_webhook()
# Включение опроса бота
await dp.start_polling(bot)
# Вечная загрузка бота
if __name__ == "__main__":
asyncio.run(main())