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": 46897202,
"groupBots": false,
"groupId": "commodo eu in sint Ut",
"groupName": null,
"users": [
{
"display": "ullamco culpa",
"id": null,
"name": "sit",
"role": 1,
"subscribed": false,
"type": null
},
{
"display": null,
"id": null,
"name": null,
"role": 4,
"subscribed": false,
"type": "sint sit aliquip ullamco"
},
{
"display": null,
"id": null,
"name": null,
"role": 2,
"subscribed": false,
"type": "dolor"
},
{
"display": null,
"id": "sunt",
"name": null,
"role": 1,
"subscribed": false,
"type": null
},
{
"display": null,
"id": "in ullamco id",
"name": "et culpa est",
"role": 3,
"subscribed": false,
"type": "sit"
}
]
}
// 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);
});