Add try_user, owner and owners to Client #7

Merged
paris-ci merged 7 commits from try_user into 2.0 2021-09-02 19:24:52 +00:00
Showing only changes of commit 2141ceea2e - Show all commits

View File

@@ -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()
SylteA commented 2021-08-29 21:44:34 +00:00 (Migrated from github.com)
Review

If owners have not been loaded this will return None

If owners have not been loaded this will return `None`
async def populate_owners(self):
"""|coro|