Browse Source

Adding Invite.link property to get a usable Discord Invite link

pull/105/head
Kyriog 7 years ago
parent
commit
7d3228a740
  1. 4
      disco/types/invite.py

4
disco/types/invite.py

@ -43,5 +43,9 @@ class Invite(SlottedModel):
def create_for_channel(cls, channel, *args, **kwargs):
return channel.client.api.channels_invites_create(channel.id, *args, **kwargs)
@property
def link(self):
return 'https://discord.gg/{}'.format(self.code)
def delete(self, *args, **kwargs):
self.client.api.invites_delete(self.code, *args, **kwargs)

Loading…
Cancel
Save