From 7d33a854403bc8269403056458058537b51d2c47 Mon Sep 17 00:00:00 2001 From: Chris Lovering Date: Sat, 26 Nov 2022 13:28:32 +0000 Subject: Don't load the help channel cog if disabled --- bot/exts/help_channels/__init__.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/bot/exts/help_channels/__init__.py b/bot/exts/help_channels/__init__.py index 00b4a735b..643497b9f 100644 --- a/bot/exts/help_channels/__init__.py +++ b/bot/exts/help_channels/__init__.py @@ -1,8 +1,15 @@ from bot.bot import Bot +from bot.constants import HelpChannels from bot.exts.help_channels._cog import HelpForum +from bot.log import get_logger + +log = get_logger(__name__) async def setup(bot: Bot) -> None: """Load the HelpForum cog.""" + if not HelpChannels.enable: + log.warning("HelpChannel.enabled set to false, not loading help channel cog.") + return await bot.add_cog(HelpForum(bot)) -- cgit v1.2.3