| @@ -2348,16 +2348,11 @@ class Client: | |||||||
|             Removing roles failed. |             Removing roles failed. | ||||||
|         """ |         """ | ||||||
|         new_roles = [x.id for x in member.roles] |         new_roles = [x.id for x in member.roles] | ||||||
|         remove = [] |  | ||||||
|         for role in roles: |         for role in roles: | ||||||
|             try: |             try: | ||||||
|                 index = new_roles.index(role.id) |                 new_roles.remove(role.id) | ||||||
|                 remove.append(index) |  | ||||||
|             except ValueError: |             except ValueError: | ||||||
|                 continue |                 pass | ||||||
|  |  | ||||||
|         for index in reversed(remove): |  | ||||||
|             del new_roles[index] |  | ||||||
|  |  | ||||||
|         yield from self._replace_roles(member, new_roles) |         yield from self._replace_roles(member, new_roles) | ||||||
|  |  | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user