diff options
| author | 2020-03-11 21:13:43 +0100 | |
|---|---|---|
| committer | 2020-03-11 21:13:43 +0100 | |
| commit | d40a8688bb1e9cf5aa33d7b9fbc5272417eb1c81 (patch) | |
| tree | da915993ae452bedbae07db087d6e17ada80002e | |
| parent | Change various logging levels. (diff) | |
Add logging to commands.
Diffstat (limited to '')
| -rw-r--r-- | bot/cogs/moderation/silence.py | 3 |
1 files changed, 3 insertions, 0 deletions
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.") |