diff --git a/disco/types/guild.py b/disco/types/guild.py index d9ca2e5..791689f 100644 --- a/disco/types/guild.py +++ b/disco/types/guild.py @@ -357,6 +357,11 @@ class Guild(SlottedModel, Permissible): def owner(self): return self.members.get(self.owner_id) + @property + def vanity_url(self): + if self.vanity_url_code: + return 'https://discord.gg/' + self.vanity_url_code + def get_permissions(self, member): """ Get the permissions a user has in this guild. @@ -517,9 +522,6 @@ class Guild(SlottedModel, Permissible): def get_invites(self): return self.client.api.guilds_invites_list(self.id) - def get_vanity_url(self): - return self.client.api.guilds_vanity_url_get(self.id) - def get_emojis(self): return self.client.api.guilds_emojis_list(self.id)