Fix NameError and duplicate insertion bug when moving roles.
This commit is contained in:
parent
54e9401a21
commit
77239e4f15
@ -189,7 +189,7 @@ class Role(Hashable):
|
||||
http = self._state.http
|
||||
|
||||
change_range = range(min(self.position, position), max(self.position, position) + 1)
|
||||
roles = [r.id for r in self.guild.roles[1:] if x.position in change_range]
|
||||
roles = [r.id for r in self.guild.roles[1:] if r.position in change_range and r.id != self.id]
|
||||
|
||||
if self.position > position:
|
||||
roles.insert(0, self.id)
|
||||
|
Loading…
x
Reference in New Issue
Block a user