Small Fixes.

- fixing get addons
- fixing file_download
This commit is contained in:
Devesh Pal
2021-09-19 14:31:08 +05:30
committed by GitHub
parent 50bd12708a
commit 8f28387fb3
2 changed files with 3 additions and 2 deletions

View File

@@ -26,7 +26,7 @@ async def get_the_addons_lol(event):
if thelink is None:
return await eor(xx, fool, time=10)
split_thelink = thelink.split("/")
if "raw" not in split_thelink:
if "raw" not in thelink:
return await eor(xx, fool, time=10)
name_of_it = split_thelink[(len(split_thelink) - 1)]
plug = requests.get(thelink).text

View File

@@ -380,9 +380,10 @@ async def dl_playlist(chat, from_user, link):
async def file_download(event, reply, fast_download=True):
thumb = "https://telegra.ph/file/22bb2349da20c7524e4db.mp4"
title = reply.file.title or reply.file.name or str(time()) + ".mp4"
file = reply.file.name or str(time()) + ".mp4"
if fast_download:
dl = await downloader(
"vcbot/downloads/" + reply.file.name,
"vcbot/downloads/" + file,
reply.media.document,
event,
time(),