-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.py
More file actions
30 lines (25 loc) · 998 Bytes
/
main.py
File metadata and controls
30 lines (25 loc) · 998 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
import asyncio
from aiogram import Bot, Dispatcher
from config import TOKEN
from database.initial_db import initial_db
from handlers import h01_start, h02_contact_user, h03_order, h04_categories, h05_product_detail, h06_back_button, \
h07_open_cart, h08_add_to_cart, h09_quantity_items, h10_confirm_order, h11_modify_cart, h12_settings
bot = Bot(token=TOKEN)
dp = Dispatcher()
dp.include_router(h01_start.router)
dp.include_router(h02_contact_user.router)
dp.include_router(h03_order.router)
dp.include_router(h04_categories.router)
dp.include_router(h05_product_detail.router)
dp.include_router(h06_back_button.router)
dp.include_router(h07_open_cart.router)
dp.include_router(h08_add_to_cart.router)
dp.include_router(h09_quantity_items.router)
dp.include_router(h10_confirm_order.router)
dp.include_router(h11_modify_cart.router)
dp.include_router(h12_settings.router)
async def main():
initial_db()
await dp.start_polling(bot)
if __name__ == '__main__':
asyncio.run(main())