Twitch.PowerUpRedemption
WebSocket event schema, payload, and examples
Properties
The properties defined in the event schema, with descriptions.
bits
integer required
broadcaster
object required
id
string
login
string
name
string
type
string
counter
integer required
createdAt
string required
emote
object required
imageUrl
string
source
string
text
string
type
string
zeroWidth
boolean required
isFromSharedChatGuest
boolean required
isInSharedChat
boolean required
isSharedChatHost
boolean required
isTest
boolean required
message_effect_id
string
parts
TwitchMessagePartBase[]
text
string
type
string
redeemed_at
string required
tempCounter
integer required
tempUserCounter
integer required
text
string
type
string
user
object required
id
string
login
string
name
string
type
string
userCounter
integer required
Schema
The JSON Schema for the event payload, if available.
schema.json
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "TwitchPowerUpRedemption",
"type": "object",
"additionalProperties": false,
"properties": {
"broadcaster": {
"oneOf": [
{
"type": "null"
},
{
"$ref": "#/$defs/TwitchBaseUser"
}
]
},
"isInSharedChat": {
"type": "boolean"
},
"isSharedChatHost": {
"type": "boolean"
},
"isFromSharedChatGuest": {
"type": "boolean"
},
"createdAt": {
"type": "string"
},
"isTest": {
"type": "boolean"
},
"user": {
"oneOf": [
{
"type": "null"
},
{
"$ref": "#/$defs/TwitchBaseUser"
}
]
},
"type": {
"type": [
"null",
"string"
]
},
"bits": {
"type": "integer"
},
"counter": {
"type": "integer"
},
"tempCounter": {
"type": "integer"
},
"userCounter": {
"type": "integer"
},
"tempUserCounter": {
"type": "integer"
},
"text": {
"type": [
"null",
"string"
]
},
"parts": {
"type": [
"array",
"null"
],
"items": {
"$ref": "#/$defs/TwitchMessagePartBase"
}
},
"emote": {
"oneOf": [
{
"type": "null"
},
{
"$ref": "#/$defs/TwitchMessagePartEmote"
}
]
},
"message_effect_id": {
"type": [
"null",
"string"
]
},
"redeemed_at": {
"type": "string"
}
},
"$defs": {
"TwitchBaseUser": {
"type": "object",
"additionalProperties": false,
"properties": {
"id": {
"type": [
"null",
"string"
]
},
"login": {
"type": [
"null",
"string"
]
},
"name": {
"type": [
"null",
"string"
]
},
"type": {
"type": [
"null",
"string"
]
}
}
},
"TwitchMessagePartBase": {
"type": "object",
"additionalProperties": false,
"properties": {
"type": {
"type": [
"null",
"string"
]
},
"text": {
"type": [
"null",
"string"
]
}
}
},
"TwitchMessagePartEmote": {
"type": "object",
"additionalProperties": false,
"properties": {
"type": {
"type": [
"null",
"string"
]
},
"text": {
"type": [
"null",
"string"
]
},
"source": {
"type": [
"null",
"string"
]
},
"imageUrl": {
"type": [
"null",
"string"
]
},
"zeroWidth": {
"type": "boolean"
}
}
}
}
}
JSON Payload
An example JSON payload for the event, automatically generated using JSONSchemaFaker
example.json
{
"broadcaster": {},
"isInSharedChat": true,
"isSharedChatHost": true,
"isFromSharedChatGuest": true,
"createdAt": "WNufBPw64",
"isTest": false,
"user": {},
"type": null,
"bits": -623,
"counter": 592,
"tempCounter": 851,
"userCounter": 634,
"tempUserCounter": -616,
"text": "yDeW0AEx",
"parts": null,
"emote": null,
"message_effect_id": null,
"redeemed_at": "i5Hw7WT"
}
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 "Twitch.PowerUpRedemption" events and register a callback
client.on('Twitch.PowerUpRedemption', ({ 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);
});
 Â