Properly insert at the end if position is not found when moving.
Fixes #5923
This commit is contained in:
parent
d9acc2f491
commit
b9e1bdf87e
@ -227,7 +227,7 @@ class GuildChannel:
|
|||||||
# not there somehow lol
|
# not there somehow lol
|
||||||
return
|
return
|
||||||
else:
|
else:
|
||||||
index = next((i for i, c in enumerate(channels) if c.position >= position), -1)
|
index = next((i for i, c in enumerate(channels) if c.position >= position), len(channels))
|
||||||
# add ourselves at our designated position
|
# add ourselves at our designated position
|
||||||
channels.insert(index, self)
|
channels.insert(index, self)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user