# deleteVoiceChannel (Server)

> Destroys a voice channel. The players who were in it stop hearing each other through it.

- **Platform**: MY Multiplayer (MYMP)
- **Kind**: Lua Function
- **Side**: Server
- **Category**: Voice
- **URL**: https://wiki.mymp.gg/en/deleteVoiceChannel

## Syntax

```lua
bool deleteVoiceChannel(element channel)
```

## Parameters

| Name | Type | Description |
| --- | --- | --- |
| `channel` | `element` | The channel, from `createVoiceChannel`. |

## Returns

`true` if it was destroyed, `false` if it could not be.

## Example

```lua
local radio = createVoiceChannel(0, 0)

addCommandHandler("closeradio", function()
    deleteVoiceChannel(radio)
end)
```

## See also

- [createVoiceChannel (Server)](https://wiki.mymp.gg/en/createVoiceChannel.md): Creates a voice channel. Players only hear each other through the channels they are in.
- [removePlayerFromVoiceChannel (Server)](https://wiki.mymp.gg/en/removePlayerFromVoiceChannel.md): Takes a player out of a voice channel.
