Fix unnecessary typing before running commands in Downloader (#3964)

This commit is contained in:
jack1142 2020-06-18 15:47:12 +02:00 committed by GitHub
parent 35365a7154
commit a64c28aa44
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -77,8 +77,9 @@ class Downloader(commands.Cog):
pass pass
async def cog_before_invoke(self, ctx: commands.Context) -> None: async def cog_before_invoke(self, ctx: commands.Context) -> None:
async with ctx.typing(): if not self._ready.is_set():
await self._ready.wait() async with ctx.typing():
await self._ready.wait()
if self._ready_raised: if self._ready_raised:
await ctx.send( await ctx.send(
"There was an error during Downloader's initialization." "There was an error during Downloader's initialization."