Skip to content

Commit

Permalink
change mode added
Browse files Browse the repository at this point in the history
  • Loading branch information
elizaveta-andreeva committed Aug 5, 2023
1 parent 269e3e6 commit 93da12c
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions bot.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,6 @@ def button(update: Update, context: CallbackContext) -> str:
user = init_user(update.effective_user)
set_last_usage(user)

last_message = query.message.text
if query.data.startswith('s_'):
# User entered schedule
text = f'Ты выбрал {VALUES[query.data]} в качестве времени для рассылки. Спасибо!'
Expand All @@ -107,10 +106,7 @@ def button(update: Update, context: CallbackContext) -> str:
push_user_focus(update.effective_user, query.data, update.effective_message.date)

return engine_callback(update, context)
elif query.data.startswith('r_') and (
last_message == 'Привет! Пришло время подводить итоги. Давай?'
or "Продолжить прохождение опроса?"
):
elif query.data.startswith('r_'):
if query.data == 'r_yes':
return engine_callback(update, context)
if query.data == 'r_1h':
Expand Down Expand Up @@ -139,6 +135,8 @@ def button(update: Update, context: CallbackContext) -> str:
schedule.is_on = True
schedule.save()

return ''


def text_processing(update: Update, context: CallbackContext):
if update.message.text == VALUES['menu_share_event']:
Expand Down

0 comments on commit 93da12c

Please sign in to comment.