randydev commited on
Commit
c76e2bd
Β·
verified Β·
1 Parent(s): 8f760c2

Update main.py

Browse files
Files changed (1) hide show
  1. main.py +12 -8
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 = check_expiration(user_id)
204
- protect_content = user_status["expired"] and not user_status["free_mode"]
205
- if protect_content:
206
- await message.reply("Your free mode has expired. Sending protected content.")
 
 
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 = check_expiration(user_id)
260
- protect_content = user_status["expired"] and not user_status["free_mode"]
261
- if protect_content:
262
- await message.reply("Your free mode has expired. Sending protected content.")
 
 
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)