Already sent message added

This commit is contained in:
Profitroll 2022-10-23 00:42:21 +02:00
parent 64e0d095ce
commit fc0579f2f6
2 changed files with 5 additions and 2 deletions

View File

@ -46,6 +46,7 @@
"application_status_not_send": "Анкета ще не була відправлена",
"contact_invalid": "Надісланий контакт не має розпочатої анкети.",
"contact_not_member": "Надісланий контакт не є користувачем Telegram.",
"already_sent": "Анкету вже надіслано, просто почекай. Тобі одразу повідомлять, яке рішення буде прийнято.",
"question_titles": {
"question1": "Ім'я/звертання:",
"question2": "Вік:",

View File

@ -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"))
# ==============================================================================================================================