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": "0c5a641f-d9c0-4308-acef-e1ca7f899b85",
"arguments": {
"amet426": {},
"ametd0": {},
"consectetur_f9": {},
"dolore_4": {},
"ea_1": {},
"exe": {},
"exercitation_c": {},
"veniamb9e": {}
},
"completedAt": "1895-03-31T12:21:47.0Z",
"duration": 40020012.27288306,
"excludeFromHistory": true,
"id": "cc211f22-b750-41ba-98f9-222c2d75d6d8",
"name": "nisi laboris",
"queuedAt": "1964-02-17T01:41:01.0Z",
"startedAt": "1934-05-04T15:20:21.0Z",
"success": true,
"user": {
"display": "irure est in",
"id": null,
"name": "ipsum irure officia Ut mollit",
"role": 4,
"subscribed": false,
"type": "tempor sunt id elit"
}
}
// 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);
});