[Core] Fix loading of cogs on initial startup (#971)

This commit is contained in:
Will
2017-09-09 15:27:05 -04:00
committed by GitHub
parent 5ae6fe2dda
commit cf77eb2e47
2 changed files with 24 additions and 12 deletions

View File

@@ -7,6 +7,7 @@ from .sentry_setup import should_log
from discord.ext import commands
from .utils.chat_formatting import inline
from .core_commands import find_spec
log = logging.getLogger("red")
sentry_log = logging.getLogger("red.sentry")
@@ -40,7 +41,7 @@ def init_events(bot, cli_flags):
for package in packages:
try:
spec = await bot.cog_mgr.find_cog(package)
spec = await find_spec(bot, package)
bot.load_extension(spec)
except Exception as e:
log.exception("Failed to load package {}".format(package),