From 879584b81a136c09d208ad61dd2b472e06966495 Mon Sep 17 00:00:00 2001 From: Rapptz Date: Sun, 12 Jun 2016 22:40:35 -0400 Subject: [PATCH] Fix bug with edit_role and create_role not working. This was due to an error in overzealous removal of code. --- discord/client.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/discord/client.py b/discord/client.py index 8221afe10..a4130cf85 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) }