Ok
Browse files- chatbot/plugins/chat.py +8 -1
chatbot/plugins/chat.py
CHANGED
@@ -1490,7 +1490,14 @@ async def chatbot_talk(client: Client, message: Message):
|
|
1490 |
await client.send_chat_action(message.chat.id, enums.ChatAction.CANCEL)
|
1491 |
return
|
1492 |
|
1493 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1494 |
buttons = [
|
1495 |
[
|
1496 |
InlineKeyboardButton(
|
|
|
1490 |
await client.send_chat_action(message.chat.id, enums.ChatAction.CANCEL)
|
1491 |
return
|
1492 |
|
1493 |
+
_deletemydata_match = re.match(r"^--deletemydata\s+--reason\s+(.+)$", query_base, re.IGNORECASE)
|
1494 |
+
if _deletemydata_match:
|
1495 |
+
reasons = _deletemydata_match.group(1).strip()
|
1496 |
+
if not reasons:
|
1497 |
+
await message.reply_text("Reason cannot be empty")
|
1498 |
+
return
|
1499 |
+
if len(reasons) < 15:
|
1500 |
+
return await message.reply_text("Reason is too short (minimum 15 characters).")
|
1501 |
buttons = [
|
1502 |
[
|
1503 |
InlineKeyboardButton(
|