From 7acaa717aab47f470353dcb49ee0202e86339d7c Mon Sep 17 00:00:00 2001 From: Numerlor <25886452+Numerlor@users.noreply.github.com> Date: Sun, 8 Mar 2020 22:20:43 +0100 Subject: 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. --- bot/cogs/moderation/silence.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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: -- cgit v1.2.3