Update main.py
Browse files
main.py
CHANGED
@@ -200,10 +200,12 @@ async def searchhub(client: Client, message: Message):
|
|
200 |
if query in not_allowed:
|
201 |
return await pro.edit_text("I don't understand, can you help me?")
|
202 |
try:
|
203 |
-
user_status =
|
204 |
-
protect_content =
|
205 |
-
if
|
206 |
-
await message.reply("
|
|
|
|
|
207 |
|
208 |
response = await api.x_search(query=query)
|
209 |
if response is None:
|
@@ -256,10 +258,12 @@ async def porno_download(client: Client, message: Message):
|
|
256 |
return await message.reply_text("invalid link.")
|
257 |
pro = await message.reply_text("Processing.....")
|
258 |
try:
|
259 |
-
user_status =
|
260 |
-
protect_content =
|
261 |
-
if
|
262 |
-
await message.reply("
|
|
|
|
|
263 |
file_path, thumb, _ = await api.x_download(url=link, is_stream=True)
|
264 |
upload_text = f"**β¬οΈ π΄ππ
ππΊπ½πππ video ...**"
|
265 |
await pro.edit_text(upload_text)
|
|
|
200 |
if query in not_allowed:
|
201 |
return await pro.edit_text("I don't understand, can you help me?")
|
202 |
try:
|
203 |
+
user_status = check_user_expiration(user_id)
|
204 |
+
protect_content = not user_status["free_mode"]
|
205 |
+
if user_status["free_mode"]:
|
206 |
+
await message.reply("Free mode is active. Sending unprotected content.")
|
207 |
+
else:
|
208 |
+
await message.reply("Free mode is inactive or expired. Sending protected content.")
|
209 |
|
210 |
response = await api.x_search(query=query)
|
211 |
if response is None:
|
|
|
258 |
return await message.reply_text("invalid link.")
|
259 |
pro = await message.reply_text("Processing.....")
|
260 |
try:
|
261 |
+
user_status = check_user_expiration(user_id)
|
262 |
+
protect_content = not user_status["free_mode"]
|
263 |
+
if user_status["free_mode"]:
|
264 |
+
await message.reply("Free mode is active. Sending unprotected content.")
|
265 |
+
else:
|
266 |
+
await message.reply("Free mode is inactive or expired. Sending protected content.")
|
267 |
file_path, thumb, _ = await api.x_download(url=link, is_stream=True)
|
268 |
upload_text = f"**β¬οΈ π΄ππ
ππΊπ½πππ video ...**"
|
269 |
await pro.edit_text(upload_text)
|