aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Matteo Bertucci <[email protected]>2020-03-02 17:48:40 +0100
committerGravatar Matteo Bertucci <[email protected]>2020-03-02 17:48:40 +0100
commit0fc2ebbfeb6f6296f8eb74a7191785bfaa551f90 (patch)
tree327549d9fa897e67b0262c58443692263ff4608b
parentRemove task self cancel. (diff)
Delete the loop argument from schedule_task calls
The function doesn't take the loop as an argument anymore
-rw-r--r--bot/cogs/filtering.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/bot/cogs/filtering.py b/bot/cogs/filtering.py
index 6c9e9a4b7..347554ae2 100644
--- a/bot/cogs/filtering.py
+++ b/bot/cogs/filtering.py
@@ -202,7 +202,7 @@ class Filtering(Cog, Scheduler):
}
await self.bot.api_client.post('bot/offensive-messages', json=data)
- self.schedule_task(self.bot.loop, msg.id, data)
+ self.schedule_task(msg.id, data)
log.trace(f"Offensive message {msg.id} will be deleted on {delete_date}")
if isinstance(msg.channel, DMChannel):
@@ -418,7 +418,7 @@ class Filtering(Cog, Scheduler):
if delete_at < now:
await self.delete_offensive_msg(msg)
else:
- self.schedule_task(self.bot.loop, msg['id'], msg)
+ self.schedule_task(msg['id'], msg)
async def delete_offensive_msg(self, msg: Mapping[str, str]) -> None:
"""Delete an offensive message, and then delete it from the db."""