mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-04-22 16:51:59 +00:00
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
|
||||
return
|
||||
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
|
||||
channels.insert(index, self)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user