[Config] Asynchronous getters (#907)

* Make config get async

* Asyncify alias

* Asyncify bank

* Asyncify cog manager

* IT BOOTS

* Asyncify core commands

* Asyncify repo manager

* Asyncify downloader

* Asyncify economy

* Asyncify alias TESTS

* Asyncify economy TESTS

* Asyncify downloader TESTS

* Asyncify config TESTS

* A bank thing

* Asyncify Bank cog

* Warning message in docs

* Update docs with await syntax

* Update docs with await syntax
This commit is contained in:
Will
2017-08-11 21:43:21 -04:00
committed by GitHub
parent cf8e11238c
commit de912a3cfb
18 changed files with 371 additions and 296 deletions

View File

@@ -34,11 +34,11 @@ def init_events(bot, cli_flags):
if cli_flags.no_cogs is False:
print("Loading packages...")
failed = []
packages = bot.db.packages()
packages = await bot.db.packages()
for package in packages:
try:
spec = bot.cog_mgr.find_cog(package)
spec = await bot.cog_mgr.find_cog(package)
bot.load_extension(spec)
except Exception as e:
log.exception("Failed to load package {}".format(package),