From 3faa6c5bd423f1d9040b762c528cbb644c3cd800 Mon Sep 17 00:00:00 2001 From: Piplup <100526773+piplup55@users.noreply.github.com> Date: Mon, 26 Jun 2023 07:01:36 +0100 Subject: [PATCH] Update mod.py with .slowmode command (#56) * dirty command * fixed slowmode --- robocop_ng/cogs/mod.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/robocop_ng/cogs/mod.py b/robocop_ng/cogs/mod.py index 3816eaa..3c1ee90 100644 --- a/robocop_ng/cogs/mod.py +++ b/robocop_ng/cogs/mod.py @@ -886,6 +886,16 @@ class Mod(Cog): # Send to the desired channel await channelTo.send(embed=embedMessage) + @commands.guild_only() + @commands.check(check_if_staff) + @commands.command(aliases=["slow"]) + async def slowmode(self, ctx, seconds: int): + if seconds > 21600 or seconds < 0: + return await ctx.send("Seconds can't be above '21600' or less then '0'") + + await ctx.channel.edit(slowmode_delay=seconds) + await ctx.send(f"Set the slowmode delay in this channel to {seconds} seconds!") + async def setup(bot): await bot.add_cog(Mod(bot))