diff options
| author | 2020-02-24 15:58:50 -0800 | |
|---|---|---|
| committer | 2020-03-22 15:54:36 -0700 | |
| commit | 0c38d732da774f75c6c786b2fae5daaea6547b82 (patch) | |
| tree | 520b02c80e0902e6857aa143422f9e6c4a3cf50b | |
| parent | HelpChannels: implement move_to_available (diff) | |
HelpChannels: implement move_to_dormant
Moves a channel to the Dormant category. Permissions will be synced
with the new category.
| -rw-r--r-- | bot/cogs/help_channels.py | 8 |
1 files changed, 8 insertions, 0 deletions
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: |