diff --git a/plugins/callbacks/submission.py b/plugins/callbacks/submission.py index 0a7439e..f6a68a9 100644 --- a/plugins/callbacks/submission.py +++ b/plugins/callbacks/submission.py @@ -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 diff --git a/plugins/handlers/submission.py b/plugins/handlers/submission.py index 3b27d25..b184657 100644 --- a/plugins/handlers/submission.py +++ b/plugins/handlers/submission.py @@ -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(