Skip to content
This repository was archived by the owner on Aug 28, 2019. It is now read-only.

Commit b9e1bdf

Browse files
committed
Properly insert at the end if position is not found when moving.
Fixes Rapptz#5923
1 parent d9acc2f commit b9e1bdf

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

discord/abc.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@ async def _move(self, position, parent_id=None, lock_permissions=False, *, reaso
227227
# not there somehow lol
228228
return
229229
else:
230-
index = next((i for i, c in enumerate(channels) if c.position >= position), -1)
230+
index = next((i for i, c in enumerate(channels) if c.position >= position), len(channels))
231231
# add ourselves at our designated position
232232
channels.insert(index, self)
233233

0 commit comments

Comments
 (0)