первый коммит
This commit is contained in:
24
bot.py
Normal file
24
bot.py
Normal file
@ -0,0 +1,24 @@
|
||||
import asyncio
|
||||
import logging
|
||||
from aiogram import F, Router, Dispatcher, Bot
|
||||
from aiogram.types import Message, CallbackQuery, User
|
||||
from aiogram.filters import CommandStart, Command
|
||||
from aiogram.fsm.state import State, StatesGroup
|
||||
from aiogram.fsm.context import FSMContext
|
||||
from aiogram.enums import ParseMode
|
||||
from config import TOKEN
|
||||
from app.handliers import router
|
||||
|
||||
bot = Bot(token=TOKEN)
|
||||
dp = Dispatcher()
|
||||
|
||||
async def main():
|
||||
dp.include_router(router)
|
||||
await dp.start_polling(bot)
|
||||
|
||||
if __name__ == '__main__':
|
||||
logging.basicConfig(level=logging.INFO)
|
||||
try:
|
||||
asyncio.run(main())
|
||||
except KeyboardInterrupt:
|
||||
print(' бот отключен')
|
Reference in New Issue
Block a user