Skip to content

Commit

Permalink
Update handlers.py
Browse files Browse the repository at this point in the history
  • Loading branch information
iskomir committed Apr 21, 2024
1 parent 52ce0fb commit 3e82060
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions src/handlers.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,6 @@ async def handler_print(update: Update, context: ContextTypes.DEFAULT_TYPE):
number=requisites[2],
)
return

elif r.status_code == 413:
await update.message.reply_text(
text=ans.file_size_error.format(update.message.document.file_name),
Expand All @@ -160,7 +159,6 @@ async def handler_print(update: Update, context: ContextTypes.DEFAULT_TYPE):
)
logging.warning(f'{log_actor(update)} print api 413 SizeErr')
return

elif r.status_code == 415:
await update.message.reply_text(
text=ans.unreadable_file_error.format(update.message.document.file_name),
Expand All @@ -169,14 +167,13 @@ async def handler_print(update: Update, context: ContextTypes.DEFAULT_TYPE):
)
logging.warning(f'{log_actor(update)} print api 415 UnreadableErr')
return
await context.bot.send_message(
else: context.bot.send_message(
chat_id=update.effective_user.id,
text=ans.unreadable_file_error,
text=ans.print_err,
parse_mode=ParseMode('HTML'),
)
logging.warning(f'{log_actor(update)} print unknown error')


@errors_solver
@log_formatter
async def handler_mismatch_doctype(update: Update, context: ContextTypes.DEFAULT_TYPE):
Expand Down

0 comments on commit 3e82060

Please sign in to comment.