diff options
-rw-r--r-- | bot/exts/filters/filtering.py | 2 | ||||
-rw-r--r-- | bot/exts/moderation/infraction/_scheduler.py | 14 |
2 files changed, 8 insertions, 8 deletions
diff --git a/bot/exts/filters/filtering.py b/bot/exts/filters/filtering.py index 15c12d27c..fa4b83438 100644 --- a/bot/exts/filters/filtering.py +++ b/bot/exts/filters/filtering.py @@ -354,7 +354,7 @@ class Filtering(Cog): # If the filter reason contains `[autoban]`, we want to indeed ban if "[autoban]" in reason.lower(): # We create a new context from that message and make sure the staffer is the bot - # and the feeback message is sent in #mod-alert + # and the feedback message is sent in #mod-alert context = await self.bot.get_context(msg) context.author = self.bot.user context.channel = self.bot.get_channel(Channels.mod_alerts) diff --git a/bot/exts/moderation/infraction/_scheduler.py b/bot/exts/moderation/infraction/_scheduler.py index d4e96b10b..c07b043be 100644 --- a/bot/exts/moderation/infraction/_scheduler.py +++ b/bot/exts/moderation/infraction/_scheduler.py @@ -175,13 +175,7 @@ class InfractionScheduler: dm_log_text = "\nDM: Sent" end_msg = "" - if infraction["actor"] == self.bot.user.id: - log.trace( - f"Infraction #{id_} actor is bot; including the reason in the confirmation message." - ) - if reason: - end_msg = f" (reason: {textwrap.shorten(reason, width=1500, placeholder='...')})" - elif is_mod_channel(ctx.channel): + if is_mod_channel(ctx.channel): log.trace(f"Fetching total infraction count for {user}.") infractions = await self.bot.api_client.get( @@ -190,6 +184,12 @@ class InfractionScheduler: ) total = len(infractions) end_msg = f" (#{id_} ; {total} infraction{ngettext('', 's', total)} total)" + elif infraction["actor"] == self.bot.user.id: + log.trace( + f"Infraction #{id_} actor is bot; including the reason in the confirmation message." + ) + if reason: + end_msg = f" (reason: {textwrap.shorten(reason, width=1500, placeholder='...')})" purge = infraction.get("purge", "") |