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"],
|
"id": fmt["format_id"],
|
||||||
"ext": fmt["ext"],
|
"ext": fmt["ext"],
|
||||||
"protocol": fmt["protocol"],
|
"protocol": fmt["protocol"],
|
||||||
"acodec": fmt["acodec"],
|
"acodec": fmt.get("acodec", "?"),
|
||||||
"vcodec": fmt["vcodec"],
|
"vcodec": fmt.get("vcodec", "?"),
|
||||||
"resolution": fmt["resolution"],
|
"resolution": fmt.get("resolution", "?x?"),
|
||||||
"filesize": fmt.get("filesize", float('inf')),
|
"filesize": fmt.get("filesize", float('inf')),
|
||||||
"format": fmt["format"],
|
"format": fmt.get("format", '?'),
|
||||||
}
|
}
|
||||||
for fmt in info["formats"]
|
for fmt in info["formats"]
|
||||||
}
|
}
|
||||||
|
@ -928,7 +928,8 @@ class OtherCog(commands.Cog):
|
||||||
title="Error",
|
title="Error",
|
||||||
description="Invalid format %r. pass `list-formats:True` to see a list of formats." % _fmt,
|
description="Invalid format %r. pass `list-formats:True` to see a list of formats." % _fmt,
|
||||||
colour=discord.Colour.red()
|
colour=discord.Colour.red()
|
||||||
)
|
),
|
||||||
|
delete_after=30
|
||||||
)
|
)
|
||||||
|
|
||||||
MAX_SIZE_MB = ctx.guild.filesize_limit / 1024 / 1024
|
MAX_SIZE_MB = ctx.guild.filesize_limit / 1024 / 1024
|
||||||
|
@ -1015,7 +1016,8 @@ class OtherCog(commands.Cog):
|
||||||
title="Error",
|
title="Error",
|
||||||
description=f"Download failed:\n```\n{e}\n```",
|
description=f"Download failed:\n```\n{e}\n```",
|
||||||
colour=discord.Colour.red()
|
colour=discord.Colour.red()
|
||||||
)
|
),
|
||||||
|
delete_after=30
|
||||||
)
|
)
|
||||||
else:
|
else:
|
||||||
embed = discord.Embed(
|
embed = discord.Embed(
|
||||||
|
|
Loading…
Reference in a new issue