@@ -134,14 +134,10 @@ async def process_new_event(self, memo_dict):
134
134
return await self ._process_content (memo_dict )
135
135
elif 'location' not in memo_dict :
136
136
return await self ._process_location (memo_dict )
137
- elif 'is_public' not in memo_dict :
138
- return await self ._process_is_public (memo_dict )
139
137
elif 'start' not in memo_dict :
140
138
return await self ._process_start_date (memo_dict )
141
139
elif 'end' not in memo_dict :
142
140
return await self ._process_end_date (memo_dict )
143
- elif 'end' not in memo_dict :
144
- return await self ._process_end_date (memo_dict )
145
141
elif self .chat .message == 'create' :
146
142
return await self ._submit_new_event (memo_dict )
147
143
@@ -188,37 +184,7 @@ async def _process_content(self, memo_dict):
188
184
async def _process_location (self , memo_dict ):
189
185
memo_dict ['location' ] = self .chat .message
190
186
answer = f'Location:\n { memo_dict ["location" ]} \n \n '
191
- answer += 'is the event public? (yes\\ no)'
192
- await telegram_bot .send_message (
193
- chat_id = self .chat .user_id ,
194
- text = answer ,
195
- reply_markup = field_kb )
196
- return answer
197
-
198
- async def _process_is_public (self , memo_dict ):
199
- is_public_response = self .chat .message .lower ()
200
- if is_public_response in ['yes' , 'no' ]:
201
- print ('yasss' )
202
- return await self ._add_is_public ()
203
- return await self ._process_bad_bool_input ()
204
-
205
- async def _process_bad_bool_input (self ):
206
- answer = '❗️ Please, enter an answer of yes/no.'
207
- await telegram_bot .send_message (
208
- chat_id = self .chat .user_id ,
209
- text = answer ,
210
- reply_markup = field_kb )
211
- return answer
212
-
213
- async def _add_is_public (self , memo_dict ):
214
- if self .chat .message .lower == 'yes' :
215
- memo_dict ['is_public' ] = True
216
- answer = 'public\\ private event:\n public event\n \n '
217
- else :
218
- answer = 'private event'
219
- memo_dict ['is_public' ] = False
220
- answer = 'public\\ private event:\n private event\n \n '
221
- answer += '\n When does it start?'
187
+ answer += 'When does it start?'
222
188
await telegram_bot .send_message (
223
189
chat_id = self .chat .user_id ,
224
190
text = answer ,
@@ -282,7 +248,6 @@ async def _submit_new_event(self, memo_dict):
282
248
content = memo_dict ['content' ],
283
249
owner_id = self .user .id ,
284
250
location = memo_dict ['location' ],
285
- is_public = memo_dict ['is_public' ],
286
251
)
287
252
# Delete current session
288
253
del telegram_bot .MEMORY [self .chat .user_id ]
0 commit comments