Fix TypeError in opusinate

This commit is contained in:
Nexus 2024-02-07 16:56:41 +00:00
parent 9ef6dfdf98
commit 178c3028de

View file

@ -125,11 +125,11 @@ class FFMeta(commands.Cog):
discord.Option( discord.Option(
int, int,
description="The bitrate in kilobits of the resulting audio from 1-512", description="The bitrate in kilobits of the resulting audio from 1-512",
default=64, default=96,
min_value=1, min_value=1,
max_value=512 max_value=512
) )
] = 64, ] = 96,
mono: typing.Annotated[ mono: typing.Annotated[
bool, bool,
discord.Option( discord.Option(
@ -176,7 +176,7 @@ class FFMeta(commands.Cog):
except json.JSONDecodeError: except json.JSONDecodeError:
pass pass
duration = data["format"].get("duration", 195) duration = float(data["format"].get("duration", 195))
max_end_size = ((bitrate * duration * channels) / 8) * 1024 max_end_size = ((bitrate * duration * channels) / 8) * 1024
if max_end_size > (24.75 * 1024 * 1024): if max_end_size > (24.75 * 1024 * 1024):
return await ctx.respond( return await ctx.respond(