aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Numerlor <[email protected]>2020-03-08 22:20:43 +0100
committerGravatar Numerlor <[email protected]>2020-03-08 22:20:43 +0100
commit7acaa717aab47f470353dcb49ee0202e86339d7c (patch)
tree281e4cd253c0d64eeb0e47e733f31ef90e36f632
parentAdd 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.py2
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: