haisai / bot.py
haisenx's picture
Upload 11 files
7f77117 verified
raw
history blame
787 Bytes
import asyncio
import logging
from aiogram import Bot, Dispatcher
from aiogram.fsm.storage.memory import MemoryStorage
#from config_reader import config
#сюда добавлять новые автоматы пакетами
from handlers import common
async def main():
dp = Dispatcher(storage=MemoryStorage())
bot = Bot(token="6660643950:AAGobeUXFsTVh9Gj1IukfyERhjSQF_-AUEk")
await bot.delete_webhook(drop_pending_updates=True)
#здесь подключать автоматы
dp.include_routers(common.router)
await dp.start_polling(bot)
if __name__ == "__main__":
logging.basicConfig(level=logging.INFO)
try:
asyncio.run(main())
except (KeyboardInterrupt, SystemExit):
logging.info("Bot stopped!")