Skip to content

Commit

Permalink
fix callback answer
Browse files Browse the repository at this point in the history
  • Loading branch information
DavraYoung committed Nov 12, 2022
1 parent 95b12ed commit f054d83
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions src/handlers/uzbekvoice/check_voice.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,13 +65,19 @@ async def ask_action_handler(call: CallbackQuery, state: FSMContext):
confirm_state = data['confirm_state'] if 'confirm_state' in data else None
clip_duration = data['clip_duration'] if 'clip_duration' in data else 0
if command == 'report':
await call.answer()
try:
await call.answer()
except:
pass
await edit_reply_markup(chat_id, message_id, report_voice_markup(voice_id))
await AskUserAction.report_type.set()
return

if command != 'submit':
await call.answer()
try:
await call.answer()
except:
pass
await state.update_data(confirm_state=command)
try:
await edit_reply_markup(chat_id, message_id, yes_no_markup(voice_id, command))
Expand Down Expand Up @@ -104,7 +110,10 @@ async def ask_action_handler(call: CallbackQuery, state: FSMContext):
db.increase_user_correct_count(chat_id)
await call.message.delete_reply_markup()
else:
await call.answer()
try:
await call.answer()
except:
pass
await enqueue_operation(
{
'type': 'skip_clip' if command == 'skip' else 'vote',
Expand Down

0 comments on commit f054d83

Please sign in to comment.