diff options
author | 2022-11-26 14:06:48 +0000 | |
---|---|---|
committer | 2022-11-26 17:38:58 +0000 | |
commit | 00e74ed5f6eefb0f9a841fa06d3fe9d8ff8fdd86 (patch) | |
tree | 74699b26b6c1946ef5ee9c38c6c2be0e13d93482 | |
parent | Listen for thread starter on_message rather than thread_create (diff) |
Ensure constants.Channels.help_system_forum is a forum channel on load
-rw-r--r-- | bot/exts/help_channels/_cog.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/bot/exts/help_channels/_cog.py b/bot/exts/help_channels/_cog.py index 5da0cd52c..146391dcf 100644 --- a/bot/exts/help_channels/_cog.py +++ b/bot/exts/help_channels/_cog.py @@ -40,8 +40,10 @@ class HelpForum(commands.Cog): """Archive all idle open posts, schedule check for later for active open posts.""" log.trace("Initialising help forum cog.") self.help_forum_channel = self.bot.get_channel(constants.Channels.help_system_forum) + if not isinstance(self.help_forum_channel, discord.ForumChannel): + raise TypeError("Channels.help_system_forum is not a forum channel!") - for post in self.help_forum_channel.channels: + for post in self.help_forum_channel.threads: await _channel.maybe_archive_idle_post(post, self.scheduler, has_task=False) async def close_check(self, ctx: commands.Context) -> bool: |