[V3 Core] Add optional async setup function (#1314)

This commit is contained in:
Will
2018-02-18 21:12:58 -05:00
committed by GitHub
parent 86b5932c8f
commit b871241eac
3 changed files with 9 additions and 5 deletions

View File

@@ -226,7 +226,7 @@ class Core:
return
try:
ctx.bot.load_extension(spec)
await ctx.bot.load_extension(spec)
except Exception as e:
log.exception("Package loading failed", exc_info=e)
await ctx.send(_("Failed to load package. Check your console or "
@@ -261,7 +261,7 @@ class Core:
try:
self.cleanup_and_refresh_modules(spec.name)
ctx.bot.load_extension(spec)
await ctx.bot.load_extension(spec)
except Exception as e:
log.exception("Package reloading failed", exc_info=e)
await ctx.send(_("Failed to reload package. Check your console or "