Deleting a channel
| Interacting with the server |

### Deleting a channel

A channel can be removed with

`unsigned int ts3client_requestChannelDelete(` | serverConnectionHandlerID, |
| channelID, |
| force, |
| returnCode`)`; |

`anyID serverConnectionHandlerID`;
`anyID channelID`;
`int force`;
`const char* returnCode`;

Parameters

- `serverConnectionHandlerID`

  ID of the server connection handler on which the channel should be deleted.

- `channelID`

  The ID of the channel to be deleted.

- `force`

  If 1, the channel will be deleted even when it is not empty. Clients within the deleted channel are transfered to the default channel. Any contained subchannels are removed as well.

  If 0, the server will refuse to a channel that is not empty.

- `returnCode`

  See return code documentation. Pass NULL if you do not need this feature.

Returns `ERROR_ok` on success, otherwise an error code as defined in `public_errors.h`.

After the request has been sent to the server, the following event will be called:

`void onDelChannelEvent(` | serverConnectionHandlerID, |
| channelID, |
| invokerID, |
| invokerName, |
| invokerUniqueIdentifier`)`; |

`anyID serverConnectionHandlerID`;
`anyID channelID`;
`anyID invokerID`;
`const char* invokerName`;
`const char* invokerUniqueIdentifier`;

Parameters

- `serverConnectionHandlerID`

  ID of the server connection handler on which the channel was deleted.

- `channelID`

  The ID of the deleted channel.

- `invokerID`

  The ID of the client who requested the deletion. If zero, the deletion was initiated by the server (for example automatic deletion of empty non-permanent channels).

- `invokerName`

  The name of the client who requested the deletion. Empty if requested by the server.

- `invokerUniqueIdentifier`

  The unique ID of the client who requested the deletion.

Creating a new channel |  | Moving a channel