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": "706c57b2-9c40-4776-b384-1fe9cf7ad83e",
  "arguments": {
    "sunta8e": {}
  },
  "completedAt": "1952-04-13T09:12:24.0Z",
  "duration": 68953902.49773657,
  "excludeFromHistory": false,
  "id": "ba5d2687-6f30-49e6-997f-0ec6bebf4e39",
  "name": "deserunt nulla nisi Ut sint",
  "queuedAt": "1918-08-06T09:01:32.0Z",
  "startedAt": "1943-10-14T08:10:06.0Z",
  "success": true,
  "user": {
    "display": null,
    "id": "pariatur veniam non minim voluptate",
    "name": null,
    "role": 2,
    "subscribed": true,
    "type": 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);
});