mirror of
https://github.com/nexy7574/LCC-bot.git
synced 2024-09-19 18:16:34 +01:00
Fix missing key error in yt-dl
This commit is contained in:
parent
42367b0514
commit
485061bb49
1 changed files with 8 additions and 6 deletions
|
@ -143,11 +143,11 @@ class OtherCog(commands.Cog):
|
|||
"id": fmt["format_id"],
|
||||
"ext": fmt["ext"],
|
||||
"protocol": fmt["protocol"],
|
||||
"acodec": fmt["acodec"],
|
||||
"vcodec": fmt["vcodec"],
|
||||
"resolution": fmt["resolution"],
|
||||
"acodec": fmt.get("acodec", "?"),
|
||||
"vcodec": fmt.get("vcodec", "?"),
|
||||
"resolution": fmt.get("resolution", "?x?"),
|
||||
"filesize": fmt.get("filesize", float('inf')),
|
||||
"format": fmt["format"],
|
||||
"format": fmt.get("format", '?'),
|
||||
}
|
||||
for fmt in info["formats"]
|
||||
}
|
||||
|
@ -928,7 +928,8 @@ class OtherCog(commands.Cog):
|
|||
title="Error",
|
||||
description="Invalid format %r. pass `list-formats:True` to see a list of formats." % _fmt,
|
||||
colour=discord.Colour.red()
|
||||
)
|
||||
),
|
||||
delete_after=30
|
||||
)
|
||||
|
||||
MAX_SIZE_MB = ctx.guild.filesize_limit / 1024 / 1024
|
||||
|
@ -1015,7 +1016,8 @@ class OtherCog(commands.Cog):
|
|||
title="Error",
|
||||
description=f"Download failed:\n```\n{e}\n```",
|
||||
colour=discord.Colour.red()
|
||||
)
|
||||
),
|
||||
delete_after=30
|
||||
)
|
||||
else:
|
||||
embed = discord.Embed(
|
||||
|
|
Loading…
Reference in a new issue