Implement voice region changing for voice channels

This commit is contained in:
Tarek
2021-04-01 09:49:45 +02:00
committed by GitHub
parent 3576e2ee01
commit 6524869ddd
4 changed files with 34 additions and 5 deletions

View File

@ -584,11 +584,10 @@ class HTTPClient:
r = Route('PATCH', '/channels/{channel_id}', channel_id=channel_id)
valid_keys = ('name', 'parent_id', 'topic', 'bitrate', 'nsfw',
'user_limit', 'position', 'permission_overwrites', 'rate_limit_per_user',
'type')
'type', 'rtc_region')
payload = {
k: v for k, v in options.items() if k in valid_keys
}
return self.request(r, reason=reason, json=payload)
def bulk_channel_update(self, guild_id, data, *, reason=None):
@ -601,7 +600,8 @@ class HTTPClient:
}
valid_keys = ('name', 'parent_id', 'topic', 'bitrate', 'nsfw',
'user_limit', 'position', 'permission_overwrites', 'rate_limit_per_user')
'user_limit', 'position', 'permission_overwrites', 'rate_limit_per_user',
'rtc_region')
payload.update({
k: v for k, v in options.items() if k in valid_keys and v is not None
})