From f9207e1f9951f97e5c6a0c3dbb525e9c5bf517b6 Mon Sep 17 00:00:00 2001 From: huker667 Date: Sat, 23 May 2026 17:26:56 +0300 Subject: add user to db on any action --- main.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'main.py') diff --git a/main.py b/main.py index 19114be..be7161a 100644 --- a/main.py +++ b/main.py @@ -124,6 +124,8 @@ async def guest_middleware(handler, event, data): ) return + + ensure_user(user_id) last_command_time[user_id] = current_time user_text = message.text or message.caption or "" @@ -236,7 +238,8 @@ async def text_handler(message: Message): return last_command_time[user_id] = current_time - + ensure_user(user_id) + replied = message.reply_to_message prompt = "" @@ -395,7 +398,8 @@ async def text_handler(message: Message): @router.inline_query() async def inline_handler(inline_query: InlineQuery): user_id = inline_query.from_user.id - + ensure_user(user_id) + button = InlineKeyboardButton(text="ало жди 📞", callback_data="pasholnaxxuy") if inline_query.query == "clear": -- cgit v1.3.1