diff options
| author | Rapptz <[email protected]> | 2015-12-30 21:36:56 -0500 |
|---|---|---|
| committer | Rapptz <[email protected]> | 2015-12-30 21:36:56 -0500 |
| commit | ab9840fcb3cec138cbb4c3b89d28ee4ae81d5a18 (patch) | |
| tree | b60b6a83ac263c68d78c795de0ccd6d27ca7e143 | |
| parent | Add logs to help debug some voice data. (diff) | |
| download | discord.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.py | 4 |
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 |