mirror of
https://github.com/uhIgnacio/EmoteManager.git
synced 2024-08-15 02:23:13 +00:00
cogs/emotes.cog_unload: create 1 task instead of 3
This commit is contained in:
parent
10ed6bb63f
commit
f25ceb32a5
1 changed files with 4 additions and 4 deletions
|
@ -43,14 +43,14 @@ class Emotes(commands.Cog):
|
||||||
self.paginators = weakref.WeakSet()
|
self.paginators = weakref.WeakSet()
|
||||||
|
|
||||||
def cog_unload(self):
|
def cog_unload(self):
|
||||||
self.bot.loop.create_task(self.http.close())
|
async def close():
|
||||||
self.bot.loop.create_task(self.aioec.close())
|
await self.http.close()
|
||||||
|
await self.aioec.close()
|
||||||
|
|
||||||
async def stop_all_paginators():
|
|
||||||
for paginator in self.paginators:
|
for paginator in self.paginators:
|
||||||
await paginator.stop()
|
await paginator.stop()
|
||||||
|
|
||||||
self.bot.loop.create_task(stop_all_paginators())
|
self.bot.loop.create_task(close())
|
||||||
|
|
||||||
async def cog_check(self, context):
|
async def cog_check(self, context):
|
||||||
if not context.guild or not isinstance(context.author, discord.Member):
|
if not context.guild or not isinstance(context.author, discord.Member):
|
||||||
|
|
Loading…
Reference in a new issue