From 86ae9ac4a4762126da2d57e608a593039c11944e Mon Sep 17 00:00:00 2001 From: MarkKoz Date: Tue, 1 Oct 2019 15:04:57 -0700 Subject: Ignore the default unban event in the mod log * Shorten the mod log footer for pardons --- bot/cogs/moderation/infractions.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/bot/cogs/moderation/infractions.py b/bot/cogs/moderation/infractions.py index e5f85a5c8..930370287 100644 --- a/bot/cogs/moderation/infractions.py +++ b/bot/cogs/moderation/infractions.py @@ -291,6 +291,7 @@ class Infractions(Scheduler, Cog): log_text["Failure"] = "User was not found in the guild." elif _type == "ban": user = Object(user_id) + self.mod_log.ignore(Event.member_unban, user_id) try: await guild.unban(user, reason=reason) except NotFound: @@ -332,7 +333,7 @@ class Infractions(Scheduler, Cog): colour=Colour(Colours.soft_green), title=f"Infraction {log_title}: {_type}", text="\n".join(f"{k}: {v}" for k, v in log_text.items()), - footer=f"Infraction ID: {_id}", + footer=f"ID: {_id}", ) return log_text @@ -492,7 +493,7 @@ class Infractions(Scheduler, Cog): log_text["Member"] = f"{user.mention}(`{user.id}`)" log_text["Actor"] = str(ctx.message.author) log_content = None - footer = f"Infraction ID: {response[0]['id']}" + footer = f"ID: {response[0]['id']}" # If multiple active infractions were found, mark them as inactive in the database # and cancel their expiration tasks. -- cgit v1.2.3