Raw.SubAction
WebSocket event schema, payload, and examples
id
string required
actionId
string required
name
string
arguments
object
user
BaseViewer required
parentId
string required
parentName
string
group
string
type
SubActionType required
Schema
The JSON Schema for the event payload, if available.
schema.json
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "SubActionEvent",
"type": "object",
"additionalProperties": false,
"properties": {
"id": {
"type": "string"
},
"actionId": {
"type": "string"
},
"name": {
"type": [
"null",
"string"
]
},
"arguments": {
"type": [
"null",
"object"
]
},
"user": {
"oneOf": [
{
"type": "null"
},
{
"$ref": "#/$defs/BaseViewer"
}
]
},
"parentId": {
"type": "string"
},
"parentName": {
"type": [
"null",
"string"
]
},
"group": {
"type": [
"null",
"string"
]
},
"type": {
"$ref": "#/$defs/SubActionType"
}
},
"$defs": {
"BaseViewer": {
"type": "object",
"additionalProperties": false,
"properties": {
"display": {
"type": [
"null",
"string"
]
},
"id": {
"type": [
"null",
"string"
]
},
"name": {
"type": [
"null",
"string"
]
},
"role": {
"$ref": "#/$defs/ViewerRole"
},
"subscribed": {
"type": "boolean"
},
"type": {
"type": [
"null",
"string"
]
}
}
},
"ViewerRole": {
"type": "integer",
"description": "",
"x-enum-names": [
"Unknown",
"Viewer",
"Vip",
"Moderator",
"Broadcaster"
],
"x-enum-descriptions": [
null,
null,
null,
null,
null
],
"enum": [
0,
1,
2,
3,
4
]
},
"SubActionType": {
"type": "integer",
"description": "",
"x-enum-names": [
"Nothing",
"PlaySound",
"UdpBroadcast",
"WriteToFile",
"Action",
"ReadRandomLineFromFile",
"RunExecutable",
"PlaySoundFromFolder",
"SetTimerState",
"SetCommandState",
"Message",
"RedemptionStatus",
"SubscriberOnly",
"EmoteOnly",
"SlowMode",
"SetChannelTitle",
"SetChannelGame",
"CreateStreamMarker",
"CreateClip",
"RunCommercial",
"TwitchTimeoutUser",
"TwitchAddBroadcasterInformation",
"TwitchAddRandomUsers",
"TwitchAnnounce",
"TwitchAddViewerCount",
"TwitchGetCharityCampaign",
"TwitchGetShieldModeStatus",
"TwitchUpdateShieldModeStatus",
"TwitchFollowMode",
"TwitchSendShoutout",
"ObsSourceVisbility",
"ObsRandomGroupSourceVisible",
"ObsHideGroupSources",
"ObsStreaming",
"ObsSetActiveScene",
"ObsSourceFilterState",
"ObsFlipSource",
"ObsRotateSource",
"ObsSetBrowserSourceUrl",
"ObsSetGdiText",
"ObsSetRandomFilterState",
"ObsHideSourceFilters",
"ObsSourceMuteState",
"ObsGetCurrentScene",
"ObsSetAudioTrackState",
"ObsRecording",
"ObsRaw",
"ObsSceneFilterState",
"ObsTakeScreenshot",
"ObsSetMediaState",
"AddTargetInfo",
"AddFollowAgeInfo",
"AddTeamInfo",
"LogicIf",
"GlobalGet",
"GlobalSet",
"SetArgument",
"Break",
"ClearNonPersistedGlobals",
"ClearNonPersistedUserGlobals",
"LogicSwitch",
"LogicWhile",
"RewardSetEnabledState",
"RewardSetPausedState",
"RewardSetCost",
"RewardConfigure",
"RewardSetCooldown",
"RewardSetTitle",
"RewardSetPrompt",
"RewardUpdate",
"RewardGetInfo",
"RewardResetCounter",
"RewardResetUserCounters",
"RewardSetGroupEnabledState",
"RewardSetGroupPausedState",
"RewardSetBackgroundColor",
"RewardSetMaxPerUserPerStream",
"RewardSetMaxPerStream",
"ClearChannelTags",
"SetChannelTags",
"AddChannelTag",
"RemoveChannelTag",
"ObsSetReplayBufferState",
"ObsSetMediaSourceFile",
"ObsSetImageSourceFile",
"ObsGetSceneItemProperties",
"ObsHideSceneSources",
"ObsSetRandomSceneSourceVisible",
"ObsSetColorSourceColor",
"ObsGetStatus",
"ObsCreateRecordChapter",
"SlobsSourceVisibility",
"SlobsRandomGroupSourceVisible",
"SlobsHideGroupSources",
"SlobsStreaming",
"SlobsSetActiveScene",
"SlobsSourceFilterState",
"SlobsFlipSource",
"SlobsRotateSource",
"SlobsSetBrowserSourceUrl",
"SlobsSetGdiText",
"SlobsSetRandomFilterState",
"SlobsHideSourceFilters",
"SlobsSourceMuteState",
"SlobsGetCurrentScene",
"SlobsRecording",
"SlobsRaw",
"SlobsSceneFilterState",
"TwitchStartRaid",
"TwitchCancelRaid",
"TwitchAddVip",
"TwitchRemoveVip",
"TwitchAddModerator",
"TwitchRemoveModerator",
"TwitchGetFollowerCount",
"TwitchGetLatestFollower",
"TwitchGetSubscriberCount",
"TwitchGetLatestSubscriber",
"TwitchClearChatMessages",
"TwitchBanUser",
"TwitchUnbanUser",
"TwitchUnTimeoutUser",
"TwitchGetChannelGuestStarSettings",
"TwitchUpdateChannelGuestStarSettings",
"TwitchGetGuestStarSession",
"TwitchCreateGuestStarSession",
"TwitchEndGuestStarSession",
"TwitchGetGuestStarInvites",
"TwitchSendGuestStarInvite",
"TwitchDeleteGuestStarInvite",
"TwitchAssignGuestStarSlot",
"TwitchUpdateGuestStarSlot",
"TwitchDeleteGuestStarSlot",
"TwitchUpdateGuestStarSlotSettings",
"TwitchAddPresentUser",
"TwitchGetSubCounterCount",
"TwitchSetSubCounterCount",
"TwitchAddUserToGroup",
"TwitchRemoveUserFromGroup",
"TwitchSnoozeAd",
"TwitchGetAdSchedule",
"TwitchGetPreRollFreeTime",
"TwitchUserInGroup",
"ReplyToMessage",
"TwitchCreatePoll",
"TwitchTerminateActivePoll",
"TwitchArchiveActivePoll",
"SetChannelBrandedContent",
"TwitchWarnUser",
"TwitchGetActivePoll",
"TwitchGetActivePrediction",
"TwitchCreatePrediction",
"TwitchCancelActivePrediction",
"TwitchLockActivePrediction",
"TwitchResolveLastPrediction",
"TwitchResolveLastPredictionByTitle",
"TwitchGetClipDownloadUrls",
"SpeakerBotSpeakUdp",
"SpeakerBotSpeak",
"SpeakerBotSetEnabledState",
"SpeakerBotSetPausedState",
"SpeakerBotStopSpeaking",
"SpeakerBotClearPending",
"SpeakerBotActivateVoiceGateProfile",
"PolyPopTriggerAlert",
"GetQuote",
"SetActionQueuePauseState",
"DelayAction",
"GetRandomNumber",
"SetActionState",
"ClearActionQueue",
"ReadLinesFromFile",
"FetchUrl",
"PickColor",
"Comment",
"SetCommandGroupState",
"SetActionGroupState",
"KeyboardPress",
"GetCommands",
"GetCommandState",
"GetCommandGroupState",
"GetActionState",
"GetActionGroupState",
"SetVoiceControlCommand",
"SetVoiceControlCommandState",
"LogEntry",
"ReadSpecificLineFromFile",
"SetActionQueueBlockingState",
"GetInput",
"ToastNotification",
"SetVoiceControlInput",
"ResetFirstWords",
"ResetCredits",
"SetSubActionState",
"GetSubActionState",
"SetFileTailState",
"SendLocalSignal",
"WaitForLocalSignal",
"SetTriggerState",
"CustomEventTrigger",
"GetQuoteCount",
"DeleteQuote",
"AddQuote",
"SetSubActionWeight",
"FileExists",
"FolderExists",
"YouTubeMessage",
"YouTubeSetTitle",
"YouTubeSetDescription",
"YouTubeSetTitleAndDescription",
"YouTubeAddUserToGroup",
"YouTubeRemoveUserFromGroup",
"YouTubeUserInGroup",
"YouTubeBanUser",
"YoUTubeTimeoutUser",
"YouTubeAddBroadcasterInformation",
"YouTubeCreatePoll",
"YouTubeEndPoll",
"VoiceModGetCurrentVoice",
"VoiceModSelectVoice",
"VoiceModSelectRandomVoice",
"VoiceModSetVoiceChangerState",
"VoiceModSetMuteState",
"VoiceModSetHearMyVoiceState",
"VoiceModSetCensorState",
"VoiceModSetBackgroundEffectState",
"VoiceModSelectVoiceById",
"VoiceModPlaySound",
"VoiceModStopAllSounds",
"VoiceModSelectVoiceByName",
"LumiaStreamSendCommand",
"LumiaStreamSetColor",
"LumiaStreamSetBrightness",
"LumiaStreamSetToDefault",
"DiscordBasicWebhook",
"IFTTTNotificationBasic",
"IFTTTNotificationAdvanced",
"MidiOutNoteOn",
"MidiOutControlChange",
"MidiOutGeneric",
"ClearUsersFromGroup",
"StreamDeckSetTitle",
"StreamDeckSetBackground",
"StreamDeckSwitchProfile",
"StreamDeckSetState",
"StreamDeckShowAlert",
"StreamDeckShowOk",
"StreamDeckToggleState",
"StreamDeckSetStatus",
"VTubeStudioLoadModel",
"VTubeStudioLoadModelByName",
"VTubeStudioTriggerHotkey",
"VTubeStudioTriggerHotkeyByName",
"VTubeStudioMoveModel",
"VTubeStudioGetCurrentModel",
"VTubeStudioColorTint",
"VTubeStudioResetAllColorTints",
"VTubeStudioSetExpressionState",
"VTubeStudioSendRawRequest",
"ElgatoWaveLinkMuteMicrophone",
"ElgatoWaveLinkMuteOutput",
"ElgatoWaveLinkMuteInput",
"ElgatoWaveLinkSetBypassFilterState",
"ElgatoWaveLinkSetFilterState",
"ElgatoWaveLinkSetOutputMonitorDevice",
"ElgatoWaveLinkGetSelectedOutput",
"ElgatoWaveLinkSetOutputVolume",
"ElgatoWaveLinkGetOutputVolumes",
"ElgatoWaveLinkSetInputVolume",
"ElgatoWaveLinkGetInputInformation",
"ElgatoWaveLinkGetMicrophoneInformation",
"ElgatoWaveLinkSetMicrophoneGain",
"ElgatoWaveLinkSetMicrophoneOutputVolume",
"ElgatoWaveLinkSetMicrophoneBalance",
"ElgatoWaveLinkGetFilterState",
"ElgatoCameraHubWebcamSetContrast",
"ElgatoCameraHubWebcamSetBrightness",
"ElgatoCameraHubWebcamSetSaturation",
"ElgatoCameraHubWebcamSetZoom",
"ElgatoCameraHubWebcamSetPan",
"ElgatoCameraHubWebcamSetTilt",
"ElgatoCameraHubWebcamSetFocus",
"ElgatoCameraHubWebcamSetAutoWhiteBalance",
"ElgatoCameraHubWebcamSetWhiteBalance",
"ElgatoCameraHubWebcamSetWhiteBalanceTint",
"ElgatoCameraHubWebcamSetNoiseReduction",
"ElgatoCameraHubWebcamSetAntiFlicker",
"ElgatoCameraHubWebcamSetSharpness",
"ElgatoCameraHubWebcamSetDynamicRange",
"ElgatoCameraHubEpocCamSetARLens",
"ElgatoCameraHubEpocCamSetCamera",
"ElgatoCameraHubEpocCamSetBitrate",
"ElgatoCameraHubEpocCamSetTorchMode",
"ElgatoCameraHubPrompterFastForwardChapter",
"ElgatoCameraHubPrompterRewindChapter",
"ElgatoCameraHubPrompterSetChapter",
"ElgatoCameraHubPrompterSetFont",
"ElgatoCameraHubPrompterSetFontSize",
"ElgatoCameraHubPrompterSetOpacity",
"ElgatoCameraHubPrompterSetLineSpacing",
"ElgatoCameraHubPrompterSetHorizontalMargin",
"ElgatoCameraHubPrompterSetVerticalMargin",
"ElgatoCameraHubPrompterSetBrightness",
"ElgatoCameraHubPrompterSetAutoScrollState",
"ElgatoCameraHubPrompterSetMode",
"ElgatoCameraHubPrompterSetContrast",
"ElgatoCameraHubPrompterSetCrosshairState",
"ElgatoCameraHubPrompterSetCrosshairImage",
"ElgatoCameraHubPrompterGetSelectedScript",
"ElgatoCameraHubPrompterSetScript",
"PronounsAddForUser",
"TrovoSendMessage",
"TrovoGetLatestFollower",
"TrovoGetLatestSubscriber",
"TrovoClearChat",
"TrovoAddUserToGroup",
"TrovoRemoveUserFromGroup",
"TrovoUserInGroup",
"TrovoAddTargetInfo",
"TrovoAddModerator",
"TrovoRemoveModerator",
"TrovoBanUser",
"TrovoUnbanUser",
"TrovoTimeoutUser",
"TrovoUnTimeoutUser",
"TrovoFastClip",
"TrovoSetChannelTitle",
"TrovoAddBroadcasterInformation",
"ThrowingSystemActivateTrigger",
"ThrowingSystemActivateTriggerByName",
"ThrowingSystemThrowItem",
"ThrowingSystemThrowItemByName",
"ThrowingSystemThrowItems",
"ThrowingSystemThrowItemsByName",
"StreamerBotRemoteInstanceSendTrigger",
"StreamerBotRemoteInstanceSendSignal",
"StreamerBotRemoteInstanceWaitForSignal",
"StreamerBotDeckItemSetState",
"StreamerBotDeckItemToggleState",
"StreamerBotDeckItemSetTitle",
"StreamerBotDeckItemSetBackground",
"StreamerBotDeckItemSetIcon",
"StreamerBotDeckItemSetValue",
"StreamerBotDeckNotify",
"StreamerBotDeckPageSet",
"StreamerBotDeckPageNext",
"StreamerBotDeckPagePrev",
"StopAllSoundPlayback",
"StopSoundPlayback",
"KickSendMessage",
"KickReplyToMessage",
"KickAddBroadcasterInformation",
"KickAddTargetInfo",
"KickAddRandomUsers",
"KickAddUserToGroup",
"KickRemoveUserFromGroup",
"KickUserInGroup",
"KickSetChannelTitle",
"KickSetChannelCategory",
"KickBanUser",
"KickUnbanUser",
"KickTimeoutUser",
"KickUnTimeoutUser",
"KickChannelRewardSetEnabledState",
"KickChannelRewardSetPausedState",
"KickChannelRewardSetCost",
"KickChannelRewardConfigure",
"KickChannelRewardSetTitle",
"KickChannelRewardSetDescription",
"KickChannelRewardUpdate",
"KickChannelRewardGetInfo",
"KickChannelRewardResetCounter",
"KickChannelRewardResetUserCounters",
"KickChannelRewardSetGroupEnabledState",
"KickChannelRewardSetGroupPausedState",
"KickChannelRewardSetBackgroundColor",
"MtionGetActiveClubhouse",
"MtionSendTrigger",
"MeldStudioGetCurrentScene",
"MeldStudioGetStatus",
"MeldStudioStreaming",
"MeldStudioRecording",
"MeldStudioShowScene",
"MeldStudioSetLayerVisibilityState",
"MeldStudioSetEffectEnabledState",
"MeldStudioSetLayerTrackMutedState",
"MeldStudioSetTrackMutedState",
"MeldStudioTakeScreenshot",
"MeldStudioSetLayerText",
"MeldStudioRecordClip",
"MeldStudioSetMediaLayerSource",
"MeldStudioSetLayerRotation",
"MeldStudioSetBrowserLayerUrl",
"MeldStudioTakeVerticalScreenshot",
"StreamlabsWebsiteSpinWheel",
"Group",
"IfTrueGroup",
"IfFalseGroup",
"SwitchCaseGroup",
"SwitchDefaultGroup",
"ExecuteMethod",
"ExecuteCode"
],
"x-enum-descriptions": [
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null
],
"enum": [
0,
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20,
21,
22,
23,
24,
25,
26,
27,
28,
29,
30,
31,
32,
33,
34,
35,
36,
37,
38,
39,
40,
41,
42,
43,
44,
45,
46,
47,
48,
49,
50,
51,
52,
120,
121,
122,
123,
124,
125,
126,
127,
128,
200,
201,
202,
203,
204,
205,
206,
207,
208,
209,
210,
211,
212,
213,
214,
215,
251,
252,
253,
254,
321,
322,
323,
324,
325,
326,
327,
328,
329,
401,
402,
403,
404,
405,
406,
407,
408,
409,
410,
411,
412,
413,
414,
415,
416,
417,
500,
501,
502,
503,
504,
505,
506,
507,
508,
509,
510,
511,
512,
513,
520,
521,
522,
523,
524,
525,
526,
527,
528,
529,
530,
531,
550,
551,
552,
553,
554,
555,
556,
557,
558,
560,
561,
562,
563,
564,
565,
566,
567,
568,
569,
570,
571,
572,
573,
601,
602,
603,
604,
605,
606,
607,
701,
1000,
1001,
1002,
1003,
1004,
1005,
1006,
1007,
1008,
1009,
1010,
1011,
1012,
1013,
1014,
1015,
1016,
1017,
1018,
1019,
1020,
1021,
1022,
1023,
1024,
1025,
1026,
1027,
1028,
1029,
1030,
1031,
1032,
1033,
1034,
1035,
1036,
1037,
1038,
1039,
1040,
4001,
4002,
4003,
4004,
4005,
4006,
4007,
4008,
4009,
4010,
4011,
4012,
5001,
5002,
5003,
5004,
5005,
5006,
5007,
5008,
5009,
5010,
5011,
5012,
6001,
6002,
6003,
6004,
7001,
8001,
8002,
9001,
9002,
9003,
10001,
11001,
11002,
11003,
11004,
11005,
11006,
11007,
11008,
12001,
12002,
12003,
12004,
12005,
12006,
12007,
12008,
12009,
12010,
14001,
14002,
14003,
14004,
14005,
14006,
14007,
14008,
14009,
14010,
14011,
14012,
14013,
14014,
14015,
14016,
14301,
14302,
14303,
14304,
14305,
14306,
14307,
14308,
14309,
14310,
14311,
14312,
14313,
14314,
14401,
14402,
14403,
14404,
14601,
14602,
14603,
14604,
14605,
14606,
14607,
14608,
14609,
14610,
14611,
14612,
14613,
14614,
14615,
14616,
14617,
15001,
17001,
17002,
17003,
17004,
17005,
17006,
17007,
17008,
17009,
17010,
17011,
17012,
17013,
17014,
17015,
17016,
17017,
19001,
19002,
19003,
19004,
19005,
19006,
20001,
20002,
20003,
21001,
21002,
21003,
21004,
21005,
21006,
21007,
21008,
21009,
21010,
30001,
30002,
35001,
35002,
35010,
35011,
35012,
35020,
35021,
35022,
35030,
35031,
35040,
35041,
35042,
35043,
35101,
35102,
35103,
35104,
35105,
35106,
35107,
35108,
35109,
35110,
35111,
35112,
35113,
40000,
40001,
41001,
41002,
41003,
41004,
41005,
41006,
41007,
41008,
41009,
41010,
41012,
41013,
41014,
41015,
41016,
41017,
44001,
99900,
99901,
99902,
99903,
99904,
99998,
99999
]
}
}
}
JSON Payload
An example JSON payload for the event, automatically generated using JSONSchemaFaker
example.json
{
"id": "e",
"actionId": "fqrD",
"name": "t8Ofem1Cf1",
"arguments": {},
"user": null,
"parentId": "L",
"parentName": null,
"group": null,
"type": 510
}
Client Example
Example code showing how to subscribe to this event using the Streamer.bot WebSocket Client
index.js
// Initialize the Streamer.bot WebSocket Client
const client = new StreamerbotClient();
// Subscribe to "Raw.SubAction" events and register a callback
client.on('Raw.SubAction', ({ event, data }) => {
// Code here will run every time the event is received!
console.log('Received event:', event.source, event.type);
console.log('Event data:', data);
});
 Â