Spaces:
Running
Running
Update chatbot/plugins/join_request.py
Browse files
chatbot/plugins/join_request.py
CHANGED
@@ -72,7 +72,7 @@ async def join_request(client: Client, event: ChatJoinRequest):
|
|
72 |
captcha_texts["chat_id"] = event.chat.id
|
73 |
keyboard = InlineKeyboardMarkup(
|
74 |
[
|
75 |
-
[InlineKeyboardButton(choice, callback_data=f"verify_{
|
76 |
for choice in choices
|
77 |
] + [
|
78 |
[InlineKeyboardButton("🔄 Refresh CAPTCHA", callback_data="refresh_captcha")],
|
@@ -88,7 +88,7 @@ async def join_request(client: Client, event: ChatJoinRequest):
|
|
88 |
reply_markup=keyboard
|
89 |
)
|
90 |
os.remove(img_path)
|
91 |
-
asyncio.create_task(remove_captcha_after_timeout(client,
|
92 |
except Exception as e:
|
93 |
await client.send_message(
|
94 |
event.chat.id,
|
|
|
72 |
captcha_texts["chat_id"] = event.chat.id
|
73 |
keyboard = InlineKeyboardMarkup(
|
74 |
[
|
75 |
+
[InlineKeyboardButton(choice, callback_data=f"verify_{event.from_user.id}_{choice}")]
|
76 |
for choice in choices
|
77 |
] + [
|
78 |
[InlineKeyboardButton("🔄 Refresh CAPTCHA", callback_data="refresh_captcha")],
|
|
|
88 |
reply_markup=keyboard
|
89 |
)
|
90 |
os.remove(img_path)
|
91 |
+
asyncio.create_task(remove_captcha_after_timeout(client, event.from_user.id))
|
92 |
except Exception as e:
|
93 |
await client.send_message(
|
94 |
event.chat.id,
|