/cancel, /identify, sponsorships improvements and fixes #3

Merged
profitroll merged 19 commits from dev into master 2023-01-03 16:45:20 +02:00
Showing only changes of commit 6aa8128fc6 - Show all commits

View File

@ -2,6 +2,7 @@ from app import app
from pyrogram import filters
from pyrogram.types import ForceReply, ReplyKeyboardMarkup, Message
from pyrogram.client import Client
from classes.holo_user import HoloUser
from modules.utils import all_locales, locale, logWrite
# Welcome check ================================================================================================================
@ -11,7 +12,7 @@ for pattern in all_locales("welcome", "keyboard"):
for pattern in all_locales("return", "keyboard"):
welcome_1.append(pattern[0][0])
@app.on_message(~ filters.scheduled & filters.private & filters.command(welcome_1, prefixes=[""]))
async def welcome_pass(app, msg, once_again: bool = True) -> None:
async def welcome_pass(app: Client, msg: Message, once_again: bool = True) -> None:
"""Set user's stage to 1 and start a fresh application
### Args:
@ -22,6 +23,10 @@ async def welcome_pass(app, msg, once_again: bool = True) -> None:
if not once_again:
await msg.reply_text(locale("privacy_notice", "message"))
holo_user = HoloUser(msg.from_user)
holo_user.application_restart()
logWrite(f"User {msg.from_user.id} confirmed starting the application")
await msg.reply_text(locale("question1", "message", locale=msg.from_user), reply_markup=ForceReply(placeholder=locale("question1", "force_reply", locale=msg.from_user)))