diff options
author | 2019-10-01 15:04:57 -0700 | |
---|---|---|
committer | 2019-10-01 18:25:34 -0700 | |
commit | 86ae9ac4a4762126da2d57e608a593039c11944e (patch) | |
tree | cba18ab7c006c427516344d071be9447cf5274a9 | |
parent | Fix out-of-order and missing arguments for post_infraction calls (diff) |
Ignore the default unban event in the mod log
* Shorten the mod log footer for pardons
-rw-r--r-- | bot/cogs/moderation/infractions.py | 5 |
1 files 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. |