Skip to content

Commit 073b996

Browse files
committed
Use create_task
1 parent 1661d95 commit 073b996

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

core/thread.py

+6-3
Original file line numberDiff line numberDiff line change
@@ -362,12 +362,15 @@ async def send(self, message, destination=None,
362362
from_mod=False, note=False, anonymous=False):
363363
if self.close_task is not None:
364364
# cancel closing if a thread message is sent.
365-
await asyncio.gather(
366-
self.cancel_closure(),
365+
self.bot.loop.create_task(
366+
self.cancel_closure()
367+
)
368+
self.bot.loop.create_task(
367369
self.channel.send(embed=discord.Embed(
368370
color=discord.Color.red(),
369371
description='Scheduled close has been cancelled.'
370-
)))
372+
))
373+
)
371374

372375
if not self.ready:
373376
await self.wait_until_ready()

0 commit comments

Comments
 (0)