diff --git a/src/cogs/ytdl.py b/src/cogs/ytdl.py index 1fc5144..6cf41bd 100644 --- a/src/cogs/ytdl.py +++ b/src/cogs/ytdl.py @@ -263,7 +263,7 @@ class YTDLCog(commands.Cog): last_edit = time.time() options = self.default_options.copy() - async def _download_hook(_data: dict[str, typing.Any]): + def _download_hook(_data: dict[str, typing.Any]): n = time.time() _total = _data.get("total_bytes", _data.get("total_bytes_estimate")) if _total: @@ -282,7 +282,7 @@ class YTDLCog(commands.Cog): if (n - last_edit) >= 5: embed.clear_fields() embed.add_field(name="Progress", value=line) - await ctx.edit(embed=embed) + ctx.bot.loop.create_task(ctx.edit(embed=embed)) last_edit = time.time() options["progress_hooks"] = [_download_hook]