diff options
| author | Rapptz <[email protected]> | 2016-07-04 08:01:57 -0400 |
|---|---|---|
| committer | Rapptz <[email protected]> | 2016-07-04 08:01:57 -0400 |
| commit | 6f3bd7c0e6b4a4984290b4cbd5ce4a63c695c2f3 (patch) | |
| tree | 374f048e638c9679829df99d209ce2a200a58fce | |
| parent | [commands] Fix error in converters in a private message context. (diff) | |
| download | discord.py-6f3bd7c0e6b4a4984290b4cbd5ce4a63c695c2f3.tar.xz discord.py-6f3bd7c0e6b4a4984290b4cbd5ce4a63c695c2f3.zip | |
Fix issue with removing roles out of order.
Fixes #250.
| -rw-r--r-- | discord/client.py | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/discord/client.py b/discord/client.py index 3a2ef8fb..59c19d31 100644 --- a/discord/client.py +++ b/discord/client.py @@ -2348,16 +2348,11 @@ class Client: Removing roles failed. """ new_roles = [x.id for x in member.roles] - remove = [] for role in roles: try: - index = new_roles.index(role.id) - remove.append(index) + new_roles.remove(role.id) except ValueError: - continue - - for index in reversed(remove): - del new_roles[index] + pass yield from self._replace_roles(member, new_roles) |