@@ -51,6 +51,7 @@ async def close(self, *, closer, after=0, silent=False,
51
51
"""Close a thread now or after a set time in seconds"""
52
52
53
53
if self .close_task is not None :
54
+ # restarts the after timer
54
55
self .close_task .cancel ()
55
56
56
57
if after > 0 :
@@ -164,7 +165,7 @@ async def reply(self, message):
164
165
self .send (message , self .recipient , from_mod = True )
165
166
]
166
167
167
- if self .close_task is not None and not self . close_task . cancelled () :
168
+ if self .close_task is not None :
168
169
# cancel closing if a thread message is sent.
169
170
self .close_task .cancel ()
170
171
tasks .append (self .channel .send (
@@ -175,7 +176,7 @@ async def reply(self, message):
175
176
await asyncio .gather (* tasks )
176
177
177
178
async def send (self , message , destination = None , from_mod = False ):
178
- if self .close_task is not None and not self . close_task . cancelled () :
179
+ if self .close_task is not None :
179
180
# cancel closing if a thread message is sent.
180
181
self .close_task .cancel ()
181
182
await self .channel .send (embed = discord .Embed (
@@ -282,7 +283,7 @@ def get_notifications(self):
282
283
if key in config ['notification_squad' ]:
283
284
mentions .extend (config ['notification_squad' ][key ])
284
285
del config ['notification_squad' ][key ]
285
- asyncio .create_task (config .update ())
286
+ self . bot . loop .create_task (config .update ())
286
287
287
288
return ' ' .join (mentions )
288
289
0 commit comments