From 0c38d732da774f75c6c786b2fae5daaea6547b82 Mon Sep 17 00:00:00 2001 From: MarkKoz Date: Mon, 24 Feb 2020 15:58:50 -0800 Subject: HelpChannels: implement move_to_dormant Moves a channel to the Dormant category. Permissions will be synced with the new category. --- bot/cogs/help_channels.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/bot/cogs/help_channels.py b/bot/cogs/help_channels.py index 5e27757f7..9ef7fc72c 100644 --- a/bot/cogs/help_channels.py +++ b/bot/cogs/help_channels.py @@ -233,6 +233,14 @@ class HelpChannels(Scheduler, commands.Cog): async def move_to_dormant(self, channel: discord.TextChannel) -> None: """Make the `channel` dormant.""" + await channel.edit( + category=self.dormant_category, + sync_permissions=True, + topic=DORMANT_TOPIC, + ) + + embed = discord.Embed(description=DORMANT_MSG) + await channel.send(embed=embed) @commands.Cog.listener() async def on_message(self, message: discord.Message) -> None: -- cgit v1.2.3