aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Den4200 <[email protected]>2020-07-06 01:02:23 +0000
committerGravatar Den4200 <[email protected]>2020-07-06 01:02:23 +0000
commit758568f2d39212737f15b871850597185b254fcd (patch)
tree3db25799e1ee1c0fc37790dc1063cf2119ca7035
parentDefault to the channel that `slowmode get` was invoked in (diff)
Default to the channel that `slowmode reset` was invoked in
-rw-r--r--bot/cogs/slowmode.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/bot/cogs/slowmode.py b/bot/cogs/slowmode.py
index 7405c1e7f..0b9b64976 100644
--- a/bot/cogs/slowmode.py
+++ b/bot/cogs/slowmode.py
@@ -70,8 +70,12 @@ class Slowmode(Cog):
)
@slowmode_group.command(name='reset', aliases=['r'])
- async def reset_slowmode(self, ctx: Context, channel: TextChannel) -> None:
+ async def reset_slowmode(self, ctx: Context, channel: Optional[TextChannel] = None) -> None:
"""Reset the slowmode delay for a given text channel to 0 seconds."""
+ # Use the channel this command was invoked in if one was not given
+ if channel is None:
+ channel = ctx.channel
+
log.info(f'{ctx.author} reset the slowmode delay for #{channel} to 0 seconds.')
await channel.edit(slowmode_delay=0)