aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar mbaruh <[email protected]>2021-04-15 01:04:16 +0300
committerGravatar mbaruh <[email protected]>2021-04-15 01:04:16 +0300
commit6c00f74c8dcd2f3f1aaa4eff89e72cc135b75357 (patch)
tree3491667f90fa43793503bdaff9de79537921de69
parentFix setup docstring to specify correct cog (diff)
Add off-duty expiration date to audit log
-rw-r--r--bot/exts/moderation/duty.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/bot/exts/moderation/duty.py b/bot/exts/moderation/duty.py
index 3f34e366c..265261be8 100644
--- a/bot/exts/moderation/duty.py
+++ b/bot/exts/moderation/duty.py
@@ -94,7 +94,8 @@ class Duty(Cog):
mod = ctx.author
- await mod.remove_roles(self.moderators_role, reason="Entered off-duty period.")
+ until_date = duration.replace(microsecond=0).isoformat()
+ await mod.remove_roles(self.moderators_role, reason=f"Entered off-duty period until {until_date}.")
await self.off_duty_mods.update({mod.id: duration.isoformat()})
@@ -102,7 +103,6 @@ class Duty(Cog):
self._role_scheduler.cancel(mod.id)
self._role_scheduler.schedule_at(duration, mod.id, self.reapply_role(mod))
- until_date = duration.replace(microsecond=0).isoformat()
await ctx.send(f"{Emojis.check_mark} Moderators role has been removed until {until_date}.")
@duty_group.command(name='on')