add Bot.owner
This commit is contained in:
parent
7af9f2af94
commit
447a6a694e
@ -126,6 +126,13 @@ class BotBase(GroupMixin):
|
||||
else:
|
||||
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
|
||||
|
||||
def dispatch(self, event_name, *args, **kwargs):
|
||||
|
Loading…
x
Reference in New Issue
Block a user