Mime type unsupported message added

This commit is contained in:
Profitroll 2023-06-22 08:41:42 +00:00
parent 592b83377b
commit 76855cd472
Signed by: profitroll
GPG Key ID: FA35CAB49DACD3B2
2 changed files with 11 additions and 3 deletions

View File

@ -38,7 +38,9 @@ async def callback_query_yes(app: PyroClient, clb: CallbackQuery):
return
except SubmissionUnsupportedError:
await clb.answer(
text="Unsupported.",
text=app._("mime_not_allowed", "message", locale=user_locale).format(
", ".join(app.config["submission"]["mime_types"]), quote=True
),
show_alert=True,
)
return

View File

@ -227,7 +227,9 @@ async def get_submission(app: PyroClient, msg: Message):
return
except SubmissionUnsupportedError:
await msg.reply_text(
"Unsupported.",
app._("mime_not_allowed", "message", locale=user_locale).format(
", ".join(app.config["submission"]["mime_types"]), quote=True
),
quote=True,
)
return
@ -258,7 +260,11 @@ async def get_submission(app: PyroClient, msg: Message):
await msg.copy(app.owner, caption=caption)
return
except SubmissionUnsupportedError:
await msg.reply_text("Unsupported.", quote=True)
await msg.reply_text(
app._("mime_not_allowed", "message", locale=user_locale).format(
", ".join(app.config["submission"]["mime_types"]), quote=True
)
)
return
except SubmissionDuplicatesError as exp:
await msg.reply_text(