setPosition

export function setPosition<T extends Channel | Role>(
item: T,
position: number,
relative: boolean,
sorted: Collection<Snowflake, T>,
client: Client<true>,
route: string,
reason?: string,
): Promise<{ id: Snowflake; position: number }[]>;
export function setPosition<T extends Channel | Role>(
item: T,
position: number,
relative: boolean,
sorted: Collection<Snowflake, T>,
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
TChannel | RoleNoNone
NameTypeOptionalDescription
itemTNoObject to set the position of
positionnumberNoNew position for the object
relativebooleanNoWhether position is relative to its current position
sortedCollection<Snowflake, T>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