Updating a Channel

Last Edit: Feb 02 2020

You can edit a Channel using the update method:


const update = await channel.update(
    {
        name: 'myspecialchannel',
        color: 'green',
    },
    { text: 'Thierry changed the channel color to green' },
);
                    

await channel.update({
  "name": "myspecialchannel",
  "color": "green",
}, Message(text: "Thierry changed the channel color to green"));
                    

$update = $channel->update(
	[
		'name'    => 'myspecialchannel', 
		'color'	  => 'green'
	],
	[ 
		'text' => 'Thierry changed the channel color to green',
		'user_id' => 'thierry'
	]
);
                    

Request Params

Name

Type

Description

channel data

object

Object with the new channel information. One special field is frozen. If you set that to true new messages will be blocked.

message

object

Message object allowing you to show a system message in the Channel that something changed.