reorder some startup to prevent heartbeat issues (#3073)

* reorder some startup to prevent heartbeat issues

* changelog

* handle startup cleanup in audio

* style

* rebased to handle conflict

* be a little smarter to prevent (some) infinite hangs

* Fix a pre-existing NoneType Error

* Migrate config before things are using it...

* another place we should ensure we're ready

* rename-toavoid-issues

* fix cache ordering and mis-use of ensure_future

* remove incorrect typehints

* style
This commit is contained in:
Michael H
2019-11-09 14:19:57 -05:00
committed by GitHub
parent 6852b7a1d1
commit b3363acf77
10 changed files with 192 additions and 156 deletions

View File

@@ -312,7 +312,7 @@ def main():
loop.run_until_complete(red.http.close())
sys.exit(0)
try:
loop.run_until_complete(red.start(token, bot=True))
loop.run_until_complete(red.start(token, bot=True, cli_flags=cli_flags))
except discord.LoginFailure:
log.critical("This token doesn't seem to be valid.")
db_token = loop.run_until_complete(red._config.token())