From bf5efea00f7409e46c5add14bb01c983ff849f2e Mon Sep 17 00:00:00 2001 From: xithrius Date: Mon, 8 Mar 2021 11:56:05 -0800 Subject: Resolving KeyError on infractions that don't purge. --- bot/exts/moderation/infraction/_scheduler.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bot/exts/moderation/infraction/_scheduler.py b/bot/exts/moderation/infraction/_scheduler.py index b48c1c19e..988fb7220 100644 --- a/bot/exts/moderation/infraction/_scheduler.py +++ b/bot/exts/moderation/infraction/_scheduler.py @@ -173,7 +173,7 @@ class InfractionScheduler: total = len(infractions) end_msg = f" (#{id_} ; {total} infraction{ngettext('', 's', total)} total)" - purge = infraction['purge'] + purge = infraction.get("purge", "") # Execute the necessary actions to apply the infraction on Discord. if action_coro: -- cgit v1.2.3