Сообщение из чата
content.author.color: String (hex color) | null (default skin color)
content.badges.type: "image" | "character"
content.badges.format: "raster" | "vector" | undefined (for character badge type)
content.badges.description: String | null
{
"type": "message",
"content": {
"id": 52,
"timestamp": 1499789037199,
"author": {
"name": "theauthor",
"id": "abc123",
"color": "#ffffff"
},
"text": "@someuser emoticon {!0} / link {!1} / image {!2}",
"origin": "twitch",
"highlighted": true,
"highlightedBackground": false,
"elements": [
{
"type": "emoticon",
"origin": "7tvChannel",
"code": "peka",
"url": "http://peka2.tv/img/peka.png",
"format": "raster"
},
{
"type": "link",
"domain": "osu.ppy.sh",
"fullUrl": "https://osu.ppy.sh/s/472567",
"shortUrl": "osu.ppy.sh/s/472567"
},
{
"type": "image",
"url": "http://peka2.tv/logo.png"
}
],
"badges": [
{
"type": "image",
"format": "raster",
"url": "https://example.com/some-image.png",
"description": "example badge"
},
{
"type": "character",
"htmlEntity": "",
"color": "#eefc08"
}
]
}
}
content.zoomPercent: [1..500]
{
"type": "client-configuration",
"content": {
"showViewersCount": true,
"showOriginBadges": true,
"showUserBadges": true,
"zoomPercent": 100,
"hideDeletedMessages" : false,
"showHiddenMessages": false,
"clickTransparency": false,
"showClickTransparencyIcon": false,
"nativeClient": {
"backgroundColor": "#000000ff",
"coloredNicknames": false,
"hideMessages" : false,
"hideMessagesAfter" : 60,
"showStatusMessages" : true
},
"externalClient": {
"backgroundColor": "#00000000",
"coloredNicknames": true,
"hideMessages" : true,
"hideMessagesAfter" : 20,
"showStatusMessages" : false
},
"enabledOrigins": {
"peka2tv": false,
"twitch": true,
"goodgame": true,
"youtube": false,
"cybergame": false
},
"deletedMessagePlaceholder": {
"text": "message deleted {!0}",
"elements": [
{
"type": "emoticon",
"code": "Kappa",
"url": "https://static-cdn.jtvnw.net/emoticons/v1/25/2.0",
"format": "raster"
}
]
}
}
}
Список подключённых и отключённых источников.
{
"type": "origins-status",
"content": {
"twitch": "connected",
"youtube": "disconnected",
"peka2tv": "connected",
"goodgame": "disconnected",
"cybergame": "disconnected"
}
}
Текущие подключённые источники и количество зрителей на их каналах.
null
означает что не удалось получить количество зрителей, но счётчик включён
{
"type": "viewers-count",
"content": {
"peka2tv": 100,
"twitch": 200,
"goodgame": null
}
}
Удаление сообщения из чата
{
"type": "delete-message",
"content": {
"messageId": 123
}
}
Очистить все сообщения в чате
{
"type": "clear-chat",
"content": {}
}
{
"type": "client-configuration",
"content": {}
}
Запрос клиента на удаление сообщения
{
"type": "delete-message",
"content": {
"messageId": 123
}
}
Запрос клиента на блокировку сообщений от пользователя
{
"type": "ignore-author",
"content": {
"authorId": "badauthor#twitch"
}
}
{
"type": "viewers-count",
"content": {}
}
{
"type": "origins-status",
"content": {}
}