Raw.ActionCompleted| Value | Name |
|---|---|
| 0 | Unknown |
| 1 | Viewer |
| 2 | Vip |
| 3 | Moderator |
| 4 | Broadcaster |
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "ActionCompletedEvent",
"type": "object",
"additionalProperties": false,
"properties": {
"id": {
"type": "string",
"format": "guid"
},
"actionId": {
"type": "string",
"format": "guid"
},
"name": {
"type": [
"null",
"string"
]
},
"arguments": {
"type": [
"null",
"object"
],
"additionalProperties": {}
},
"user": {
"oneOf": [
{
"type": "null"
},
{
"$ref": "#/definitions/BaseViewer"
}
]
},
"duration": {
"type": "number",
"format": "double"
},
"queuedAt": {
"type": "string",
"format": "date-time"
},
"startedAt": {
"type": "string",
"format": "date-time"
},
"completedAt": {
"type": "string",
"format": "date-time"
},
"success": {
"type": "boolean"
},
"excludeFromHistory": {
"type": "boolean"
}
},
"definitions": {
"BaseViewer": {
"type": "object",
"additionalProperties": false,
"properties": {
"display": {
"type": [
"null",
"string"
]
},
"id": {
"type": [
"null",
"string"
]
},
"name": {
"type": [
"null",
"string"
]
},
"role": {
"$ref": "#/definitions/ViewerRole"
},
"subscribed": {
"type": "boolean"
},
"type": {
"type": [
"null",
"string"
]
}
}
},
"ViewerRole": {
"type": "integer",
"description": "",
"x-enum-names": [
"Unknown",
"Viewer",
"Vip",
"Moderator",
"Broadcaster"
],
"x-enum-varnames": [
"Unknown",
"Viewer",
"Vip",
"Moderator",
"Broadcaster"
],
"x-enumNames": [
"Unknown",
"Viewer",
"Vip",
"Moderator",
"Broadcaster"
],
"x-enum-descriptions": [
null,
null,
null,
null,
null
],
"x-enumDescriptions": [
null,
null,
null,
null,
null
],
"enum": [
0,
1,
2,
3,
4
]
}
}
}
{
"actionId": "4d9a8f99-eb25-4fb6-bf42-e14b9dde8476",
"arguments": null,
"completedAt": "1929-03-10T23:51:46.0Z",
"duration": 20250650.89451079,
"excludeFromHistory": true,
"id": "47afc70c-0188-479e-bf0c-ae2a1caf5cb3",
"name": "incididunt Ut in",
"queuedAt": "1951-02-07T20:34:40.0Z",
"startedAt": "1958-12-13T09:09:24.0Z",
"success": true,
"user": null
}
// Initialize the Streamer.bot WebSocket Client
const client = new StreamerbotClient();
// Subscribe to "Raw.ActionCompleted" events and register a callback
client.on('Raw.ActionCompleted', ({ 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);
});