fix: do not send a new message when an error occurs
All checks were successful
Build / Upload to production (push) Successful in 1m42s
All checks were successful
Build / Upload to production (push) Successful in 1m42s
This commit is contained in:
parent
46cd965913
commit
a33df8f28a
1 changed files with 3 additions and 1 deletions
|
@ -60,8 +60,10 @@ async def info_command(update: Update, context: ContextTypes.DEFAULT_TYPE) -> No
|
||||||
)
|
)
|
||||||
post_data = get_json(f"posts/{post_id}")
|
post_data = get_json(f"posts/{post_id}")
|
||||||
if post_data is None:
|
if post_data is None:
|
||||||
await update.message.reply_text(
|
await context.bot.edit_message_text(
|
||||||
f"{html_parser.bold("Error")}: That record was not found.",
|
f"{html_parser.bold("Error")}: That record was not found.",
|
||||||
|
update.effective_chat.id,
|
||||||
|
message.message_id,
|
||||||
parse_mode=ParseMode.HTML,
|
parse_mode=ParseMode.HTML,
|
||||||
)
|
)
|
||||||
return
|
return
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue