aboutsummaryrefslogtreecommitdiffstats
path: root/arthur/exts/directory/ldap.py
diff options
context:
space:
mode:
Diffstat (limited to 'arthur/exts/directory/ldap.py')
-rw-r--r--arthur/exts/directory/ldap.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/arthur/exts/directory/ldap.py b/arthur/exts/directory/ldap.py
index 1960fb8..4c63a11 100644
--- a/arthur/exts/directory/ldap.py
+++ b/arthur/exts/directory/ldap.py
@@ -423,4 +423,10 @@ class LDAP(commands.Cog):
async def setup(bot: KingArthur) -> None:
"""Add the extension to the bot."""
- await bot.add_cog(LDAP(bot))
+ if ldap.BONSAI_AVAILABLE and freeipa.BONSAI_AVAILABLE and CONFIG.enable_ldap:
+ await bot.add_cog(LDAP(bot))
+ else:
+ logger.warning(
+ "Not loading LDAP sync utilities as LDAP dependencies are not available "
+ "or LDAP is disabled by config, see README.md for more."
+ )