Group.UsersAdded| Value | Name | 
|---|---|
| 0 | Unknown | 
| 1 | Viewer | 
| 2 | Vip | 
| 3 | Moderator | 
| 4 | Broadcaster | 
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "title": "UsersGroupEvent",
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "groupId": {
      "type": [
        "null",
        "string"
      ]
    },
    "groupName": {
      "type": [
        "null",
        "string"
      ]
    },
    "groupBots": {
      "type": "boolean"
    },
    "count": {
      "type": "integer",
      "format": "int32"
    },
    "users": {
      "type": [
        "array",
        "null"
      ],
      "items": {
        "$ref": "#/definitions/BaseViewer"
      }
    }
  },
  "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
      ]
    }
  }
}
{
  "count": 41487900,
  "groupBots": true,
  "groupId": "nostrud sed",
  "groupName": null,
  "users": [
    {
      "display": null,
      "id": "exercitation",
      "name": "officia commodo et reprehenderit",
      "role": 0,
      "subscribed": true,
      "type": "qui dolore"
    },
    {
      "display": null,
      "id": "dolor ipsum cupidatat",
      "name": "anim proident consectetur",
      "role": 2,
      "subscribed": false,
      "type": null
    },
    {
      "display": "consectetur sunt Lorem tempor elit",
      "id": null,
      "name": "magna aliqua laboris do",
      "role": 2,
      "subscribed": false,
      "type": null
    },
    {
      "display": null,
      "id": null,
      "name": "dolore incididunt ipsum",
      "role": 2,
      "subscribed": false,
      "type": "culpa in velit aliqua consectetur"
    },
    {
      "display": "Excepteur deserunt",
      "id": null,
      "name": null,
      "role": 4,
      "subscribed": false,
      "type": null
    }
  ]
}
// Initialize the Streamer.bot WebSocket Client
const client = new StreamerbotClient();
// Subscribe to "Group.UsersAdded" events and register a callback
client.on('Group.UsersAdded', ({ 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);
});