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
Parameters
Item item:
Object to set the position of
number position:
New position for the object
boolean relative:
Whether
position
is relative to its current positionCollection<Snowflake, Item> sorted:
A collection of the objects sorted properly
Client<true> client:
The client to use to patch the data
string route:
Route to call PATCH on
optional
reason?: stringReason for the change