forked from Pycord-Development/pycord
-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Description
Author: [email protected]
Line: 1157
pycord-next/discord/channel/base.py
Lines 1154 to 1164 in e4b48e6
| if index is None: | |
| raise InvalidArgument("Could not resolve appropriate move position") | |
| # TODO: This could use self._move to avoid code duplication | |
| channels.insert(max((index + offset), 0), self) | |
| payload: list[ChannelPositionUpdatePayload] = [] | |
| lock_permissions = kwargs.get("sync_permissions", False) | |
| reason = kwargs.get("reason") | |
| for index, channel in enumerate(channels): | |
| d: ChannelPositionUpdatePayload = {"id": channel.id, "position": index} # pyright: ignore[reportAssignmentType] | |
| if parent_id is not MISSING and channel.id == self.id: |