# Voice State Update

> Triggers when a member joins, leaves, or moves voice channels.

- ID: `voice_state_update`
- Type: Event trigger
- Category: [Channels](https://inventor.bot/docs/reference/triggers/channels.md)

> Update Type is Join, Leave, Move, or Update (mute, deafen, stream, etc. without changing channel). Previous Channel ID is empty on Join.

**Outputs**

| Name | Description | Value |
| --- | --- | --- |
| `update_type` | Join, Leave, Move, or Update | e.g. `"Join"` |
| `previous_channel_id` | The voice channel the user was in before this update (empty on Join) | e.g. `"123456789012345678"` |
| `user_id` | The ID of the user whose voice state changed | e.g. `"123456789012345678"` |
| `server_id` | The ID of the server | e.g. `"123456789012345678"` |
| `channel_id` | The current voice channel ID (empty on leave) | e.g. `"234567890123456789"` |
| `session_id` | The voice session ID | e.g. `"abcd1234"` |
| `mute` | Whether the user is server muted | e.g. `"false"` |
| `deaf` | Whether the user is server deafened | e.g. `"false"` |
| `self_mute` | Whether the user self-muted | e.g. `"true"` |
| `self_deaf` | Whether the user self-deafened | e.g. `"false"` |
| `self_video` | Whether the user has video on | e.g. `"false"` |
| `self_stream` | Whether the user is streaming | e.g. `"false"` |
| `suppressed` | Whether the user is suppressed | e.g. `"false"` |
| `request_to_speak_timestamp_unix` | Unix timestamp for request to speak | e.g. `"1700000000"` |

**Example**

```go
var trigger = voice_state_update()

func main() {
	send_text_message(Args{
		channel_id:      trigger.channel_id,
		message_content: "Update Type: " + trigger.update_type,
	})
}
```