setPosition

export function setPosition<Item extends Channel | Role>( item: Item, position: number, relative: boolean, sorted: Collection<Snowflake, Item>, client: Client<true>, route: string, reason?: string,): Promise<{ id: Snowflake; position: number }[]>;
export function setPosition<Item extends Channel | Role>( item: Item, position: number, relative: boolean, sorted: Collection<Snowflake, Item>, client: Client<true>, route: string, reason?: string,): Promise<{ id: Snowflake; position: number }[]>;
Sets the position of a Channel or Role.
Returns
Updated item list, with id and position properties
NameConstraintsOptionalDefaultDescription
ItemChannel | RoleNoNone
NameTypeOptionalDescription
itemItemNoObject to set the position of
positionnumberNoNew position for the object
relativebooleanNoWhether position is relative to its current position
sortedCollection<Snowflake, Item>NoA collection of the objects sorted properly
clientClient<true>NoThe client to use to patch the data
routestringNoRoute to call PATCH on
reasonstringYesReason for the change