diff --git a/bot/management/commands/starthitomi.py b/bot/management/commands/starthitomi.py index a78940e..ccf772a 100644 --- a/bot/management/commands/starthitomi.py +++ b/bot/management/commands/starthitomi.py @@ -1,5 +1,6 @@ """Start the Discord bot and connect to Discord.""" import asyncio +import importlib import logging from django.conf import settings @@ -16,6 +17,10 @@ async def on_ready(): """Print some basic login info to the console, when the bot connects.""" logger.info("Logged in as {0:s} ({1:s})".format(hitomi.user.name, hitomi.user.id)) + # now load bot plugins + for plugin in settings.BOT_PLUGINS: + importlib.import_module(plugin) + @hitomi.event async def on_message(message): diff --git a/hitomi/settings.py b/hitomi/settings.py index 9b7d185..4a42b1a 100644 --- a/hitomi/settings.py +++ b/hitomi/settings.py @@ -132,6 +132,8 @@ DISCORD_BOT_MAX_MESSAGES = 5000 LOGGER_BASE_DIR = './logs' WEATHER_WEATHER_UNDERGROUND_API_KEY = 'key' +BOT_PLUGINS = [] + # get local settings