Update mod.py with .slowmode command (#56)

* dirty command

* fixed slowmode
This commit is contained in:
Piplup 2023-06-26 07:01:36 +01:00 committed by GitHub
parent 2711e80529
commit 3faa6c5bd4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -886,6 +886,16 @@ class Mod(Cog):
# Send to the desired channel # Send to the desired channel
await channelTo.send(embed=embedMessage) 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): async def setup(bot):
await bot.add_cog(Mod(bot)) await bot.add_cog(Mod(bot))