JamesBond531 commited on
Commit
af849c7
1 Parent(s): 68c632c

Update plugins/commands.py

Browse files
Files changed (1) hide show
  1. plugins/commands.py +11 -28
plugins/commands.py CHANGED
@@ -385,6 +385,9 @@ async def start(client, message):
385
  verify_id = ''.join(random.choices(string.ascii_uppercase + string.digits, k=7))
386
  await db.create_verify_id(user_id, verify_id)
387
  g = await get_shortlink(chat_id, f"https://telegram.me/{temp.U_NAME}?start=file_{file_id}_{verify_id}")
 
 
 
388
  if g and "shrs.link" in g and chat_id in ADMIN_GROUPS:
389
  await client.send_message(chat_id=user_id,text=f"<b>📕Nᴀᴍᴇ ➠ : <code>{files.file_name}</code> \n\n🔗Sɪᴢᴇ ➠ : {get_size(files.file_size)}\n\n📂Fɪʟᴇ ʟɪɴᴋ ➠ : {g}\n\n<i>Note: Open this Link and Skip ads to get file (Only one page)</i></b>",
390
  reply_markup=InlineKeyboardMarkup(
@@ -398,37 +401,17 @@ async def start(client, message):
398
  )
399
  )
400
  else:
401
- try:
402
- await client.send_message(chat_id=user_id,text=f"<b>📕Nᴀᴍᴇ ➠ : <code>{files.file_name}</code> \n\n🔗Sɪᴢᴇ ➠ : {get_size(files.file_size)}\n\n📂Fɪʟᴇ ʟɪɴᴋ ➠ : {g}\n\n<i>Note: Open Link and Get Your File and also Get access for Unlimited files for next 2hrs without getting links in this bot</i></b>",
403
- reply_markup=InlineKeyboardMarkup(
404
- [
405
- [
406
- InlineKeyboardButton('📂 Dᴏᴡɴʟᴏᴀᴅ Nᴏᴡ 📂', url=g)
407
- ], [
408
- InlineKeyboardButton('⁉️ Hᴏᴡ Tᴏ Dᴏᴡɴʟᴏᴀᴅ ⁉️', url=await get_tutorial(chat_id))
409
- ]
410
- ]
411
- )
412
- )
413
- except AttributeError as e:
414
- print(e)
415
- print("User id: " , user_id)
416
- print(" Shortlink: " , g)
417
- chat_id = '-1001714266146'
418
- g = await get_shortlink(chat_id, f"https://telegram.me/{temp.U_NAME}?start=file_{file_id}_{verify_id}")
419
- await client.send_message(chat_id=user_id,text=f"<b>📕Nᴀᴍᴇ ➠ : <code>{files.file_name}</code> \n\n🔗Sɪᴢᴇ ➠ : {get_size(files.file_size)}\n\n📂Fɪʟᴇ ʟɪɴᴋ ➠ : {g}\n\n<i>Note: Open Link and Get Your File and also Get access for Unlimited files for next 2hrs without getting links in this bot</i></b>",
420
- reply_markup=InlineKeyboardMarkup(
421
  [
422
- [
423
- InlineKeyboardButton('📂 Dᴏᴡɴʟᴏᴀᴅ Nᴏᴡ 📂', url=g)
424
- ], [
425
- InlineKeyboardButton('⁉️ Hᴏᴡ Tᴏ Dᴏᴡɴʟᴏᴀᴅ ⁉️', url=await get_tutorial(chat_id))
426
- ]
427
  ]
428
- )
429
  )
430
- print("User id: " , user_id)
431
- print("Replaced Shortlink: " , g)
432
  # await asyncio.sleep(1200)
433
  # await k.edit("<b>Your message is successfully deleted!!!</b>")
434
  return
 
385
  verify_id = ''.join(random.choices(string.ascii_uppercase + string.digits, k=7))
386
  await db.create_verify_id(user_id, verify_id)
387
  g = await get_shortlink(chat_id, f"https://telegram.me/{temp.U_NAME}?start=file_{file_id}_{verify_id}")
388
+ if not g:
389
+ chat_id = '-1001714266146'
390
+ g = await get_shortlink(chat_id, f"https://telegram.me/{temp.U_NAME}?start=file_{file_id}_{verify_id}")
391
  if g and "shrs.link" in g and chat_id in ADMIN_GROUPS:
392
  await client.send_message(chat_id=user_id,text=f"<b>📕Nᴀᴍᴇ ➠ : <code>{files.file_name}</code> \n\n🔗Sɪᴢᴇ ➠ : {get_size(files.file_size)}\n\n📂Fɪʟᴇ ʟɪɴᴋ ➠ : {g}\n\n<i>Note: Open this Link and Skip ads to get file (Only one page)</i></b>",
393
  reply_markup=InlineKeyboardMarkup(
 
401
  )
402
  )
403
  else:
404
+ await client.send_message(chat_id=user_id,text=f"<b>📕Nᴀᴍᴇ ➠ : <code>{files.file_name}</code> \n\n🔗Sɪᴢᴇ ➠ : {get_size(files.file_size)}\n\n📂Fɪʟᴇ ʟɪɴᴋ ➠ : {g}\n\n<i>Note: Open Link and Get Your File and also Get access for Unlimited files for next 2hrs without getting links in this bot</i></b>",
405
+ reply_markup=InlineKeyboardMarkup(
406
+ [
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
407
  [
408
+ InlineKeyboardButton('📂 Dᴏᴡɴʟᴏᴀᴅ Nᴏᴡ 📂', url=g)
409
+ ], [
410
+ InlineKeyboardButton('⁉️ Hᴏᴡ Tᴏ Dᴏᴡɴʟᴏᴀᴅ ⁉️', url=await get_tutorial(chat_id))
 
 
411
  ]
412
+ ]
413
  )
414
+ )
 
415
  # await asyncio.sleep(1200)
416
  # await k.edit("<b>Your message is successfully deleted!!!</b>")
417
  return