fix fuckwit
All checks were successful
Build and Publish college-bot-v2 / build_and_publish (push) Successful in 14s

This commit is contained in:
Nexus 2024-06-11 21:50:41 +01:00
parent aca86f8b64
commit 728b30e873

View file

@ -229,7 +229,7 @@ class FFMeta(commands.Cog):
return await ctx.respond(file=discord.File(file, filename=filename))
paginator = commands.Paginator()
for line in stderr.splitlines():
for line in stderr.decode().splitlines():
if line.strip().startswith(":"):
continue
paginator.add_line(f"{line}"[:2000])
@ -240,7 +240,8 @@ class FFMeta(commands.Cog):
@commands.slash_command(name="right-behind-you")
async def right_behind_you(self, ctx: discord.ApplicationContext, image: discord.Attachment):
await ctx.defer()
if not Path("assets/right-behind-you.ogg").exists():
rbh = Path("assets/right-behind-you.ogg").resolve()
if not rbh.exists():
return await ctx.respond("The file `right-behind-you.ogg` is missing.")
if not image.content_type.startswith("image"):
return await ctx.respond("That's not an image!")
@ -257,7 +258,7 @@ class FFMeta(commands.Cog):
"-i",
temp.name,
"-i",
"assets/right-behind-you.ogg",
str(rbh),
"-c:v",
"libx264",
"-tune",
@ -279,7 +280,7 @@ class FFMeta(commands.Cog):
else:
return await ctx.respond(file=discord.File(file, filename="right-behind-you.mp4"))
paginator = commands.Paginator()
for line in stderr.splitlines():
for line in stderr.decode().splitlines():
if line.strip().startswith(":"):
continue
paginator.add_line(f"{line}"[:2000])