From 0d1240273dee554ecff2a41fc52a6f10e0a9a3e0 Mon Sep 17 00:00:00 2001 From: nexy7574 Date: Sat, 9 Sep 2023 22:20:18 +0100 Subject: [PATCH] Add end TS support --- cogs/other.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/cogs/other.py b/cogs/other.py index aedf9c5..2af020f 100644 --- a/cogs/other.py +++ b/cogs/other.py @@ -1024,12 +1024,17 @@ class OtherCog(commands.Cog): "-y", str(file) ] + if end_timestamp is not None: + minutes, seconds = divmod(end_timestamp, 60) + hours, minutes = divmod(minutes, 60) + _args.insert(5, "-to") + _args.insert(6, "{!s}:{!s}:{!s}".format(*map(round, (hours, minutes, seconds)))) await self.bot.loop.run_in_executor( None, partial( subprocess.run, - , + _args, check=True, capture_output=True )