mirror of
https://github.com/yasirarism/MissKatyPyro.git
synced 2025-12-29 17:44:50 +00:00
Fxi
This commit is contained in:
parent
5b1c78c529
commit
7cfad4e76a
2 changed files with 8 additions and 2 deletions
|
|
@ -93,7 +93,10 @@ async def download(client, message):
|
|||
custom_file_name = custom_file_name.strip()
|
||||
download_file_path = os.path.join("downloads/", custom_file_name)
|
||||
downloader = SmartDL(url, download_file_path, progress_bar=False, timeout=10)
|
||||
downloader.start(blocking=False)
|
||||
try:
|
||||
downloader.start(blocking=False)
|
||||
except Exception as err:
|
||||
return await ctx.edit(str(err))
|
||||
c_time = time.time()
|
||||
while not downloader.isFinished():
|
||||
total_length = downloader.filesize or None
|
||||
|
|
|
|||
|
|
@ -48,7 +48,10 @@ async def genss(self: Client, ctx: Message, strings):
|
|||
file_name = os.path.basename(url)
|
||||
download_file_path = os.path.join("downloads/", file_name)
|
||||
downloader = SmartDL(url, download_file_path, progress_bar=False, timeout=10)
|
||||
downloader.start(blocking=False)
|
||||
try:
|
||||
downloader.start(blocking=False)
|
||||
except Exception as err:
|
||||
return await ctx.edit(str(err))
|
||||
c_time = time.time()
|
||||
while not downloader.isFinished():
|
||||
total_length = downloader.filesize or None
|
||||
|
|
|
|||
Loading…
Reference in a new issue