async function swapChannels(
  guildId,
  channelPositions,
) {
  if (channelPositions.length < 2) {
    throw "You must provide at least two channels to be swapped.";
  }
  return await rest.runMethod(
    "patch",
    endpoints.GUILD_CHANNELS(guildId),
    channelPositions,
  );
}
/** Modify the positions of channels on the guild. Requires MANAGE_CHANNELS permisison. */
Modify the positions of channels on the guild.
Modify the positions of channels on the guild .
async function swapChannels(
  guildId,
  channelPositions,
) {
  if (channelPositions.length < 2) {
    throw "You must provide at least two channels to be swapped.";
  }
  return await rest.runMethod(
    "patch",
    endpoints.GUILD_CHANNELS(guildId),
    channelPositions,
  );
}
async function swapChannels ( guildId , channelPositions , ) { if ( channelPositions . length < 2 ) { throw "You must provide at least two channels to be swapped." ; } return await rest . runMethod ( "patch" , endpoints . GUILD_CHANNELS ( guildId ) , channelPositions , ) ; }
Modify the positions of channels on the guild.
Modify the positions of channels on the guild .