aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--discord/client.py6
-rw-r--r--discord/http.py2
2 files changed, 5 insertions, 3 deletions
diff --git a/discord/client.py b/discord/client.py
index c725da91..d786cca4 100644
--- a/discord/client.py
+++ b/discord/client.py
@@ -1522,8 +1522,10 @@ class Client:
Editing the channel failed.
"""
- if 'name' not in options:
- options['name'] = channel.name
+ keys = ('name', 'topic', 'position')
+ for key in keys:
+ if key not in options:
+ options[key] = getattr(channel, key)
yield from self.http.edit_channel(channel.id, **options)
diff --git a/discord/http.py b/discord/http.py
index da301f8b..0ff3dbfc 100644
--- a/discord/http.py
+++ b/discord/http.py
@@ -339,7 +339,7 @@ class HTTPClient:
def edit_channel(self, channel_id, **options):
url = '{0.CHANNELS}/{1}'.format(self, channel_id)
- valid_keys = ('name', 'topic', 'bitrate', 'user_limit')
+ valid_keys = ('name', 'topic', 'bitrate', 'user_limit', 'position')
payload = {
k: v for k, v in options.items() if k in valid_keys
}