From abae7ea979d2867239f07b4561ccd7aaa0acfb29 Mon Sep 17 00:00:00 2001 From: EEKIM10 Date: Thu, 11 May 2023 22:41:56 +0100 Subject: [PATCH] fix yt-dl-beta overrun --- cogs/other.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/cogs/other.py b/cogs/other.py index 8f18805..365826b 100644 --- a/cogs/other.py +++ b/cogs/other.py @@ -1331,11 +1331,13 @@ class OtherCog(commands.Cog): await ctx.channel.trigger_typing() embed.description = _desc await ctx.edit(embed=embed, files=files) - await asyncio.sleep(120.0) - try: - await ctx.edit(embed=None) - except discord.NotFound: - pass + async def bgtask(): + await asyncio.sleep(120.0) + try: + await ctx.edit(embed=None) + except discord.NotFound: + pass + self.bot.loop.create_task(bgtask()) @commands.slash_command(name="text-to-mp3") @commands.cooldown(5, 600, commands.BucketType.user)