Twitch.BroadcastUpdate{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "TwitchChannelUpdateEvent",
"type": "object",
"additionalProperties": false,
"properties": {
"channelId": {
"type": [
"null",
"string"
]
},
"channel": {
"type": [
"null",
"string"
]
},
"status": {
"type": [
"null",
"string"
]
},
"oldStatus": {
"type": [
"null",
"string"
]
},
"oldGame": {
"oneOf": [
{
"type": "null"
},
{
"$ref": "#/definitions/GameInfo"
}
]
},
"game": {
"oneOf": [
{
"type": "null"
},
{
"$ref": "#/definitions/GameInfo"
}
]
},
"is_test": {
"type": "boolean"
}
},
"definitions": {
"GameInfo": {
"type": "object",
"additionalProperties": false,
"properties": {
"id": {
"type": [
"null",
"string"
]
},
"name": {
"type": [
"null",
"string"
]
},
"box_art_url": {
"type": [
"null",
"string"
]
},
"igdb_id": {
"type": [
"null",
"string"
]
}
}
}
}
}
{
"channel": null,
"channelId": null,
"game": {
"box_art_url": "ullamco anim ut",
"id": null,
"igdb_id": "quis in sint et anim",
"name": null
},
"is_test": true,
"oldGame": null,
"oldStatus": null,
"status": null
}
// Initialize the Streamer.bot WebSocket Client
const client = new StreamerbotClient();
// Subscribe to "Twitch.BroadcastUpdate" events and register a callback
client.on('Twitch.BroadcastUpdate', ({ 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);
});