aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRapptz <[email protected]>2015-11-07 16:27:58 -0500
committerRapptz <[email protected]>2015-11-07 16:28:37 -0500
commitad6fbbfe432484358353ba804a5e7b18a89c92ec (patch)
treed5c63ce4bdb725c34d95ee31ede3ce3fd1216475
parentChange on_server_create/delete to on_server_join/remove. (diff)
downloaddiscord.py-ad6fbbfe432484358353ba804a5e7b18a89c92ec.tar.xz
discord.py-ad6fbbfe432484358353ba804a5e7b18a89c92ec.zip
Fix Client.create_role
-rw-r--r--discord/client.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/discord/client.py b/discord/client.py
index 5e47b149..6177da66 100644
--- a/discord/client.py
+++ b/discord/client.py
@@ -1234,10 +1234,11 @@ class Client(object):
data = response.json()
everyone = server.id == data.get('id')
role = Role(everyone=everyone, **data)
- if self.edit_role(server, role, **fields):
- # we have to call edit because you can't pass a payload to the
- # http request currently.
- return role
+
+ # we have to call edit because you can't pass a payload to the
+ # http request currently.
+ self.edit_role(server, role, **fields)
+ return role
def set_channel_permissions(self, channel, target, allow=None, deny=None):
"""Sets the channel specific permission overwrites for a target in the