mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-09-08 10:53:10 +00:00
Add the ability to accept invites.
This commit is contained in:
@ -80,7 +80,13 @@ class Invite(object):
|
||||
self.inviter = User(**kwargs.get('inviter', {}))
|
||||
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
|
||||
def url(self):
|
||||
"""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)
|
||||
|
||||
|
Reference in New Issue
Block a user