Skip to content

Commit

Permalink
Update extractor.py
Browse files Browse the repository at this point in the history
  • Loading branch information
DevAVR authored Mar 1, 2021
1 parent 1e05f21 commit f87fa70
Showing 1 changed file with 9 additions and 29 deletions.
38 changes: 9 additions & 29 deletions plugins/extractor.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,43 +12,23 @@
from pyrogram.types import InlineKeyboardMarkup, InlineKeyboardButton
from pyrogram.errors import UserNotParticipant

file_types = [
"video/x-msvideo",
"video/x-flv",
"video/webm",
"video/x-m4v",
"video/mp4",
"video/mpeg",
"video/ogg",
"video/x-matroska",
"video/webm"
]


@trojanz.on_message(filters.private & (filters.document | filters.video))
async def confirm_dwnld(client, message):
media = message
filetype = media.document or media.video

if int(filetype.file_size/1024/1024) <= 8:

if filetype.mime_type in file_types:
await message.reply_text(
"**Select the Optins Below**",
quote=True,
reply_markup=InlineKeyboardMarkup(
[[InlineKeyboardButton(text="DOWNLOAD", callback_data="download_file")],
[InlineKeyboardButton(text="CANCEL", callback_data="close")]]
)
)
else:
await message.reply_text(
"```Invalid Media```",
quote=True
if filetype.mime_type.startswith("video/"):
await message.reply_text(
"**Select the Optins Below**",
quote=True,
reply_markup=InlineKeyboardMarkup(
[[InlineKeyboardButton(text="DOWNLOAD", callback_data="download_file")],
[InlineKeyboardButton(text="CANCEL", callback_data="close")]]
)
)
else:
await message.reply_text(
"**Cheriya Size Ayakkadey...**",
"```Invalid Media```",
quote=True
)

0 comments on commit f87fa70

Please sign in to comment.