aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRapptz <[email protected]>2015-12-30 21:36:56 -0500
committerRapptz <[email protected]>2015-12-30 21:36:56 -0500
commitab9840fcb3cec138cbb4c3b89d28ee4ae81d5a18 (patch)
treeb60b6a83ac263c68d78c795de0ccd6d27ca7e143
parentAdd logs to help debug some voice data. (diff)
downloaddiscord.py-ab9840fcb3cec138cbb4c3b89d28ee4ae81d5a18.tar.xz
discord.py-ab9840fcb3cec138cbb4c3b89d28ee4ae81d5a18.zip
Fix issue with add_roles and friends not working.
Previously it stated that Role object is not serializable due to passing in Role objects rather than their IDs.
-rw-r--r--discord/client.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/discord/client.py b/discord/client.py
index 318b5e5d..a1fc1b22 100644
--- a/discord/client.py
+++ b/discord/client.py
@@ -2061,7 +2061,7 @@ class Client:
Adding roles failed.
"""
- new_roles = utils._unique(itertools.chain(member.roles, roles))
+ new_roles = utils._unique(role.id for role in itertools.chain(member.roles, roles))
yield from self._replace_roles(member, new_roles)
@asyncio.coroutine
@@ -2129,7 +2129,7 @@ class Client:
Removing roles failed.
"""
- new_roles = utils._unique(roles)
+ new_roles = utils._unique(role.id for role in roles)
yield from self._replace_roles(member, new_roles)
@asyncio.coroutine