add Bot.owner
This commit is contained in:
parent
7af9f2af94
commit
447a6a694e
@ -125,6 +125,13 @@ class BotBase(GroupMixin):
|
|||||||
self.help_command = DefaultHelpCommand()
|
self.help_command = DefaultHelpCommand()
|
||||||
else:
|
else:
|
||||||
self.help_command = help_command
|
self.help_command = help_command
|
||||||
|
|
||||||
|
@property
|
||||||
|
def owner(self):
|
||||||
|
""":class:`discord.User`: The owner, retrieved from owner_id. In case of improper caching, this can return None"""
|
||||||
|
if not self.owner_id or self.owner_ids:
|
||||||
|
raise AttributeError('No owner_id specified or you used owner_ids. If you used owner_ids, please refer to `Bot.owners`')
|
||||||
|
return self.get_user(self.owner_id)
|
||||||
|
|
||||||
# internal helpers
|
# internal helpers
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user