|
@ -80,7 +80,13 @@ class Invite(object): |
|
|
self.inviter = User(**kwargs.get('inviter', {})) |
|
|
self.inviter = User(**kwargs.get('inviter', {})) |
|
|
self.channel = kwargs.get('channel') |
|
|
self.channel = kwargs.get('channel') |
|
|
|
|
|
|
|
|
|
|
|
@property |
|
|
|
|
|
def id(self): |
|
|
|
|
|
"""Returns the proper code portion of the invite.""" |
|
|
|
|
|
return self.xkcd if self.xkcd else self.code |
|
|
|
|
|
|
|
|
@property |
|
|
@property |
|
|
def url(self): |
|
|
def url(self): |
|
|
"""A property that retrieves the invite URL.""" |
|
|
"""A property that retrieves the invite URL.""" |
|
|
return 'http://discord.gg/{}'.format(self.xkcd if self.xkcd else self.code) |
|
|
return 'http://discord.gg/{}'.format(self.id) |
|
|
|
|
|
|
|
|