aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRapptz <[email protected]>2017-01-21 16:23:14 -0500
committerRapptz <[email protected]>2017-01-21 16:23:14 -0500
commit1ffb2ca7ac3c2b7da2ad9878f90c1f653f1df1c2 (patch)
tree31bc1affe5eba1c0b111688b2c27f60176cd74cb
parentUpdate copyright year to 2017. (diff)
downloaddiscord.py-1ffb2ca7ac3c2b7da2ad9878f90c1f653f1df1c2.tar.xz
discord.py-1ffb2ca7ac3c2b7da2ad9878f90c1f653f1df1c2.zip
Allow unique invites for Client.create_invite.
-rw-r--r--discord/client.py6
-rw-r--r--discord/http.py3
2 files changed, 6 insertions, 3 deletions
diff --git a/discord/client.py b/discord/client.py
index 4962d1e4..25408b7f 100644
--- a/discord/client.py
+++ b/discord/client.py
@@ -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
-------
diff --git a/discord/http.py b/discord/http.py
index c1cbd4f2..42cf14e5 100644
--- a/discord/http.py
+++ b/discord/http.py
@@ -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)