From 7d3228a7402e9a2da78138387ab29a47c160daa4 Mon Sep 17 00:00:00 2001 From: Kyriog Date: Thu, 2 Aug 2018 00:12:01 +0200 Subject: [PATCH] Adding Invite.link property to get a usable Discord Invite link --- disco/types/invite.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/disco/types/invite.py b/disco/types/invite.py index 1b458ef..1d44b3e 100644 --- a/disco/types/invite.py +++ b/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)