Alchemy.Client.edit_channel

You're seeing just the function edit_channel, go back to Alchemy.Client module for more information.
Link to this function

edit_channel(channel_id, options)

Specs

edit_channel(snowflake(),
  name: String.t(),
  position: Integer,
  topic: String.t(),
  bitrate: Integer,
  user_limit: Integer,
  nsfw: Boolean.t(),
  parent_id: snowflake()
) :: {:ok, Alchemy.Channel.t()} | {:error, term()}

Edits a channel in a guild, referenced by id.

All the paramaters are optional. Some are mutually exclusive. I.E. you can't use voice only and text only parameters in the same request.

Options

  • name the name for the channel
  • position the position in the left hand listing
  • topic ~ text only ~ the topic of the channel
  • bitrate ~ voice only ~ the bitrate, in bits, from 8000 to 96000, for the voice channel to take
  • user_limit ~ voice only ~ the max amount of users allowed in this channel. From 1 to 99, or 0 for no limit.
  • nsfw whether or not the channel is nsfw
  • parent_id the id of the new parent category for a channel

Examples

Client.edit_channel(id, name: "the best channel", position: 1)
{:ok, new_voice_channel} = Client.edit_channel(id, bitrate: 8000)