Browse Source

Replace get_vanity_url function with vanity_url property on guild object.

pull/153/head
Luke 6 years ago
parent
commit
54f8f847e8
  1. 8
      disco/types/guild.py

8
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)

Loading…
Cancel
Save