randydev commited on
Commit
58c93e3
1 Parent(s): c816df3

Update chatbot/plugins/chat.py

Browse files
Files changed (1) hide show
  1. chatbot/plugins/chat.py +6 -0
chatbot/plugins/chat.py CHANGED
@@ -76,6 +76,7 @@ async def rmchatbot_user(client: Client, message: Message):
76
  | filters.video
77
  | filters.audio
78
  | filters.voice
 
79
  | filters.regex(r"\b(Randy|Rendi)\b(.*)", flags=re.IGNORECASE)
80
  )
81
  & (filters.private | filters.group)
@@ -130,6 +131,11 @@ async def chatbot_talk(client: Client, message: Message):
130
  except Exception as e:
131
  return await ai_reply.edit_text(f"Error: {e}")
132
 
 
 
 
 
 
133
  if message.audio or message.voice:
134
  await client.send_chat_action(message.chat.id, enums.ChatAction.UPLOAD_AUDIO)
135
  await asyncio.sleep(1.5)
 
76
  | filters.video
77
  | filters.audio
78
  | filters.voice
79
+ | filters.document
80
  | filters.regex(r"\b(Randy|Rendi)\b(.*)", flags=re.IGNORECASE)
81
  )
82
  & (filters.private | filters.group)
 
131
  except Exception as e:
132
  return await ai_reply.edit_text(f"Error: {e}")
133
 
134
+ if message.document:
135
+ is_check_plan = await db.gemini_plan(user_id=message.from_user.id)
136
+ if not is_check_plan:
137
+ return await message.reply_text("Only plan gemini")
138
+
139
  if message.audio or message.voice:
140
  await client.send_chat_action(message.chat.id, enums.ChatAction.UPLOAD_AUDIO)
141
  await asyncio.sleep(1.5)