JSON-RPC:Channel

The  JSON RPC calls can list and retrieve information about channels.

= Structure of a channel = A "Channel object" is used in responses.

The detail level depends on the API call: The detail level can be overridden by use of, see the documentation of the API calls.
 * has a default level of 1
 * has a default level of 3

= API Calls =

channel.list
List channels.

Request arguments
There are no mandatory arguments.

Optional arguments:
 * object_detail_level: set the detail of the response object, see the Detail level column in Structure of a channel. In this RPC call it defaults to 1 if this parameter is not specified.

Example
{"jsonrpc": "2.0", "method": "channel.list", "params": {}, "id": 123}

channel.get
Retrieve all details of a single channel. This returns more information than a  call, see the end of Structure of a channel.

Request arguments
Mandatory argument:
 * channel: the name of the channel

Optional arguments:
 * object_detail_level: set the detail of the response object, see the Detail level column in Structure of a channel. In this RPC call it defaults to 3 if this parameter is not specified.

Example
{"jsonrpc": "2.0", "method": "channel.get", "params": {"channel":"#test"}, "id": 123}

channel.set_mode
Set and unset modes on a channel.

Request arguments
Mandatory argument:
 * channel: the name of the channel
 * modes: the mode(s) to change, eg
 * parameters: the parameters, eg

Example
{"jsonrpc": "2.0", "method": "channel.set_mode", "params": {"channel":"#test","modes":"be","parameters":"some!nice@ban some!nice@invex"}, "id": 123}

channel.set_topic
Set a topic on a channel.

Request arguments
Mandatory argument: Optional arguments: NOTE: The TOPIC set message will always be shown as coming from the server, so set_by will not spoof it as coming from a certain nick name. The set_by/set_at is used for displaying who set the topic and when if you query by
 * channel: the name of the channel
 * topic: the new topic
 * set_by: who set the topic (but, see important note below)
 * set_at: when the topic was set (timestamp)

Example
{"jsonrpc": "2.0", "method": "channel.set_topic", "params": {"channel":"#test","topic":"This is a nice new topic","set_by":"SomeUser","set_at","2023-01-07T09:19:59.000Z"}, "id": 123}

channel.kick
Kick a user from a channel

Request arguments
Mandatory argument:
 * channel: the name of the channel
 * nick: the user to kick
 * reason: the kick reason (shown in the channel)

Example
{"jsonrpc": "2.0", "method": "channel.kick", "params": {"channel":"#test","nick":"XYZ","reason":"go away plz"}, "id": 123}

= See also =
 * For joining a user to a channel, see the user.join API call
 * For parting a user from a channel, see the user.part API call