-
Notifications
You must be signed in to change notification settings - Fork 0
/
bot.py
29 lines (21 loc) · 800 Bytes
/
bot.py
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
import logging
from aiogram.types import Message
from aiogram import Bot, Dispatcher, executor
from aiogram.contrib.fsm_storage.memory import MemoryStorage
import Config.config as config
import Config.debug_helper as helper
from Florist.Services.Localizables.localizables import LocalizableManager
from Florist.Resources.Keyboards.keyboards import KeyboardManager
from Florist.StatesGroups.Start import start_states
logging.basicConfig (level = logging.INFO)
bot = Bot(token = config.TOKEN)
dp = Dispatcher(bot, storage = MemoryStorage())
localized_manager = LocalizableManager()
keyboard_manager = KeyboardManager()
if __name__ == '__main__':
start_states.setup(dp)
executor.start_polling(
dp,
skip_updates = True,
on_startup = helper.on_bot_started()
)