From fc0579f2f63b2f2fbedaa6835e2d7bedf5d9e3bd Mon Sep 17 00:00:00 2001 From: Profitroll <47523801+profitrollgame@users.noreply.github.com> Date: Sun, 23 Oct 2022 00:42:21 +0200 Subject: [PATCH] Already sent message added --- locale/uk.json | 1 + main.py | 6 ++++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/locale/uk.json b/locale/uk.json index 4941bf3..9b4aa56 100644 --- a/locale/uk.json +++ b/locale/uk.json @@ -46,6 +46,7 @@ "application_status_not_send": "Анкета ще не була відправлена", "contact_invalid": "Надісланий контакт не має розпочатої анкети.", "contact_not_member": "Надісланий контакт не є користувачем Telegram.", + "already_sent": "Анкету вже надіслано, просто почекай. Тобі одразу повідомлять, яке рішення буде прийнято.", "question_titles": { "question1": "Ім'я/звертання:", "question2": "Вік:", diff --git a/main.py b/main.py index e7dccfc..f7e2687 100644 --- a/main.py +++ b/main.py @@ -227,6 +227,7 @@ async def callback_query_refuse(app, clb): # ============================================================================================================================== +# Contact getting ============================================================================================================== @app.on_message(~ filters.scheduled & filters.contact) async def get_contact(app, msg): if (msg.from_user.id in configGet("admins")) or (msg.from_user.id == configGet("owner")): @@ -253,6 +254,7 @@ async def get_contact(app, msg): await msg.reply_text(locale("contact_invalid", "message")) else: await msg.reply_text(locale("contact_not_member", "message")) +# ============================================================================================================================== # Any other input ============================================================================================================== @@ -295,10 +297,10 @@ async def any_stage(app, msg): #configSet("sent", True, file=str(msg.from_user.id)) #configSet("application_date", int(time()), file=str(msg.from_user.id)) else: - await msg.reply_text("You are already done, wait!") + await msg.reply_text(locale("already_sent", "message")) else: if not configGet("approved", file=str(msg.from_user.id)) and not configGet("refused", file=str(msg.from_user.id)): - await msg.reply_text("You are already done, wait!") + await msg.reply_text(locale("already_sent", "message")) # ==============================================================================================================================