From ab3b567cd8d63770a0b5cc9bff801df70c16404a Mon Sep 17 00:00:00 2001 From: jack1142 <6032823+jack1142@users.noreply.github.com> Date: Thu, 9 Jan 2020 14:52:34 +0100 Subject: [PATCH] [Core] Use owner set in config (#3294) * Update bot.py * Create 3293.misc.rst * style: forking whitespace --- changelog.d/3293.misc.rst | 1 + redbot/core/bot.py | 3 +++ 2 files changed, 4 insertions(+) create mode 100644 changelog.d/3293.misc.rst diff --git a/changelog.d/3293.misc.rst b/changelog.d/3293.misc.rst new file mode 100644 index 000000000..c51b07a7b --- /dev/null +++ b/changelog.d/3293.misc.rst @@ -0,0 +1 @@ +Properly set owner from config during bot's pre-flight. diff --git a/redbot/core/bot.py b/redbot/core/bot.py index 4ea8a9055..4264bd940 100644 --- a/redbot/core/bot.py +++ b/redbot/core/bot.py @@ -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)