var trigger = voice_state_update()
func main() {
send_text_message(Args{
channel_id: trigger.channel_id,
message_content: "Update Type: " + trigger.update_type,
})
}
Voice State Update
Triggers when a member joins, leaves, or moves voice channels.
Outputs
Join, Leave, Move, or Update
Example: Join
The voice channel the user was in before this update (empty on Join)
Example: 123456789012345678
The ID of the user whose voice state changed
Example: 123456789012345678
The ID of the server
Example: 123456789012345678
The current voice channel ID (empty on leave)
Example: 234567890123456789
The voice session ID
Example: abcd1234
Whether the user is server muted
Example: false
Whether the user is server deafened
Example: false
Whether the user self-muted
Example: true
Whether the user self-deafened
Example: false
Whether the user has video on
Example: false
Whether the user is streaming
Example: false
Whether the user is suppressed
Example: false
Unix timestamp for request to speak
Example: 1700000000
Use this trigger in our visual flow editor. Bots are hosted 24/7 for free on inventor.bot.
Advanced Documentation
This documentation can be useful when using code mode. View as Markdown
voice_state_updateOutputs
| Field | InventScript name | Value |
|---|---|---|
| Update Type | update_type | e.g. "Join" |
| Previous Channel ID | previous_channel_id | e.g. "123456789012345678" |
| User ID | user_id | e.g. "123456789012345678" |
| Server ID | server_id | e.g. "123456789012345678" |
| Channel ID | channel_id | e.g. "234567890123456789" |
| Session ID | session_id | e.g. "abcd1234" |
| Mute | mute | e.g. "false" |
| Deaf | deaf | e.g. "false" |
| Self Mute | self_mute | e.g. "true" |
| Self Deaf | self_deaf | e.g. "false" |
| Self Video | self_video | e.g. "false" |
| Self Stream | self_stream | e.g. "false" |
| Suppressed | suppressed | e.g. "false" |
| Request to Speak Timestamp (Unix) | request_to_speak_timestamp_unix | e.g. "1700000000" |