-
Notifications
You must be signed in to change notification settings - Fork 1
/
settings.py
146 lines (108 loc) · 5.18 KB
/
settings.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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
import json
class Settings:
def __init__(self):
with open('settings.json', 'r', encoding='utf-8') as settings_file:
self.settings = json.load(settings_file)
self.week_days = self.__get_week_days()
self.admins = self.__get_admins()
self.bot_token = self.__get_bot_token()
self.private_channel_id = self.__get_private_channel_id()
self.max_requests = self.__get_max_requests()
self.start_of_day = self.__get_start_time()
self.end_of_day = self.__get_end_time()
self.image_path = self.__get_image_path()
self.reply_first = self.__get_reply_first()
self.reply_first_regex = self.__get_reply_first_regex()
self.reply_cancel = self.__get_reply_cancel()
self.reply_cancel_regex = self.__get_reply_cancel_regex()
self.msg_link_to_cv = self.__get_msg_link_to_cv()
self.msg_choose_menu_item = self.__get_msg_choose_menu_item()
self.msg_send_cv_link = self.__get_msg_send_cv_link()
self.msg_cv_received = self.__get_msg_cv_received()
self.msg_incorrect_url = self.__get_msg_incorrect_url()
self.msg_already_reserved = self.__get_msg_already_reserved()
self.msg_interview_canceled = self.__get_msg_canceled()
self.msg_choose_date = self.__get_msg_choose_date()
self.msg_choose_time = self.__get_msg_choose_time()
self.msg_chose_date = self.__get_msg_chose_date()
self.msg_chose_time = self.__get_msg_chose_time()
self.msg_canceled_interview = self.__get_msg_canceled_interview()
self.msg_noreserved_interview = self.__get_msg_noreserved_interview()
self.msg_callback_date_picked = self.__get_msg_callback_date_picked()
self.msg_callback_time_picked = self.__get_msg_callback_time_picked()
self.msg_innopolis_info = self.__get_msg_innopolis_info()
self.msg_someone_reserved = self.__get_msg_someone_reserved()
self.msg_start = self.__get_msg_start()
self.msg_interview_limit_exceeded = self.__get_msg_limit_exceeded()
self.msg_minutes_rem = self.__get_msg_minutes_rem()
self.msg_no_coming_interviews = self.__get_msg_no_coming_interviews()
self.msg_list_interviews = self.__get_msg_list_interviews()
def __get_week_days(self):
return self.settings['weekDays']
def __get_admins(self):
return self.settings['admins']
def __get_bot_token(self):
return self.settings['botToken']
def __get_private_channel_id(self):
return int(self.settings['privateChannelId'])
def __get_max_requests(self):
return int(self.settings['maxInterviewRequestsPerDay'])
def __get_start_time(self):
return int(self.settings['startOfDay'])
def __get_end_time(self):
return int(self.settings['endOfDay'])
def __get_image_path(self):
return self.settings['imagesPath']
def __get_reply_first(self):
return self.settings['replyKeyboardFirst']
def __get_reply_first_regex(self):
return self.settings['replyKeyboardFirstRegex']
def __get_reply_cancel(self):
return self.settings['replyKeyboardCancel']
def __get_reply_cancel_regex(self):
return self.settings['replyKeyboardCancelRegex']
def __get_msg_link_to_cv(self):
return self.settings['msgLinkToCV']
def __get_msg_choose_menu_item(self):
return self.settings['msgChooseMenuItem']
def __get_msg_send_cv_link(self):
return self.settings['msgSendCVLink']
def __get_msg_cv_received(self):
return self.settings['msgCVLinkReceived']
def __get_msg_incorrect_url(self):
return self.settings['msgIncorrectUrl']
def __get_msg_already_reserved(self):
return self.settings['msgAlreadyReserved']
def __get_msg_canceled(self):
return self.settings['msgInterviewCanceled']
def __get_msg_choose_date(self):
return self.settings['msgPlsChooseDate']
def __get_msg_choose_time(self):
return self.settings['msgPlsChooseTime']
def __get_msg_chose_date(self):
return self.settings['msgChoseDate']
def __get_msg_chose_time(self):
return self.settings['msgChoseTime']
def __get_msg_canceled_interview(self):
return self.settings['msgCanceledInterview']
def __get_msg_noreserved_interview(self):
return self.settings['msgNoReservedInterview']
def __get_msg_innopolis_info(self):
return self.settings['msgInnopolisInfo']
def __get_msg_someone_reserved(self):
return self.settings['msgSomeoneReservedInterview']
def __get_msg_start(self):
return self.settings['msgStart']
def __get_msg_callback_date_picked(self):
return self.settings['msgCallbackDatePicked']
def __get_msg_callback_time_picked(self):
return self.settings['msgCallbackTimePicked']
def __get_msg_limit_exceeded(self):
return self.settings['msgLimitExceeded']
def __get_msg_minutes_rem(self):
return self.settings['msgMinutesRem']
def __get_msg_no_coming_interviews(self):
return self.settings['msgNoComingInterviews']
def __get_msg_list_interviews(self):
return self.settings['msgListOfInterviews']
ss = Settings()