aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Izan <[email protected]>2022-01-22 16:56:56 +0000
committerGravatar Mark <[email protected]>2022-01-25 21:37:29 -0800
commit10186afb0a376c82f71235b06f8f5af87f41bcb6 (patch)
tree5a44ca359729534f5d46492ce213b63cbc7e5de3
parentMerge pull request #2059 from novialriptide/novial-simple-rename (diff)
Add missing arguments to `notify_infraction` call
Fixes an issue caused by #1951.
-rw-r--r--bot/exts/moderation/infraction/superstarify.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/bot/exts/moderation/infraction/superstarify.py b/bot/exts/moderation/infraction/superstarify.py
index a037ca1be..3f1bffd76 100644
--- a/bot/exts/moderation/infraction/superstarify.py
+++ b/bot/exts/moderation/infraction/superstarify.py
@@ -57,7 +57,9 @@ class Superstarify(InfractionScheduler, Cog):
return
infraction = active_superstarifies[0]
- forced_nick = self.get_nick(infraction["id"], before.id)
+ infr_id = infraction["id"]
+
+ forced_nick = self.get_nick(infr_id, before.id)
if after.display_name == forced_nick:
return # Nick change was triggered by this event. Ignore.
@@ -67,11 +69,13 @@ class Superstarify(InfractionScheduler, Cog):
)
await after.edit(
nick=forced_nick,
- reason=f"Superstarified member tried to escape the prison: {infraction['id']}"
+ reason=f"Superstarified member tried to escape the prison: {infr_id}"
)
notified = await _utils.notify_infraction(
+ bot=self.bot,
user=after,
+ infr_id=infr_id,
infr_type="Superstarify",
expires_at=time.discord_timestamp(infraction["expires_at"]),
reason=(