64 lines
2.0 KiB
Python
64 lines
2.0 KiB
Python
from dotenv import dotenv_values
|
|
from collections import defaultdict
|
|
# from bot.handlers.MainChannelHandler import MainChannelHandler
|
|
# from bot.handlers.TestChannelHandler import TestChannelHandler
|
|
# from bot.handlers.TestChannelPhotoHandler import TestChannelPhotoHandler
|
|
# from bot.handlers.MainChannelPhotoHandler import MainChannelPhotoHandler
|
|
# from bot.handlers.TestChannelVideoHandler import TestChannelVideoHandler
|
|
# from bot.handlers.MainChannelVideoHandler import MainChannelVideoHandler
|
|
# from bot.handlers.CopyFromMainChannelHandler import CopyFromMainChannelHandler
|
|
# from bot.handlers.CopyFromMainChannelPhotoHandler import CopyFromMainChannelPhotoHandler
|
|
# from bot.handlers.CopyFromMainChannelVideoHandler import CopyFromMainChannelVideoHandler
|
|
# from bot.handlers.CopyFromTestChannelHandler import CopyFromTestChannelHandler
|
|
# from bot.handlers.TestChannelDaLinkHandler import TestChannelDaLinkHandler
|
|
# from bot.handlers.MainChannelDaLinkHandler import MainChannelDaLinkHandler
|
|
|
|
FIRST, SECOND = range(2)
|
|
SET_DATE_STEP = 3
|
|
SET_TIME_STEP = 4
|
|
SET_PHONE_STEP = 5
|
|
SET_COMMENT_STEP = 6
|
|
SET_TABLE_STEP = 7
|
|
ACCEPT_BOOKING_STEP = 8
|
|
REQUEST_CODE_STEP: int = 9
|
|
AUTH_FINISH: int = 10
|
|
BACK_STEP = 99
|
|
|
|
SET_EMAIL_STEP = 3
|
|
|
|
config = dotenv_values(".env")
|
|
|
|
text_msg_handlers = [
|
|
# MainChannelHandler(),
|
|
# TestChannelHandler(),
|
|
# CopyFromMainChannelHandler(),
|
|
# CopyFromTestChannelHandler()
|
|
]
|
|
|
|
da_text_msg_scenario = [
|
|
# MainChannelDaLinkHandler(),
|
|
# TestChannelDaLinkHandler()
|
|
]
|
|
|
|
photo_msg_handlers = [
|
|
# TestChannelPhotoHandler(),
|
|
# MainChannelPhotoHandler(),
|
|
# # CopyFromMainChannelPhotoHandler(),
|
|
# CopyFromTestChannelHandler()
|
|
]
|
|
|
|
video_msg_handlers = [
|
|
# TestChannelVideoHandler(),
|
|
# MainChannelVideoHandler(),
|
|
# # CopyFromMainChannelVideoHandler()
|
|
]
|
|
|
|
def recursive_dict_merge(dict1, dict2):
|
|
result = defaultdict(list)
|
|
for d in [dict1, dict2]:
|
|
for key, value in d.items():
|
|
result[key].extend(value)
|
|
result = dict(result)
|
|
|
|
return result
|