Alchemy.Client.move_channels
You're seeing just the function
move_channels
, go back to Alchemy.Client module for more information.
Link to this function
move_channels(guild_id, pairs)
Specs
Swaps the position of channels in a guild.
Examples
# alphabetizes a guild channel list
with {:ok, channels} <- Client.get_channels(guild_id) do
channels
|> Enum.sort_by(& &1.name)
|> Stream.map(& &1.id)
|> Enum.with_index
|> (&Client.move_channels(guild_id, &1)).()
end