diff options
| author | Rapptz <[email protected]> | 2016-06-12 22:40:35 -0400 |
|---|---|---|
| committer | Rapptz <[email protected]> | 2016-06-12 22:40:35 -0400 |
| commit | 879584b81a136c09d208ad61dd2b472e06966495 (patch) | |
| tree | 7927ff1cd88e0690a1e8a8b412eeb21c007bcb06 | |
| parent | Fix sed error involved in creation of voice websocket. (diff) | |
| download | discord.py-879584b81a136c09d208ad61dd2b472e06966495.tar.xz discord.py-879584b81a136c09d208ad61dd2b472e06966495.zip | |
Fix bug with edit_role and create_role not working.
This was due to an error in overzealous removal of code.
| -rw-r--r-- | discord/client.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/discord/client.py b/discord/client.py index 8221afe1..a4130cf8 100644 --- a/discord/client.py +++ b/discord/client.py @@ -2051,10 +2051,14 @@ class Client: Editing the role failed. """ + colour = fields.get('colour') + if colour is None: + colour = fields.get('color', role.colour) + payload = { 'name': fields.get('name', role.name), 'permissions': fields.get('permissions', role.permissions).value, - 'color': color.value, + 'color': colour.value, 'hoist': fields.get('hoist', role.hoist), 'mentionable': fields.get('mentionable', role.mentionable) } |