From b96b7e5fa8fd599a7d8e859018f4d1a3e917b9fc Mon Sep 17 00:00:00 2001 From: Andrei Date: Tue, 11 Apr 2017 07:38:34 -0700 Subject: [PATCH] Add Guild.owner to grab a guild owners member --- disco/types/guild.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/disco/types/guild.py b/disco/types/guild.py index 15c1c17..fb59ac5 100644 --- a/disco/types/guild.py +++ b/disco/types/guild.py @@ -313,6 +313,10 @@ class Guild(SlottedModel, Permissible): self.attach(six.itervalues(self.emojis), {'guild_id': self.id}) self.attach(six.itervalues(self.voice_states), {'guild_id': self.id}) + @cached_property + def owner(self): + return self.members.get(self.owner_id) + def get_permissions(self, member): """ Get the permissions a user has in this guild.