Skip to content

Commit

Permalink
Update p_ttishow.py
Browse files Browse the repository at this point in the history
  • Loading branch information
VJBots authored Jun 5, 2024
1 parent 86991a7 commit c35ac0e
Showing 1 changed file with 56 additions and 1 deletion.
57 changes: 56 additions & 1 deletion plugins/p_ttishow.py
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,62 @@ async def fsub_wto_try(client, message):
pass
return await message.reply('No such file exist.')
files = files_[0]

title = '@VJ_Bots ' + ' '.join(filter(lambda x: not x.startswith('[') and not x.startswith('@'), files.file_name.split()))
size=get_size(files.file_size)
f_caption=files.caption
if CUSTOM_FILE_CAPTION:
try:
f_caption=CUSTOM_FILE_CAPTION.format(file_name= '' if title is None else title, file_size='' if size is None else size, file_caption='' if f_caption is None else f_caption)
except Exception as e:
logger.exception(e)
f_caption=f_caption
if f_caption is None:
f_caption = f"@VJ_Bots {' '.join(filter(lambda x: not x.startswith('[') and not x.startswith('@'), files.file_name.split()))}"
if not await db.has_premium_access(message.from_user.id):
if not await check_verification(client, message.from_user.id) and VERIFY == True:
btn = [[
InlineKeyboardButton("Verify", url=await get_token(client, message.from_user.id, f"https://telegram.me/{temp.U_NAME}?start="))
],[
InlineKeyboardButton("How To Open Link & Verify", url=VERIFY_TUTORIAL)
]]
await client.send_message(
chat_id=message.from_user.id,
text="<b>You are not verified !\nKindly verify to continue !</b>",
protect_content=True,
reply_markup=InlineKeyboardMarkup(btn)
)
return
if STREAM_MODE == True:
button = [[
InlineKeyboardButton('Sᴜᴘᴘᴏʀᴛ Gʀᴏᴜᴘ', url=f'https://t.me/{SUPPORT_CHAT}'),
InlineKeyboardButton('Uᴘᴅᴀᴛᴇs Cʜᴀɴɴᴇʟ', url=CHNL_LNK)
],[
InlineKeyboardButton("𝗕𝗢𝗧 𝗢𝗪𝗡𝗘𝗥", url="t.me/KingVJ01")
],[
InlineKeyboardButton('🚀 Fast Download / Watch Online🖥️', callback_data=f'generate_stream_link:{file_id}') #Don't change anything without contacting me @KingVJ01
]]
else:
button = [[
InlineKeyboardButton('Sᴜᴘᴘᴏʀᴛ Gʀᴏᴜᴘ', url=f'https://t.me/{SUPPORT_CHAT}'),
InlineKeyboardButton('Uᴘᴅᴀᴛᴇs Cʜᴀɴɴᴇʟ', url=CHNL_LNK)
],[
InlineKeyboardButton("𝗕𝗢𝗧 𝗢𝗪𝗡𝗘𝗥", url="t.me/KingVJ01")
]]
msg = await client.send_cached_media(
chat_id=message.from_user.id,
file_id=file_id,
caption=f_caption,
protect_content=True if pre == 'filep' else False,
reply_markup=InlineKeyboardMarkup(button)
)
btn = [[
InlineKeyboardButton("Get File Again", callback_data=f'delfile#{file_id}')
]]
k = await client.send_message(message.from_user.id, "<b><u>❗️❗️❗️IMPORTANT❗️️❗️❗️</u></b>\n\nThis Movie File/Video will be deleted in <b><u>10 mins</u> 🫥 <i></b>(Due to Copyright Issues)</i>.\n\n<b><i>Please forward this File/Video to your Saved Messages and Start Download there</i></b>",quote=True)
await asyncio.sleep(600)
await msg.delete()
await k.edit_text("<b>Your File/Video is successfully deleted!!!\n\nClick below button to get your deleted file 👇</b>",reply_markup=InlineKeyboardMarkup(btn))
return

@Client.on_message(filters.new_chat_members & filters.group)
async def save_group(bot, message):
Expand Down

0 comments on commit c35ac0e

Please sign in to comment.