Kick.MassGiftSubscription
WebSocket event schema, payload, and examples
Properties
The properties defined in the event schema, with descriptions.
expiresAt
string required
isAnonymous
boolean required
isTest
boolean required
recipients
KickBaseUser[]
id
string
isSubscribed
boolean required
login
string
name
string
profilePicture
string
role
integer required
| Value | Name |
|---|---|
| 0 | |
| 1 | |
| 2 | |
| 3 | |
| 4 |
type
string
subscribedAt
string required
user
object required
id
string
isSubscribed
boolean required
login
string
name
string
profilePicture
string
role
integer required
| Value | Name |
|---|---|
| 0 | |
| 1 | |
| 2 | |
| 3 | |
| 4 |
type
string
Schema
The JSON Schema for the event payload, if available.
schema.json
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "KickMassGiftSubscriptionEvent",
"type": "object",
"additionalProperties": false,
"properties": {
"isAnonymous": {
"type": "boolean"
},
"user": {
"oneOf": [
{
"type": "null"
},
{
"$ref": "#/$defs/KickBaseUser"
}
]
},
"recipients": {
"type": [
"array",
"null"
],
"items": {
"$ref": "#/$defs/KickBaseUser"
}
},
"subscribedAt": {
"type": "string"
},
"expiresAt": {
"type": "string"
},
"isTest": {
"type": "boolean"
}
},
"$defs": {
"KickBaseUser": {
"type": "object",
"additionalProperties": false,
"properties": {
"id": {
"type": [
"null",
"string"
]
},
"login": {
"type": [
"null",
"string"
]
},
"name": {
"type": [
"null",
"string"
]
},
"type": {
"type": [
"null",
"string"
]
},
"profilePicture": {
"type": [
"null",
"string"
]
},
"role": {
"$ref": "#/$defs/ViewerRole"
},
"isSubscribed": {
"type": "boolean"
}
}
},
"ViewerRole": {
"type": "integer",
"description": "",
"enum": [
0,
1,
2,
3,
4
]
}
}
}
JSON Payload
An example JSON payload for the event, automatically generated using JSONSchemaFaker
example.json
{
"isAnonymous": true,
"user": null,
"recipients": [
{
"id": null,
"login": null,
"name": null,
"type": null,
"profilePicture": null,
"role": 3,
"isSubscribed": false
},
{
"id": null,
"login": null,
"name": "45Fc",
"type": null,
"profilePicture": "d0OO46q3Fv",
"role": 1,
"isSubscribed": true
},
{
"id": null,
"login": null,
"name": null,
"type": null,
"profilePicture": "",
"role": 4,
"isSubscribed": true
},
{
"id": null,
"login": null,
"name": "hDFt3j",
"type": null,
"profilePicture": null,
"role": 1,
"isSubscribed": true
},
{
"id": null,
"login": "jbQeeFfB4",
"name": null,
"type": null,
"profilePicture": "GDUAsSNPMj",
"role": 4,
"isSubscribed": true
}
],
"subscribedAt": "cW8PGu",
"expiresAt": "6",
"isTest": false
}
Client Example
Example code showing how to subscribe to this event using the Streamer.bot WebSocket Client
index.js
// Initialize the Streamer.bot WebSocket Client
const client = new StreamerbotClient();
// Subscribe to "Kick.MassGiftSubscription" events and register a callback
client.on('Kick.MassGiftSubscription', ({ 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);
});
 Â