aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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 d4226acec..bab6eccd0 100644
--- a/bot/cogs/slowmode.py
+++ b/bot/cogs/slowmode.py
@@ -2,7 +2,7 @@ from discord import TextChannel
from discord.ext.commands import Cog, Context, group
from bot.bot import Bot
-from bot.constants import MODERATION_ROLES
+from bot.constants import Emojis, MODERATION_ROLES
from bot.decorators import with_role
@@ -26,6 +26,10 @@ class Slowmode(Cog):
@with_role(*MODERATION_ROLES)
async def set_slowmode(self, ctx: Context, channel: TextChannel, seconds: int) -> None:
"""Set the slowmode delay for a given text channel."""
+ await channel.edit(slowmode_delay=seconds)
+ await ctx.send(
+ f'{Emojis.check_mark} The slowmode delay for {channel.mention} is now {seconds} seconds.'
+ )
def setup(bot: Bot) -> None: