mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-04-21 08:17:47 +00:00
Allow unique invites for Client.create_invite.
This commit is contained in:
parent
ff9f5749e1
commit
1ffb2ca7ac
@ -896,8 +896,10 @@ class Client:
|
||||
temporary : bool
|
||||
Denotes that the invite grants temporary membership
|
||||
(i.e. they get kicked after they disconnect). Defaults to False.
|
||||
xkcd : bool
|
||||
Indicates if the invite URL is human readable. Defaults to False.
|
||||
unique: bool
|
||||
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
|
||||
-------
|
||||
|
@ -544,7 +544,8 @@ class HTTPClient:
|
||||
payload = {
|
||||
'max_age': options.get('max_age', 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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user