фикс фикс прошлого коммита
This commit is contained in:
1 parent
3e6b137bf3
commit
0b09d32d47
2 files changed
+17
-1
No files matched your search
+1
-1
@@ -338,7 +338,7 @@ async def start_handler(message: Message, command: CommandObject):
|
||||
]
|
||||
)
|
||||
else:
|
||||
InlineKeyboardMarkup(
|
||||
keyboard = InlineKeyboardMarkup(
|
||||
inline_keyboard=[
|
||||
[InlineKeyboardButton(text="✅ добавить", callback_data=f"ap%{user_id}%{prompt_user_id}%{prompt_id}")],
|
||||
[InlineKeyboardButton(text="✅🔗 доб. + установить", callback_data=f"sp%{user_id}%{prompt_user_id}%{prompt_id}%2")],
|
||||
|
||||
@@ -114,6 +114,22 @@ async def guest_middleware(handler, event, data):
|
||||
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))
|
||||
if alo_command[user_id]["id"] not in config["prompts"]:
|
||||
|
||||
Reference in new issue
Block a user