From 0b09d32d47734cabf357601dd76cfbd30402063d Mon Sep 17 00:00:00 2001 From: huker667 Date: Tue, 4 Aug 2026 22:18:25 +0300 Subject: фикс фикс прошлого коммита MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- main.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'main.py') diff --git a/main.py b/main.py index 504b2e0..2c2593e 100644 --- a/main.py +++ b/main.py @@ -113,6 +113,22 @@ async def guest_middleware(handler, event, data): elif alo_command[user_id]["action"] == "p_prompt": alo_command[user_id]["action"] = None alo_command[user_id]["prompt"] = message.text + + if len(config["prompts"]) >= MAX_PROMPTS: + return await bot.edit_message_text( + text=f"невозможно создать новый промпт так как ты превысил лимит промптов da.", + chat_id=alo_command[user_id]["chat_id"], + message_id=alo_command[user_id]["message_id"], + reply_markup=InlineKeyboardMarkup( + inline_keyboard=[ + [ + InlineKeyboardButton( + text=f"ок", callback_data=f"user_prompts%{user_id}" + ), + ], + ] + ) + ) while 1: alo_command[user_id]["id"] = ''.join(choices(string.ascii_letters, k=10)) -- cgit v1.3.1