Allow unique invites to be created in Client.create_invite.

This commit is contained in:
Rapptz 2017-01-21 16:19:53 -05:00
parent de18a0ee47
commit e9a09539be
2 changed files with 6 additions and 3 deletions

View File

@ -2598,8 +2598,10 @@ class Client:
temporary : bool temporary : bool
Denotes that the invite grants temporary membership Denotes that the invite grants temporary membership
(i.e. they get kicked after they disconnect). Defaults to False. (i.e. they get kicked after they disconnect). Defaults to False.
xkcd : bool unique: bool
Indicates if the invite URL is human readable. Defaults to False. Indicates if a unique invite URL should be created. Defaults to True.
If this is set to False then it will return a previously created
invite.
Raises Raises
------- -------

View File

@ -561,7 +561,8 @@ class HTTPClient:
payload = { payload = {
'max_age': options.get('max_age', 0), 'max_age': options.get('max_age', 0),
'max_uses': options.get('max_uses', 0), 'max_uses': options.get('max_uses', 0),
'temporary': options.get('temporary', False) 'temporary': options.get('temporary', False),
'unique': options.get('unique', True)
} }
return self.request(r, json=payload) return self.request(r, json=payload)