diff options
| author | 2020-03-08 22:20:43 +0100 | |
|---|---|---|
| committer | 2020-03-08 22:20:43 +0100 | |
| commit | 7acaa717aab47f470353dcb49ee0202e86339d7c (patch) | |
| tree | 281e4cd253c0d64eeb0e47e733f31ef90e36f632 | |
| parent | Add test for `unsilence` discord output. (diff) | |
Use `Context.invoke` instead of calling `unsilence` directly.
Calling the command coro directly did unnecessary checks and
made tests for the method harder to realize.
| -rw-r--r-- | bot/cogs/moderation/silence.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/bot/cogs/moderation/silence.py b/bot/cogs/moderation/silence.py index 0081a420e..266d6dedd 100644 --- a/bot/cogs/moderation/silence.py +++ b/bot/cogs/moderation/silence.py @@ -68,7 +68,7 @@ class Silence(commands.Cog): await ctx.send(f"{Emojis.check_mark} {channel.mention} silenced for {duration} minute(s).") await asyncio.sleep(duration*60) - await self.unsilence(ctx, channel) + await ctx.invoke(self.unsilence, channel=channel) @commands.command(aliases=("unhush",)) async def unsilence(self, ctx: Context, channel: TextChannelConverter = None) -> None: |