From d40a8688bb1e9cf5aa33d7b9fbc5272417eb1c81 Mon Sep 17 00:00:00 2001 From: Numerlor <25886452+Numerlor@users.noreply.github.com> Date: Wed, 11 Mar 2020 21:13:43 +0100 Subject: Add logging to commands. --- bot/cogs/moderation/silence.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/bot/cogs/moderation/silence.py b/bot/cogs/moderation/silence.py index 1c751a4b1..e1b0b703f 100644 --- a/bot/cogs/moderation/silence.py +++ b/bot/cogs/moderation/silence.py @@ -91,6 +91,7 @@ class Silence(commands.Cog): If duration is forever, start a notifier loop that triggers every 15 minutes. """ + log.debug(f"{ctx.author} is silencing channel #{ctx.channel}.") if not await self._silence(ctx.channel, persistent=(duration is None), duration=duration): await ctx.send(f"{Emojis.cross_mark} current channel is already silenced.") return @@ -100,6 +101,7 @@ class Silence(commands.Cog): await ctx.send(f"{Emojis.check_mark} silenced current channel for {duration} minute(s).") await asyncio.sleep(duration*60) + log.info(f"Unsilencing channel after set delay.") await ctx.invoke(self.unsilence) @commands.command(aliases=("unhush",)) @@ -109,6 +111,7 @@ class Silence(commands.Cog): Unsilence a previously silenced `channel` and remove it from indefinitely muted channels notice if applicable. """ + log.debug(f"Unsilencing channel #{ctx.channel} from {ctx.author}'s command.") if await self._unsilence(ctx.channel): await ctx.send(f"{Emojis.check_mark} unsilenced current channel.") -- cgit v1.2.3