[Core] Use owner set in config (#3294)

* Update bot.py

* Create 3293.misc.rst

* style: forking whitespace
This commit is contained in:
jack1142 2020-01-09 14:52:34 +01:00 committed by Michael H
parent a0f548fc0b
commit ab3b567cd8
2 changed files with 4 additions and 0 deletions

View File

@ -0,0 +1 @@
Properly set owner from config during bot's pre-flight.

View File

@ -404,6 +404,9 @@ class RedBase(commands.GroupMixin, commands.bot.BotBase, RPCMixin): # pylint: d
init_global_checks(self)
init_events(self, cli_flags)
if self.owner_id is None:
self.owner_id = await self._config.owner()
i18n_locale = await self._config.locale()
i18n.set_locale(i18n_locale)