From 2141ceea2e8f418d0fa00765e014a455c96da70b Mon Sep 17 00:00:00 2001 From: Arthur Jovart Date: Sun, 29 Aug 2021 23:53:26 +0200 Subject: [PATCH] Fix a bug where None would be returned in try_owners if the cache wasn't yet ready. --- discord/ext/commands/bot.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/discord/ext/commands/bot.py b/discord/ext/commands/bot.py index 93b0bc76..fda0b604 100644 --- a/discord/ext/commands/bot.py +++ b/discord/ext/commands/bot.py @@ -381,6 +381,10 @@ class BotBase(GroupMixin): if owner: owners.append(owner) return owners + else: + # We didn't have owners cached yet, cache them and retry. + await self.populate_owners() + return await self.try_owners() async def populate_owners(self): """|coro|