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": "f9c1660a-9364-43ae-9151-7dff796c0839",
"arguments": {
"eu_4": {},
"mollit3d9": {}
},
"completedAt": "1953-04-14T08:06:04.0Z",
"duration": -21945952.848824874,
"excludeFromHistory": true,
"id": "609ef608-932a-45d6-80fe-d89546ca4cbc",
"name": "minim consequat occaecat est id",
"queuedAt": "1955-07-22T12:37:23.0Z",
"startedAt": "1895-07-24T19:05:11.0Z",
"success": false,
"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);
});