aboutsummaryrefslogtreecommitdiff
path: root/discord/client.py
diff options
context:
space:
mode:
authorRapptz <[email protected]>2016-05-20 17:55:58 -0400
committerRapptz <[email protected]>2016-05-20 18:11:58 -0400
commitfe1b5b294182f9416788db5aca2181c094f52a83 (patch)
tree457c8daf6f9aefbb5d214fd62a5d18498ead62d9 /discord/client.py
parentlogs_from improvements for after param. (diff)
downloaddiscord.py-fe1b5b294182f9416788db5aca2181c094f52a83.tar.xz
discord.py-fe1b5b294182f9416788db5aca2181c094f52a83.zip
Add support for voice channel user limits.
Diffstat (limited to 'discord/client.py')
-rw-r--r--discord/client.py14
1 files changed, 13 insertions, 1 deletions
diff --git a/discord/client.py b/discord/client.py
index 8f7a6416..ed01351f 100644
--- a/discord/client.py
+++ b/discord/client.py
@@ -1614,6 +1614,10 @@ class Client:
The new channel's position in the GUI.
topic : str
The new channel's topic.
+ bitrate : int
+ The new channel's bitrate. Voice only.
+ user_limit : int
+ The new channel's user limit. Voice only.
Raises
------
@@ -1627,9 +1631,17 @@ class Client:
payload = {
'name': options.get('name', channel.name),
'topic': options.get('topic', channel.topic),
- 'position': options.get('position', channel.position)
+ 'position': options.get('position', channel.position),
}
+ user_limit = options.get('user_limit')
+ if user_limit is not None:
+ payload['user_limit'] = user_limit
+
+ bitrate = options.get('bitrate')
+ if bitrate is not None:
+ payload['bitrate'] = bitrate
+
r = yield from self.session.patch(url, data=utils.to_json(payload), headers=self.headers)
log.debug(request_logging_format.format(method='PATCH', response=r))
yield from utils._verify_successful_response(r)