From 7682721da0a5dbba0495e23de1470c9207d28ca2 Mon Sep 17 00:00:00 2001
From: Neodyme <58036996+n3odym3@users.noreply.github.com>
Date: Fri, 18 Feb 2022 13:13:10 +0100
Subject: [PATCH] Major update to V2.0
---
EventSub-Twitch-Flow.json | 5939 +++++++++++++++++++++----------------
1 file changed, 3332 insertions(+), 2607 deletions(-)
diff --git a/EventSub-Twitch-Flow.json b/EventSub-Twitch-Flow.json
index 296a2f2..d880b58 100644
--- a/EventSub-Twitch-Flow.json
+++ b/EventSub-Twitch-Flow.json
@@ -1,22 +1,24 @@
[
{
- "id": "7c36e6b244586b90",
+ "id": "df207830040c7255",
"type": "tab",
"label": "Settings",
"disabled": false,
- "info": ""
+ "info": "",
+ "env": []
},
{
- "id": "f9eff8535747992a",
+ "id": "bedf5b9469855c83",
"type": "tab",
"label": "Response",
"disabled": false,
- "info": ""
+ "info": "",
+ "env": []
},
{
- "id": "fcc735a31613ba0b",
+ "id": "20a1fcbd1d2fea63",
"type": "group",
- "z": "7c36e6b244586b90",
+ "z": "df207830040c7255",
"name": "Subscriptions ",
"style": {
"stroke": "#000000",
@@ -26,78 +28,53 @@
"fill-opacity": "0.46"
},
"nodes": [
- "3708399c3e4d20ae",
- "628d5f2e272f07d5",
- "725b71c7e6ea3a03",
- "1c3eb24135cc818a",
- "257045a8061e7b12",
- "be2aad482f8ef439",
- "90915023a3d4f850",
- "326480ef3c92d5c0",
- "75251f6f795cf94b",
- "339ec0a4de49f192",
- "fc340bacd213c455",
- "5d04b1b54ccbe8c9",
- "f0a3c8e986b84306",
- "3cc9efe69b837c90",
- "405334c2f7ab6b61",
- "9b2a3a7986e4549f",
- "02f29ca8c6aec9d8",
- "e3ae1a35a2d8953e",
- "054898ab624802e6",
- "7093682264d0eeaa",
- "09e4fce23bf14ad4",
- "dc8eaa0c3026839b",
- "50ed880f14925aef",
- "130a9c742ee1cd45",
- "cb25e994d7e2f0db",
- "f2a3f080a07c3193",
- "4b5fef36d50f38f7",
- "080a52db4f5eebc3"
+ "26d8d7df.be0958",
+ "98d5cd6c.f2a68",
+ "f2b8d96b.d631b8",
+ "f70bfcf8.11e1",
+ "7dbcec20.5ced04",
+ "5bff93af.87898c",
+ "690eda34.2888d4",
+ "d3a93046ef612be8",
+ "7e0de8ca88627f13",
+ "ec98aacb0f957338",
+ "30982b64daa64b4f",
+ "fd85f36550d37557",
+ "ce3d135404921045",
+ "3c4839ef38d1e5be",
+ "49ebc9ee3ff5553f",
+ "6aa36f6125c38ddf",
+ "84e31e98de53c8f6",
+ "566b14e2f0568603",
+ "a383193c03077b55",
+ "f9c17dfc34ee6ddc",
+ "c7fe8d294efda317",
+ "82b0797b3012e829",
+ "30fbfd9411298b86",
+ "ee66b6128ff85327",
+ "8b713e9019cc4516",
+ "ffae0df38c6c8c22",
+ "2c9e19de6c1f6cd4",
+ "5e33e16d982b9232",
+ "dd4a8a1e4291d855",
+ "bcb057363ba3c378",
+ "d2fd9327385f9448",
+ "8a66fd4794b48b1b",
+ "697267a917a5ede1",
+ "e3011972045e8564",
+ "1053bfdaa6f39afb",
+ "6a40e123a2c65178",
+ "c6a0489a3ee00082"
],
- "x": 54,
- "y": 469,
- "w": 1202,
- "h": 332
+ "x": 24,
+ "y": 499,
+ "w": 1532,
+ "h": 452
},
{
- "id": "92e1bc854f009fbe",
+ "id": "fbd6b9fb.b67658",
"type": "group",
- "z": "7c36e6b244586b90",
- "name": "Webhook",
- "style": {
- "stroke": "#000000",
- "fill": "#7fb7df",
- "label": true,
- "color": "#000000",
- "fill-opacity": "0.5"
- },
- "nodes": [
- "d0b69acfdab9690f",
- "b24de4d8c4c1bec5",
- "25dc8656e1bfa516",
- "e2bf3df8cde51c10",
- "31e1b1bf8353dccc",
- "cb2ff17efa270361",
- "032f8b46cd35fd8b",
- "837d3dc56ed07a67",
- "087d1279b39b6fdc",
- "2d2ab0f1c6b3f056",
- "185dbbdda096b452",
- "7080117654ae5e2c",
- "76b5440e882e8a03",
- "5970201814f50194",
- "cf0cc718151d358c"
- ],
- "x": 54,
- "y": 809,
- "w": 1202,
- "h": 202
- },
- {
- "id": "ebb10d640f7ac801",
- "type": "group",
- "z": "7c36e6b244586b90",
+ "z": "df207830040c7255",
"name": "API Settings",
"style": {
"stroke": "#000000",
@@ -107,47 +84,90 @@
"color": "#000000"
},
"nodes": [
- "8d7c21b59ca060cb",
- "e83fe6a08adf5a78",
- "a8d2a2d533bd0343",
- "8fe60d5e257ad07c",
- "184e1f350ac5f70c",
- "b0f5b34fc4ee73c2",
- "8ec8884435ea23c1",
- "6a3ebc5d2b927cea",
- "d24a87b460302d14",
- "77d45f6f763b298b",
- "f6d9a2ce342ba743",
- "47fd8e30637509da",
- "7879e1af17029fe2",
- "8c13b7d40a7b719e",
- "6ea6b91f73c37542",
- "832db0cc8c788581",
- "fae1084e76c22048",
- "4fa722aac4d95d35",
- "cccfb16c105ce92e",
- "317349278d3e55eb",
- "1d463669496fe001",
- "7f2d06ccf6b875f0",
- "9f2b3a3a73712b8e",
- "d45d1bed0a44069b",
- "9ccd95da63d631ba",
- "5286830d2035ddb0",
- "6c9da833ab31fa4e",
- "d15b88885243d289",
- "6c1201d518e72827",
- "155d67dffab25869",
- "486bb864c93facee"
+ "beab0c19.6d93b",
+ "966a372a.a07628",
+ "a9ab8eef.baa2",
+ "566f2428.09694c",
+ "b8602e99.36c57",
+ "fd63f4262302c5b3",
+ "7ac706a80063eebd",
+ "c93450a865e58d44",
+ "252b179b82c058d7",
+ "293eff994c230d75",
+ "e0b907cdd8ccc1cf",
+ "3b0aad40327d2546",
+ "1112a9e81345ea8b",
+ "9a8612014ad4c799",
+ "379327a91b22c7dd",
+ "e44ac409f8d18e83",
+ "8b2294e6bc52446d",
+ "3f7a96c6437a13b9",
+ "a0c81e642c7a3105",
+ "ad6618efadfffb7c",
+ "d063ce8e1987378e",
+ "2c88d43747076c97",
+ "e35fd443178b1637",
+ "d7b248978206a06f",
+ "b1096a477fb9abe5",
+ "055dadece0fd3af6",
+ "aea1f7b492402c01",
+ "4d6e5b640e32530c",
+ "2b8377a30ae7e578",
+ "2c4a0a29dd209504",
+ "18a0ecdb51dce96a",
+ "a70f82e316ae9b20",
+ "eff64b41360d736d",
+ "ecd9237822214175",
+ "e6f5f8a94cc12207",
+ "4c3ce8432cc7554a",
+ "527713e229815eae",
+ "645e4c286635a52f",
+ "b9d57c51dcfa392e"
],
- "x": 54,
- "y": 39,
- "w": 812,
- "h": 422
+ "x": 24,
+ "y": 29,
+ "w": 872,
+ "h": 462
+ },
+ {
+ "id": "da23423c6c5ba9f9",
+ "type": "group",
+ "z": "df207830040c7255",
+ "name": "Webhook",
+ "style": {
+ "stroke": "#000000",
+ "fill": "#7fb7df",
+ "label": true,
+ "color": "#000000",
+ "fill-opacity": "0.5"
+ },
+ "nodes": [
+ "172852334e067eab",
+ "a14899d1bdaee6ae",
+ "e9b516c0427c7331",
+ "9bae08932a4b918f",
+ "b99ebb122e5c2d93",
+ "e2b1a1d555abedaa",
+ "496beddfeba0baee",
+ "09b3f14a7ec50bce",
+ "8c2a43d196ec7e5c",
+ "83822eaec1eca52b",
+ "9ae2fc3a337f9a0e",
+ "70fdfa29ec214ea2",
+ "189539cfa8fd4634",
+ "0953d456cfdb4563",
+ "94f06a5db5091ecc",
+ "f4803e78add4ee2f"
+ ],
+ "x": 24,
+ "y": 959,
+ "w": 1362,
+ "h": 202
},
{
"id": "1d9e4b26a824022f",
"type": "group",
- "z": "f9eff8535747992a",
+ "z": "bedf5b9469855c83",
"name": "EventSub Switch",
"style": {
"stroke": "#000000",
@@ -221,15 +241,165 @@
"52f26835eeca107c",
"03c5d3303b39046e",
"8fe676f729352bd3",
- "870a89265d2adf1d"
+ "870a89265d2adf1d",
+ "8a0b93500015be22"
],
- "x": 64,
- "y": 49,
- "w": 842,
+ "x": 34,
+ "y": 19,
+ "w": 692,
"h": 922
},
{
- "id": "6ef54607ab2089a9",
+ "id": "c3a384b88e4aae92",
+ "type": "group",
+ "z": "bedf5b9469855c83",
+ "name": "Events",
+ "style": {
+ "stroke": "#000000",
+ "fill": "#c8e7a7",
+ "fill-opacity": "0.51",
+ "label": true,
+ "color": "#000000"
+ },
+ "nodes": [
+ "7098c94cefad6f46",
+ "3c5392d536a6758c",
+ "d8d1f2dfc5c946e8",
+ "e3fdefc8024d75a1",
+ "781d8b6ea144560b",
+ "46a3a69959ede421",
+ "0706fa919a2b66b7",
+ "13aa39ce93155d90",
+ "22b9bd03717a6092",
+ "bc942504e9d6822a",
+ "c9bd7b1cdbdaca88",
+ "2e12e6b6e53b0967",
+ "f436b7331bd9609b",
+ "c4cd0c41321ef3bd",
+ "4c49467a35df9851",
+ "674ee05d36a01381",
+ "ca9267f59495a61e",
+ "c282f7bbe2ea94a6",
+ "6c6457495d5b73d4",
+ "0e8b1da7d78d9e04",
+ "216bb963f207e682",
+ "46a44352c8d66e56",
+ "d1e21ddc83cc908f",
+ "b7796720760df4ca",
+ "e7138cd2dc73b8c0",
+ "2a80b4bcb77e25b1",
+ "3ee0a398d56ce81b",
+ "2720e13c28d5f2a6",
+ "bb15db95da85594b",
+ "f23b95398eaa0fb5",
+ "c977fc48940eaa1f",
+ "0a6403e990465b45",
+ "e66321b5eebb9e62",
+ "013eac261f7f830a",
+ "82982a94bf2f96e5",
+ "7822bd853ff32202",
+ "440ca17ff1420dfe",
+ "e3a2b757bc7b4f00",
+ "bf777e01107c8dad",
+ "02eff79de54243df",
+ "cf8eb778297937fe",
+ "31b7edc241da122b",
+ "58059205d3b59963",
+ "d3ae76bd5a99fe61",
+ "4ce638dd76c24bdb",
+ "d8842a92a68f0e27",
+ "9438739a0d42032a",
+ "ba962cb706960ca3",
+ "3445992ddf31cb4e",
+ "bcf41039c5488aa0",
+ "2082c62be84dcf16",
+ "1d7fb21bf35a91b8",
+ "9f32750213a4f0c6",
+ "65537eb9b8bb35b8",
+ "c22851c0379367b6",
+ "df791e577307e9f7",
+ "44c07fb9fc35c75c",
+ "b30cfc59e8cbe783",
+ "97fecabe81f273fd",
+ "4f2895be0123f5f4",
+ "63c02972795b5176",
+ "e3d6d7b46a2d2955",
+ "aa6229c18fc2ac6d"
+ ],
+ "env": [],
+ "x": 754,
+ "y": 21.5,
+ "w": 512,
+ "h": 1219.5
+ },
+ {
+ "id": "9fcc1ffb8aba8b21",
+ "type": "ui_group",
+ "name": "Subscribe",
+ "tab": "4afe96710c08f056",
+ "order": 2,
+ "disp": true,
+ "width": "6",
+ "collapse": false
+ },
+ {
+ "id": "ee20fe791dedef03",
+ "type": "ui_group",
+ "name": "Unsubscribe",
+ "tab": "4afe96710c08f056",
+ "order": 3,
+ "disp": true,
+ "width": 6,
+ "collapse": false
+ },
+ {
+ "id": "4afe96710c08f056",
+ "type": "ui_tab",
+ "name": "EventSub",
+ "icon": "dashboard",
+ "order": 13,
+ "disabled": false,
+ "hidden": false
+ },
+ {
+ "id": "174e8ee08b6a981f",
+ "type": "ui_group",
+ "name": "Settings",
+ "tab": "4afe96710c08f056",
+ "order": 1,
+ "disp": true,
+ "width": "6",
+ "collapse": false
+ },
+ {
+ "id": "f0f95ba1.2e5f08",
+ "type": "mqtt-broker",
+ "name": "VPS",
+ "broker": "lab.gervasi.be",
+ "port": "1883",
+ "clientid": "",
+ "autoConnect": true,
+ "usetls": false,
+ "compatmode": false,
+ "protocolVersion": "3",
+ "keepalive": "60",
+ "cleansession": true,
+ "birthTopic": "",
+ "birthQos": "0",
+ "birthPayload": "",
+ "birthMsg": {},
+ "closeTopic": "",
+ "closeQos": "0",
+ "closePayload": "",
+ "closeMsg": {},
+ "willTopic": "",
+ "willQos": "0",
+ "willPayload": "",
+ "willMsg": {},
+ "sessionExpiry": ""
+ },
+ {
+ "id": "abb6f1bda92477eb",
"type": "ui_base",
"theme": {
"name": "theme-dark",
@@ -327,59 +497,10 @@
}
},
{
- "id": "9fcc1ffb8aba8b21",
- "type": "ui_group",
- "name": "Subscribe",
- "tab": "4afe96710c08f056",
- "order": 1,
- "disp": true,
- "width": "6",
- "collapse": false
- },
- {
- "id": "ee20fe791dedef03",
- "type": "ui_group",
- "name": "Unsubscribe",
- "tab": "4afe96710c08f056",
- "order": 2,
- "disp": true,
- "width": 7,
- "collapse": false
- },
- {
- "id": "bef43e4824a89468",
- "type": "ui_spacer",
- "z": "7c36e6b244586b90",
- "name": "spacer",
- "group": "ee20fe791dedef03",
- "order": 2,
- "width": 1,
- "height": 1
- },
- {
- "id": "4a602848e19e8b65",
- "type": "ui_group",
- "name": "Authorizations",
- "tab": "4afe96710c08f056",
- "order": 4,
- "disp": true,
- "width": "6",
- "collapse": false
- },
- {
- "id": "4afe96710c08f056",
- "type": "ui_tab",
- "name": "EventSub",
- "icon": "dashboard",
- "order": 13,
- "disabled": false,
- "hidden": false
- },
- {
- "id": "3708399c3e4d20ae",
+ "id": "26d8d7df.be0958",
"type": "function",
- "z": "7c36e6b244586b90",
- "g": "fcc735a31613ba0b",
+ "z": "df207830040c7255",
+ "g": "20a1fcbd1d2fea63",
"name": "Format subscription",
"func": "const Type = msg.type;\nmsg = {\n \"headers\" : {\n \"Client-ID\": flow.get('ClientID'),\n \"Authorization\": flow.get('AppToken'),\n \"Accept\" : \"application/json\"\n },\n \"method\": \"POST\",\n \"url\" : \"https://api.twitch.tv/helix/eventsub/subscriptions\",\n \"payload\" : {\n \"type\": Type,\n \"version\": \"1\",\n \"condition\": {\n \"broadcaster_user_id\": flow.get('ChannelID')\n },\n \"transport\": {\n \"method\": \"webhook\",\n \"callback\": \"https://\" + flow.get('SubURI') + \"/webhook\",\n \"secret\": flow.get('SubSecret')\n }\n }\n}\n\nif(Type == \"channel.raid\"){\n msg.payload.condition = {\n \"to_broadcaster_user_id\" : flow.get('ChannelID')\n }\n}\n\nreturn msg;",
"outputs": 1,
@@ -387,19 +508,19 @@
"initialize": "",
"finalize": "",
"libs": [],
- "x": 370,
- "y": 600,
+ "x": 530,
+ "y": 630,
"wires": [
[
- "628d5f2e272f07d5"
+ "98d5cd6c.f2a68"
]
]
},
{
- "id": "628d5f2e272f07d5",
+ "id": "98d5cd6c.f2a68",
"type": "http request",
- "z": "7c36e6b244586b90",
- "g": "fcc735a31613ba0b",
+ "z": "df207830040c7255",
+ "g": "20a1fcbd1d2fea63",
"name": "",
"method": "use",
"ret": "obj",
@@ -409,20 +530,21 @@
"persist": false,
"proxy": "",
"authType": "",
- "x": 550,
- "y": 600,
+ "senderr": false,
+ "x": 720,
+ "y": 630,
"wires": [
[
- "be2aad482f8ef439",
- "4b5fef36d50f38f7"
+ "5bff93af.87898c",
+ "5e33e16d982b9232"
]
]
},
{
- "id": "725b71c7e6ea3a03",
+ "id": "f2b8d96b.d631b8",
"type": "function",
- "z": "7c36e6b244586b90",
- "g": "fcc735a31613ba0b",
+ "z": "df207830040c7255",
+ "g": "20a1fcbd1d2fea63",
"name": "Unsubscribe",
"func": "const ID = msg.id;\nmsg = {\n \"headers\" : {\n \"Client-ID\" : flow.get('ClientID'),\n \"Authorization\" : flow.get('AppToken')\n },\n \"method\": \"DELETE\",\n \"url\": \"https://api.twitch.tv/helix/eventsub/subscriptions?id=\" + ID\n}\n\nreturn msg;",
"outputs": 1,
@@ -430,19 +552,19 @@
"initialize": "",
"finalize": "",
"libs": [],
- "x": 380,
- "y": 760,
+ "x": 550,
+ "y": 710,
"wires": [
[
- "1c3eb24135cc818a"
+ "f70bfcf8.11e1"
]
]
},
{
- "id": "1c3eb24135cc818a",
+ "id": "f70bfcf8.11e1",
"type": "http request",
- "z": "7c36e6b244586b90",
- "g": "fcc735a31613ba0b",
+ "z": "df207830040c7255",
+ "g": "20a1fcbd1d2fea63",
"name": "",
"method": "use",
"ret": "txt",
@@ -452,19 +574,19 @@
"persist": false,
"proxy": "",
"authType": "",
- "x": 550,
- "y": 760,
+ "x": 720,
+ "y": 710,
"wires": [
[
- "080a52db4f5eebc3"
+ "2c9e19de6c1f6cd4"
]
]
},
{
- "id": "257045a8061e7b12",
+ "id": "7dbcec20.5ced04",
"type": "function",
- "z": "7c36e6b244586b90",
- "g": "fcc735a31613ba0b",
+ "z": "df207830040c7255",
+ "g": "20a1fcbd1d2fea63",
"name": "Succes",
"func": "msg.payload = \"Subscription successful\"\nreturn msg;",
"outputs": 1,
@@ -472,19 +594,19 @@
"initialize": "",
"finalize": "",
"libs": [],
- "x": 880,
+ "x": 1050,
"y": 540,
"wires": [
[
- "f0a3c8e986b84306"
+ "ce3d135404921045"
]
]
},
{
- "id": "be2aad482f8ef439",
+ "id": "5bff93af.87898c",
"type": "switch",
- "z": "7c36e6b244586b90",
- "g": "fcc735a31613ba0b",
+ "z": "df207830040c7255",
+ "g": "20a1fcbd1d2fea63",
"name": "check status",
"property": "statusCode",
"propertyType": "msg",
@@ -513,28 +635,28 @@
"checkall": "true",
"repair": false,
"outputs": 4,
- "x": 710,
- "y": 600,
+ "x": 880,
+ "y": 630,
"wires": [
[
- "257045a8061e7b12"
+ "7dbcec20.5ced04"
],
[
- "90915023a3d4f850"
+ "690eda34.2888d4"
],
[
- "326480ef3c92d5c0"
+ "d3a93046ef612be8"
],
[
- "75251f6f795cf94b"
+ "7e0de8ca88627f13"
]
]
},
{
- "id": "90915023a3d4f850",
+ "id": "690eda34.2888d4",
"type": "function",
- "z": "7c36e6b244586b90",
- "g": "fcc735a31613ba0b",
+ "z": "df207830040c7255",
+ "g": "20a1fcbd1d2fea63",
"name": "Already Exist",
"func": "msg.payload = msg.payload.message;\nreturn msg;",
"outputs": 1,
@@ -542,19 +664,19 @@
"initialize": "",
"finalize": "",
"libs": [],
- "x": 890,
+ "x": 1060,
"y": 580,
"wires": [
[
- "f0a3c8e986b84306"
+ "ce3d135404921045"
]
]
},
{
- "id": "326480ef3c92d5c0",
+ "id": "d3a93046ef612be8",
"type": "function",
- "z": "7c36e6b244586b90",
- "g": "fcc735a31613ba0b",
+ "z": "df207830040c7255",
+ "g": "20a1fcbd1d2fea63",
"name": "Bad Request",
"func": "msg.payload = msg.payload.message;\nreturn msg;",
"outputs": 1,
@@ -562,19 +684,19 @@
"initialize": "",
"finalize": "",
"libs": [],
- "x": 890,
+ "x": 1060,
"y": 620,
"wires": [
[
- "f0a3c8e986b84306"
+ "ce3d135404921045"
]
]
},
{
- "id": "75251f6f795cf94b",
+ "id": "7e0de8ca88627f13",
"type": "function",
- "z": "7c36e6b244586b90",
- "g": "fcc735a31613ba0b",
+ "z": "df207830040c7255",
+ "g": "20a1fcbd1d2fea63",
"name": "Forbidden",
"func": "msg.payload = msg.payload.message;\nreturn msg;",
"outputs": 1,
@@ -582,25 +704,25 @@
"initialize": "",
"finalize": "",
"libs": [],
- "x": 880,
+ "x": 1050,
"y": 660,
"wires": [
[
- "f0a3c8e986b84306"
+ "ce3d135404921045"
]
]
},
{
- "id": "339ec0a4de49f192",
+ "id": "ec98aacb0f957338",
"type": "ui_dropdown",
- "z": "7c36e6b244586b90",
- "g": "fcc735a31613ba0b",
+ "z": "df207830040c7255",
+ "g": "20a1fcbd1d2fea63",
"name": "",
"label": "Subscription list",
"tooltip": "",
"place": "Select option",
"group": "9fcc1ffb8aba8b21",
- "order": 1,
+ "order": 4,
"width": 6,
"height": 1,
"passthru": true,
@@ -714,23 +836,25 @@
],
"payload": "",
"topic": "topic",
- "x": 160,
- "y": 510,
+ "topicType": "str",
+ "className": "",
+ "x": 130,
+ "y": 540,
"wires": [
[
- "5d04b1b54ccbe8c9",
- "130a9c742ee1cd45"
+ "fd85f36550d37557",
+ "ee66b6128ff85327"
]
]
},
{
- "id": "fc340bacd213c455",
+ "id": "30982b64daa64b4f",
"type": "ui_button",
- "z": "7c36e6b244586b90",
- "g": "fcc735a31613ba0b",
+ "z": "df207830040c7255",
+ "g": "20a1fcbd1d2fea63",
"name": "",
"group": "9fcc1ffb8aba8b21",
- "order": 2,
+ "order": 5,
"width": 6,
"height": 1,
"passthru": false,
@@ -742,53 +866,54 @@
"payload": "",
"payloadType": "str",
"topic": "subscribe",
- "x": 140,
- "y": 560,
+ "x": 110,
+ "y": 630,
"wires": [
[
- "cb25e994d7e2f0db"
+ "8b713e9019cc4516"
]
]
},
{
- "id": "5d04b1b54ccbe8c9",
+ "id": "fd85f36550d37557",
"type": "ui_text",
- "z": "7c36e6b244586b90",
- "g": "fcc735a31613ba0b",
+ "z": "df207830040c7255",
+ "g": "20a1fcbd1d2fea63",
"group": "9fcc1ffb8aba8b21",
- "order": 3,
+ "order": 6,
"width": 6,
"height": 1,
"name": "",
"label": "Selected subscription",
"format": "{{msg.payload}}",
"layout": "row-spread",
- "x": 360,
- "y": 510,
+ "className": "",
+ "x": 340,
+ "y": 580,
"wires": []
},
{
- "id": "f0a3c8e986b84306",
+ "id": "ce3d135404921045",
"type": "ui_text",
- "z": "7c36e6b244586b90",
- "g": "fcc735a31613ba0b",
+ "z": "df207830040c7255",
+ "g": "20a1fcbd1d2fea63",
"group": "9fcc1ffb8aba8b21",
- "order": 4,
+ "order": 7,
"width": 6,
"height": 1,
"name": "",
"label": "Response",
"format": "{{msg.payload}}",
"layout": "row-spread",
- "x": 1070,
- "y": 510,
+ "x": 1240,
+ "y": 540,
"wires": []
},
{
- "id": "3cc9efe69b837c90",
+ "id": "3c4839ef38d1e5be",
"type": "function",
- "z": "7c36e6b244586b90",
- "g": "fcc735a31613ba0b",
+ "z": "df207830040c7255",
+ "g": "20a1fcbd1d2fea63",
"name": "Get active subscriptions",
"func": "msg = {\n \"headers\" : {\n \"Client-ID\": flow.get('ClientID'),\n \"Authorization\": flow.get('AppToken'),\n \"Accept\": \"application/json\"\n },\n \"url\": \"https://api.twitch.tv/helix/eventsub/subscriptions\"\n}\nreturn msg;",
"outputs": 1,
@@ -796,19 +921,19 @@
"initialize": "",
"finalize": "",
"libs": [],
- "x": 340,
- "y": 680,
+ "x": 360,
+ "y": 770,
"wires": [
[
- "405334c2f7ab6b61"
+ "49ebc9ee3ff5553f"
]
]
},
{
- "id": "405334c2f7ab6b61",
+ "id": "49ebc9ee3ff5553f",
"type": "http request",
- "z": "7c36e6b244586b90",
- "g": "fcc735a31613ba0b",
+ "z": "df207830040c7255",
+ "g": "20a1fcbd1d2fea63",
"name": "",
"method": "GET",
"ret": "obj",
@@ -818,43 +943,45 @@
"persist": false,
"proxy": "",
"authType": "",
- "x": 550,
- "y": 680,
+ "senderr": false,
+ "x": 560,
+ "y": 770,
"wires": [
[
- "9b2a3a7986e4549f"
+ "6aa36f6125c38ddf"
]
]
},
{
- "id": "9b2a3a7986e4549f",
+ "id": "6aa36f6125c38ddf",
"type": "function",
- "z": "7c36e6b244586b90",
- "g": "fcc735a31613ba0b",
+ "z": "df207830040c7255",
+ "g": "20a1fcbd1d2fea63",
"name": "List Sub ID",
- "func": "let Sub_ID = {};\nlet Channel_ID = \"\";\nlet Notif_Type = \"\";\nlet Notif_ID = \"\";\n\nfor (let i = 0; i < msg.payload.data.length ; i++){\n Channel_ID = msg.payload.data[i].condition.broadcaster_user_id;\n Notif_Type = msg.payload.data[i].type;\n Notif_ID = msg.payload.data[i].id;\n if (!Sub_ID.hasOwnProperty(Channel_ID)) {\n Sub_ID[Channel_ID] = {};\n }\n if (!Sub_ID[Channel_ID].hasOwnProperty(Notif_Type)) {\n Sub_ID[Channel_ID][Notif_Type] = Notif_ID;\n }\n}\n\nflow.set('Subscription_ID', Sub_ID);\nmsg.payload = Sub_ID;\n\nreturn msg;\n\n",
+ "func": "let Sub_ID = {};\nlet Channel_ID = \"\";\nlet Notif_Type = \"\";\nlet Notif_ID = \"\";\n\nfor (let i = 0; i < msg.payload.data.length ; i++){\n if (msg.payload.data[i].condition.hasOwnProperty(\"broadcaster_user_id\")){\n Channel_ID = msg.payload.data[i].condition.broadcaster_user_id;\n }\n else{\n Channel_ID = msg.payload.data[i].condition.to_broadcaster_user_id;\n }\n Notif_Type = msg.payload.data[i].type;\n Notif_ID = msg.payload.data[i].id;\n if (!Sub_ID.hasOwnProperty(Channel_ID)) {\n Sub_ID[Channel_ID] = {};\n }\n if (!Sub_ID[Channel_ID].hasOwnProperty(Notif_Type)) {\n Sub_ID[Channel_ID][Notif_Type] = Notif_ID;\n }\n}\n\nflow.set('Subscription_ID', Sub_ID);\nmsg.payload = Sub_ID;\nmsg.topic = \"Sub_ID\";\n\nreturn msg;\n\n",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
- "x": 710,
- "y": 680,
+ "x": 730,
+ "y": 770,
"wires": [
[
- "e3ae1a35a2d8953e"
+ "566b14e2f0568603",
+ "dd4a8a1e4291d855"
]
]
},
{
- "id": "02f29ca8c6aec9d8",
+ "id": "84e31e98de53c8f6",
"type": "ui_button",
- "z": "7c36e6b244586b90",
- "g": "fcc735a31613ba0b",
+ "z": "df207830040c7255",
+ "g": "20a1fcbd1d2fea63",
"name": "",
"group": "ee20fe791dedef03",
"order": 1,
- "width": 3,
+ "width": 2,
"height": 1,
"passthru": false,
"label": "Refresh",
@@ -865,47 +992,48 @@
"payload": "",
"payloadType": "str",
"topic": "topic",
- "x": 140,
- "y": 680,
+ "x": 120,
+ "y": 770,
"wires": [
[
- "3cc9efe69b837c90"
+ "3c4839ef38d1e5be",
+ "1053bfdaa6f39afb"
]
]
},
{
- "id": "e3ae1a35a2d8953e",
+ "id": "566b14e2f0568603",
"type": "function",
- "z": "7c36e6b244586b90",
- "g": "fcc735a31613ba0b",
+ "z": "df207830040c7255",
+ "g": "20a1fcbd1d2fea63",
"name": "Setup Dropdown",
- "func": "const Broadcaster_ID = flow.get('ChannelID');\nconst Subscriptions = msg.payload[Broadcaster_ID];\nmsg = {options : []}\n\nfor(var type in Subscriptions){\n msg.options.push({[type] : Subscriptions[type]})\n}\n\nreturn msg;",
+ "func": "const Broadcaster_ID = flow.get('ChannelID');\nconst Sub_ID = flow.get('Subscription_ID')||{};\nconst Subscriptions = Sub_ID[Broadcaster_ID];\nmsg = {options : []}\n\nfor(var type in Subscriptions){\n msg.options.push({[type] : Subscriptions[type]})\n}\n\nreturn msg;",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
- "x": 730,
- "y": 720,
+ "x": 1160,
+ "y": 770,
"wires": [
[
- "054898ab624802e6"
+ "a383193c03077b55"
]
]
},
{
- "id": "054898ab624802e6",
+ "id": "a383193c03077b55",
"type": "ui_dropdown",
- "z": "7c36e6b244586b90",
- "g": "fcc735a31613ba0b",
+ "z": "df207830040c7255",
+ "g": "20a1fcbd1d2fea63",
"name": "",
"label": "Active sub",
"tooltip": "",
"place": "Select option",
"group": "ee20fe791dedef03",
- "order": 4,
- "width": 0,
- "height": 0,
+ "order": 5,
+ "width": 6,
+ "height": 1,
"passthru": true,
"multiple": false,
"options": [
@@ -918,24 +1046,25 @@
"payload": "",
"topic": "topic",
"topicType": "str",
- "x": 910,
- "y": 720,
+ "className": "",
+ "x": 1190,
+ "y": 820,
"wires": [
[
- "dc8eaa0c3026839b",
- "50ed880f14925aef"
+ "82b0797b3012e829",
+ "30fbfd9411298b86"
]
]
},
{
- "id": "7093682264d0eeaa",
+ "id": "f9c17dfc34ee6ddc",
"type": "ui_button",
- "z": "7c36e6b244586b90",
- "g": "fcc735a31613ba0b",
+ "z": "df207830040c7255",
+ "g": "20a1fcbd1d2fea63",
"name": "",
"group": "ee20fe791dedef03",
- "order": 3,
- "width": 3,
+ "order": 2,
+ "width": 2,
"height": 1,
"passthru": false,
"label": "Unsubscribe",
@@ -947,53 +1076,53 @@
"payloadType": "str",
"topic": "unsubscribe",
"topicType": "str",
- "x": 150,
- "y": 720,
+ "x": 120,
+ "y": 710,
"wires": [
[
- "f2a3f080a07c3193"
+ "ffae0df38c6c8c22"
]
]
},
{
- "id": "09e4fce23bf14ad4",
+ "id": "c7fe8d294efda317",
"type": "ui_text",
- "z": "7c36e6b244586b90",
- "g": "fcc735a31613ba0b",
+ "z": "df207830040c7255",
+ "g": "20a1fcbd1d2fea63",
"group": "ee20fe791dedef03",
- "order": 6,
- "width": 7,
+ "order": 7,
+ "width": 6,
"height": 1,
"name": "",
"label": "Response",
"format": "{{msg.payload}}",
"layout": "row-spread",
- "x": 900,
- "y": 760,
+ "x": 1410,
+ "y": 710,
"wires": []
},
{
- "id": "dc8eaa0c3026839b",
+ "id": "82b0797b3012e829",
"type": "ui_text",
- "z": "7c36e6b244586b90",
- "g": "fcc735a31613ba0b",
+ "z": "df207830040c7255",
+ "g": "20a1fcbd1d2fea63",
"group": "ee20fe791dedef03",
- "order": 5,
- "width": 7,
+ "order": 6,
+ "width": 6,
"height": 1,
"name": "",
"label": "Selected unsubscription",
"format": "{{msg.payload}}",
"layout": "row-spread",
- "x": 1120,
- "y": 760,
+ "x": 1420,
+ "y": 820,
"wires": []
},
{
- "id": "50ed880f14925aef",
+ "id": "30fbfd9411298b86",
"type": "function",
- "z": "7c36e6b244586b90",
- "g": "fcc735a31613ba0b",
+ "z": "df207830040c7255",
+ "g": "20a1fcbd1d2fea63",
"name": "Save current UnSub",
"func": "flow.set(\"unsubscription\", msg.payload);\nmsg.payload = \"waiting\";\nreturn msg;",
"outputs": 1,
@@ -1001,19 +1130,19 @@
"initialize": "",
"finalize": "",
"libs": [],
- "x": 1110,
- "y": 720,
+ "x": 1420,
+ "y": 770,
"wires": [
[
- "09e4fce23bf14ad4"
+ "c7fe8d294efda317"
]
]
},
{
- "id": "130a9c742ee1cd45",
+ "id": "ee66b6128ff85327",
"type": "function",
- "z": "7c36e6b244586b90",
- "g": "fcc735a31613ba0b",
+ "z": "df207830040c7255",
+ "g": "20a1fcbd1d2fea63",
"name": "Save current Sub",
"func": "flow.set(\"subscription\", msg.payload);\nmsg.payload = \"waiting\";\n\nreturn msg;",
"outputs": 1,
@@ -1021,19 +1150,19 @@
"initialize": "",
"finalize": "",
"libs": [],
- "x": 570,
- "y": 510,
+ "x": 330,
+ "y": 540,
"wires": [
[
- "f0a3c8e986b84306"
+ "ce3d135404921045"
]
]
},
{
- "id": "cb25e994d7e2f0db",
+ "id": "8b713e9019cc4516",
"type": "change",
- "z": "7c36e6b244586b90",
- "g": "fcc735a31613ba0b",
+ "z": "df207830040c7255",
+ "g": "20a1fcbd1d2fea63",
"name": "Set Subscription",
"rules": [
{
@@ -1049,19 +1178,19 @@
"from": "",
"to": "",
"reg": false,
- "x": 170,
- "y": 600,
+ "x": 320,
+ "y": 630,
"wires": [
[
- "3708399c3e4d20ae"
+ "26d8d7df.be0958"
]
]
},
{
- "id": "f2a3f080a07c3193",
+ "id": "ffae0df38c6c8c22",
"type": "change",
- "z": "7c36e6b244586b90",
- "g": "fcc735a31613ba0b",
+ "z": "df207830040c7255",
+ "g": "20a1fcbd1d2fea63",
"name": "Set UnSubscription",
"rules": [
{
@@ -1077,19 +1206,39 @@
"from": "",
"to": "",
"reg": false,
- "x": 170,
- "y": 760,
+ "x": 330,
+ "y": 710,
"wires": [
[
- "725b71c7e6ea3a03"
+ "f2b8d96b.d631b8"
]
]
},
{
- "id": "4b5fef36d50f38f7",
+ "id": "2c9e19de6c1f6cd4",
+ "type": "function",
+ "z": "df207830040c7255",
+ "g": "20a1fcbd1d2fea63",
+ "name": "Response ?",
+ "func": "if(msg.payload == \"\"){\n msg.payload = \"Unsubscription successful\";\n}\nreturn msg;",
+ "outputs": 1,
+ "noerr": 0,
+ "initialize": "",
+ "finalize": "",
+ "libs": [],
+ "x": 890,
+ "y": 710,
+ "wires": [
+ [
+ "c7fe8d294efda317"
+ ]
+ ]
+ },
+ {
+ "id": "5e33e16d982b9232",
"type": "debug",
- "z": "7c36e6b244586b90",
- "g": "fcc735a31613ba0b",
+ "z": "df207830040c7255",
+ "g": "20a1fcbd1d2fea63",
"name": "",
"active": true,
"tosidebar": true,
@@ -1099,34 +1248,1209 @@
"targetType": "full",
"statusVal": "",
"statusType": "auto",
- "x": 690,
- "y": 550,
+ "x": 870,
+ "y": 580,
"wires": []
},
{
- "id": "d0b69acfdab9690f",
+ "id": "dd4a8a1e4291d855",
+ "type": "function",
+ "z": "df207830040c7255",
+ "g": "20a1fcbd1d2fea63",
+ "name": "List Subscriptions",
+ "func": "let IDs = context.get(\"IDs\")||[];\nlet Length = context.get(\"Length\")||0;\nlet Counter = context.get(\"Counter\")||0;\nlet Usernames = context.get(\"Usernames\")||{};\nlet Sub_ID = flow.get('Subscription_ID') || {};\n\n\nif (Object.keys(msg.payload).length === 0){\n msg = { options: [] };\n return [null, null, msg];\n}\nif (msg.topic == \"Sub_ID\"){\n IDs = Object.keys(Sub_ID);\n Length = IDs.length;\n Counter = 0;\n context.set(\"IDs\", IDs);\n context.set(\"Length\", Length);\n context.set(\"Counter\", Counter);\n return [{ payload: parseInt(IDs[0]) }, null];\n}\n\nif(Counter < Length -1){\n Usernames[msg.payload.data[0].broadcaster_login] = IDs[Counter];\n context.set(\"Usernames\", Usernames);\n context.set(\"Counter\", Counter + 1);\n return [{ payload: parseInt(IDs[Counter +1])}, null];\n}\nelse{\n Usernames[msg.payload.data[0].broadcaster_login] = IDs[Counter];\n msg = { options: [] };\n for (var username in Usernames) {\n msg.options.push({ [username]: [username] })\n }\n return [null, msg];\n}\n",
+ "outputs": 3,
+ "noerr": 0,
+ "initialize": "",
+ "finalize": "",
+ "libs": [],
+ "x": 750,
+ "y": 820,
+ "wires": [
+ [
+ "bcb057363ba3c378",
+ "bcb057363ba3c378"
+ ],
+ [
+ "d2fd9327385f9448",
+ "d2fd9327385f9448",
+ "6a40e123a2c65178"
+ ],
+ [
+ "6a40e123a2c65178",
+ "d2fd9327385f9448"
+ ]
+ ]
+ },
+ {
+ "id": "bcb057363ba3c378",
+ "type": "function",
+ "z": "df207830040c7255",
+ "g": "20a1fcbd1d2fea63",
+ "name": "Request channel Name",
+ "func": "msg = {\n \"headers\": {\n \"Client-ID\": flow.get('ClientID'),\n \"Authorization\": flow.get('AppToken')\n },\n \"url\": 'https://api.twitch.tv/helix/channels?broadcaster_id=' + msg.payload\n}\nreturn msg;",
+ "outputs": 1,
+ "noerr": 0,
+ "initialize": "",
+ "finalize": "",
+ "libs": [],
+ "x": 1000,
+ "y": 870,
+ "wires": [
+ [
+ "8a66fd4794b48b1b",
+ "8a66fd4794b48b1b"
+ ]
+ ]
+ },
+ {
+ "id": "d2fd9327385f9448",
+ "type": "ui_dropdown",
+ "z": "df207830040c7255",
+ "g": "20a1fcbd1d2fea63",
+ "name": "",
+ "label": "Channels",
+ "tooltip": "",
+ "place": "Select option",
+ "group": "ee20fe791dedef03",
+ "order": 4,
+ "width": 6,
+ "height": 1,
+ "passthru": true,
+ "multiple": false,
+ "options": [
+ {
+ "label": "",
+ "value": "",
+ "type": "str"
+ }
+ ],
+ "payload": "",
+ "topic": "topic",
+ "topicType": "str",
+ "className": "",
+ "x": 950,
+ "y": 820,
+ "wires": [
+ [
+ "697267a917a5ede1"
+ ]
+ ]
+ },
+ {
+ "id": "8a66fd4794b48b1b",
+ "type": "http request",
+ "z": "df207830040c7255",
+ "g": "20a1fcbd1d2fea63",
+ "name": "Request",
+ "method": "GET",
+ "ret": "obj",
+ "paytoqs": "ignore",
+ "url": "",
+ "tls": "",
+ "persist": false,
+ "proxy": "",
+ "authType": "",
+ "senderr": false,
+ "x": 1190,
+ "y": 870,
+ "wires": [
+ [
+ "dd4a8a1e4291d855",
+ "dd4a8a1e4291d855"
+ ]
+ ]
+ },
+ {
+ "id": "697267a917a5ede1",
+ "type": "link out",
+ "z": "df207830040c7255",
+ "g": "20a1fcbd1d2fea63",
+ "name": "Username",
+ "mode": "link",
+ "links": [
+ "645e4c286635a52f"
+ ],
+ "x": 1035,
+ "y": 820,
+ "wires": []
+ },
+ {
+ "id": "e3011972045e8564",
+ "type": "ui_button",
+ "z": "df207830040c7255",
+ "g": "20a1fcbd1d2fea63",
+ "name": "",
+ "group": "ee20fe791dedef03",
+ "order": 3,
+ "width": 2,
+ "height": 1,
+ "passthru": false,
+ "label": "{{text}}",
+ "tooltip": "",
+ "color": "",
+ "bgcolor": "{{color}}",
+ "className": "",
+ "icon": "",
+ "payload": "",
+ "payloadType": "str",
+ "topic": "topic",
+ "topicType": "str",
+ "x": 940,
+ "y": 910,
+ "wires": [
+ []
+ ]
+ },
+ {
+ "id": "1053bfdaa6f39afb",
+ "type": "change",
+ "z": "df207830040c7255",
+ "g": "20a1fcbd1d2fea63",
+ "name": "Color",
+ "rules": [
+ {
+ "t": "set",
+ "p": "color",
+ "pt": "msg",
+ "to": "RED",
+ "tot": "str"
+ },
+ {
+ "t": "set",
+ "p": "text",
+ "pt": "msg",
+ "to": "WAIT !",
+ "tot": "str"
+ }
+ ],
+ "action": "",
+ "property": "",
+ "from": "",
+ "to": "",
+ "reg": false,
+ "x": 710,
+ "y": 910,
+ "wires": [
+ [
+ "e3011972045e8564"
+ ]
+ ]
+ },
+ {
+ "id": "6a40e123a2c65178",
+ "type": "change",
+ "z": "df207830040c7255",
+ "g": "20a1fcbd1d2fea63",
+ "name": "Color",
+ "rules": [
+ {
+ "t": "set",
+ "p": "color",
+ "pt": "msg",
+ "to": "GREEN",
+ "tot": "str"
+ },
+ {
+ "t": "set",
+ "p": "text",
+ "pt": "msg",
+ "to": "Ready",
+ "tot": "str"
+ }
+ ],
+ "action": "",
+ "property": "",
+ "from": "",
+ "to": "",
+ "reg": false,
+ "x": 710,
+ "y": 870,
+ "wires": [
+ [
+ "e3011972045e8564"
+ ]
+ ]
+ },
+ {
+ "id": "c6a0489a3ee00082",
+ "type": "link in",
+ "z": "df207830040c7255",
+ "g": "20a1fcbd1d2fea63",
+ "name": "Username OK",
+ "links": [
+ "b9d57c51dcfa392e"
+ ],
+ "x": 1035,
+ "y": 750,
+ "wires": [
+ [
+ "566b14e2f0568603"
+ ]
+ ]
+ },
+ {
+ "id": "beab0c19.6d93b",
+ "type": "inject",
+ "z": "df207830040c7255",
+ "g": "fbd6b9fb.b67658",
+ "name": "Settings",
+ "props": [
+ {
+ "p": "payload"
+ },
+ {
+ "p": "topic",
+ "vt": "str"
+ }
+ ],
+ "repeat": "",
+ "crontab": "",
+ "once": false,
+ "onceDelay": 0.1,
+ "topic": "",
+ "payloadType": "date",
+ "x": 120,
+ "y": 110,
+ "wires": [
+ [
+ "966a372a.a07628"
+ ]
+ ]
+ },
+ {
+ "id": "966a372a.a07628",
+ "type": "change",
+ "z": "df207830040c7255",
+ "g": "fbd6b9fb.b67658",
+ "name": "API Settings ",
+ "rules": [
+ {
+ "t": "set",
+ "p": "ClientID",
+ "pt": "flow",
+ "to": "CLIENT ID",
+ "tot": "str"
+ },
+ {
+ "t": "set",
+ "p": "ClientSecret",
+ "pt": "flow",
+ "to": "CLIENT SECRET",
+ "tot": "str"
+ },
+ {
+ "t": "set",
+ "p": "Channel",
+ "pt": "flow",
+ "to": "ioodyme",
+ "tot": "str"
+ },
+ {
+ "t": "set",
+ "p": "ChannelID",
+ "pt": "flow",
+ "to": "CHANNEL ID",
+ "tot": "str"
+ },
+ {
+ "t": "set",
+ "p": "SubSecret",
+ "pt": "flow",
+ "to": "SUB SECRET",
+ "tot": "str"
+ },
+ {
+ "t": "set",
+ "p": "SubURI",
+ "pt": "flow",
+ "to": "SUB URI",
+ "tot": "str"
+ },
+ {
+ "t": "set",
+ "p": "Scopes",
+ "pt": "flow",
+ "to": "bits:read channel:manage:broadcast channel:manage:polls channel:manage:predictions channel:manage:redemptions channel:read:polls channel:read:predictions channel:read:redemptions channel:read:subscriptions moderation:read user:read:follows user:read:subscriptions channel:moderate channel:read:hype_train",
+ "tot": "str"
+ }
+ ],
+ "action": "",
+ "property": "",
+ "from": "",
+ "to": "",
+ "reg": false,
+ "x": 310,
+ "y": 110,
+ "wires": [
+ [
+ "ad6618efadfffb7c",
+ "d063ce8e1987378e"
+ ]
+ ]
+ },
+ {
+ "id": "a9ab8eef.baa2",
+ "type": "function",
+ "z": "df207830040c7255",
+ "g": "fbd6b9fb.b67658",
+ "name": "Request channel ID",
+ "func": "let channel = flow.get(\"Channel\");\nif (msg.topic == \"username\") {\n channel = msg.payload;\n}\n\nmsg = {\n \"headers\": {\n \"Client-ID\": flow.get('ClientID'),\n \"Authorization\": flow.get('AppToken')\n },\n \"url\": 'https://api.twitch.tv/helix/search/channels?query=' + channel + \"&first=1\"\n}\nreturn msg;",
+ "outputs": 1,
+ "noerr": 0,
+ "initialize": "",
+ "finalize": "",
+ "libs": [],
+ "x": 330,
+ "y": 320,
+ "wires": [
+ [
+ "566f2428.09694c"
+ ]
+ ]
+ },
+ {
+ "id": "566f2428.09694c",
+ "type": "http request",
+ "z": "df207830040c7255",
+ "g": "fbd6b9fb.b67658",
+ "name": "Channel ID",
+ "method": "GET",
+ "ret": "obj",
+ "paytoqs": "ignore",
+ "url": "",
+ "tls": "",
+ "persist": false,
+ "proxy": "",
+ "authType": "",
+ "senderr": false,
+ "x": 530,
+ "y": 320,
+ "wires": [
+ [
+ "b8602e99.36c57",
+ "e6f5f8a94cc12207",
+ "527713e229815eae"
+ ]
+ ]
+ },
+ {
+ "id": "b8602e99.36c57",
+ "type": "change",
+ "z": "df207830040c7255",
+ "g": "fbd6b9fb.b67658",
+ "name": "",
+ "rules": [
+ {
+ "t": "set",
+ "p": "ChannelID",
+ "pt": "flow",
+ "to": "msg.payload.data[0].id",
+ "tot": "msg"
+ }
+ ],
+ "action": "",
+ "property": "",
+ "from": "",
+ "to": "",
+ "reg": false,
+ "x": 720,
+ "y": 280,
+ "wires": [
+ [
+ "b9d57c51dcfa392e"
+ ]
+ ]
+ },
+ {
+ "id": "fd63f4262302c5b3",
"type": "http in",
- "z": "7c36e6b244586b90",
- "g": "92e1bc854f009fbe",
+ "z": "df207830040c7255",
+ "g": "fbd6b9fb.b67658",
+ "name": "",
+ "url": "/apptoken",
+ "method": "get",
+ "upload": false,
+ "swaggerDoc": "",
+ "x": 130,
+ "y": 160,
+ "wires": [
+ [
+ "7ac706a80063eebd",
+ "eff64b41360d736d"
+ ]
+ ]
+ },
+ {
+ "id": "7ac706a80063eebd",
+ "type": "function",
+ "z": "df207830040c7255",
+ "g": "fbd6b9fb.b67658",
+ "name": "Request APP Token",
+ "func": "msg = {};\nmsg.url = \"https://id.twitch.tv/oauth2/token\";\nmsg.url += \"?client_id=\" + flow.get('ClientID');\nmsg.url += \"&client_secret=\" + flow.get('ClientSecret');\nmsg.url += \"&grant_type=client_credentials\";\nmsg.url += \"&scope=\" + flow.get('Scopes');\nreturn msg;",
+ "outputs": 1,
+ "noerr": 0,
+ "initialize": "",
+ "finalize": "",
+ "libs": [],
+ "x": 340,
+ "y": 160,
+ "wires": [
+ [
+ "c93450a865e58d44"
+ ]
+ ]
+ },
+ {
+ "id": "c93450a865e58d44",
+ "type": "http request",
+ "z": "df207830040c7255",
+ "g": "fbd6b9fb.b67658",
+ "name": "",
+ "method": "POST",
+ "ret": "obj",
+ "paytoqs": "ignore",
+ "url": "",
+ "tls": "",
+ "persist": false,
+ "proxy": "",
+ "authType": "",
+ "senderr": false,
+ "x": 530,
+ "y": 160,
+ "wires": [
+ [
+ "252b179b82c058d7"
+ ]
+ ]
+ },
+ {
+ "id": "252b179b82c058d7",
+ "type": "function",
+ "z": "df207830040c7255",
+ "g": "fbd6b9fb.b67658",
+ "name": "Save Bearer",
+ "func": "const Token = \"Bearer \" + msg.payload[\"access_token\"];\nflow.set('AppToken', Token);\nreturn;",
+ "outputs": 1,
+ "noerr": 0,
+ "initialize": "",
+ "finalize": "",
+ "libs": [],
+ "x": 720,
+ "y": 160,
+ "wires": [
+ []
+ ]
+ },
+ {
+ "id": "293eff994c230d75",
+ "type": "http response",
+ "z": "df207830040c7255",
+ "g": "fbd6b9fb.b67658",
+ "name": "Response",
+ "statusCode": "",
+ "headers": {},
+ "x": 520,
+ "y": 200,
+ "wires": []
+ },
+ {
+ "id": "e0b907cdd8ccc1cf",
+ "type": "http in",
+ "z": "df207830040c7255",
+ "g": "fbd6b9fb.b67658",
+ "name": "",
+ "url": "/usertoken",
+ "method": "get",
+ "upload": false,
+ "swaggerDoc": "",
+ "x": 130,
+ "y": 240,
+ "wires": [
+ [
+ "3b0aad40327d2546",
+ "ecd9237822214175"
+ ]
+ ]
+ },
+ {
+ "id": "3b0aad40327d2546",
+ "type": "function",
+ "z": "df207830040c7255",
+ "g": "fbd6b9fb.b67658",
+ "name": "Request USER Token",
+ "func": "const code = msg.payload.code;\nmsg = {};\nmsg.url = \"https://id.twitch.tv/oauth2/token?\";\nmsg.url += \"client_id=\" + flow.get('ClientID');\nmsg.url += \"&client_secret=\" + flow.get('ClientSecret');\nmsg.url += \"&code=\" + code;\nmsg.url += \"&grant_type=authorization_code\";\nmsg.url += \"&redirect_uri=https://\" + flow.get('SubURI') + \"/debug\";\nreturn msg;",
+ "outputs": 1,
+ "noerr": 0,
+ "initialize": "",
+ "finalize": "",
+ "libs": [],
+ "x": 340,
+ "y": 240,
+ "wires": [
+ [
+ "1112a9e81345ea8b"
+ ]
+ ]
+ },
+ {
+ "id": "1112a9e81345ea8b",
+ "type": "http request",
+ "z": "df207830040c7255",
+ "g": "fbd6b9fb.b67658",
+ "name": "",
+ "method": "POST",
+ "ret": "obj",
+ "paytoqs": "ignore",
+ "url": "",
+ "tls": "",
+ "persist": false,
+ "proxy": "",
+ "authType": "",
+ "senderr": false,
+ "x": 530,
+ "y": 240,
+ "wires": [
+ [
+ "9a8612014ad4c799"
+ ]
+ ]
+ },
+ {
+ "id": "9a8612014ad4c799",
+ "type": "function",
+ "z": "df207830040c7255",
+ "g": "fbd6b9fb.b67658",
+ "name": "Save Bearer",
+ "func": "const Token = \"Bearer \" + msg.payload[\"access_token\"];\nflow.set('UserToken', Token);\nreturn msg;",
+ "outputs": 1,
+ "noerr": 0,
+ "initialize": "",
+ "finalize": "",
+ "libs": [],
+ "x": 700,
+ "y": 240,
+ "wires": [
+ []
+ ]
+ },
+ {
+ "id": "379327a91b22c7dd",
+ "type": "http response",
+ "z": "df207830040c7255",
+ "g": "fbd6b9fb.b67658",
+ "name": "Response",
+ "statusCode": "",
+ "headers": {},
+ "x": 520,
+ "y": 280,
+ "wires": []
+ },
+ {
+ "id": "e44ac409f8d18e83",
+ "type": "ui_template",
+ "z": "df207830040c7255",
+ "g": "fbd6b9fb.b67658",
+ "group": "174e8ee08b6a981f",
+ "name": "Authorize App",
+ "order": 2,
+ "width": 3,
+ "height": 1,
+ "format": "",
+ "storeOutMessages": true,
+ "fwdInMessages": true,
+ "resendOnRefresh": true,
+ "templateScope": "local",
+ "x": 540,
+ "y": 110,
+ "wires": [
+ []
+ ]
+ },
+ {
+ "id": "8b2294e6bc52446d",
+ "type": "ui_template",
+ "z": "df207830040c7255",
+ "g": "fbd6b9fb.b67658",
+ "group": "174e8ee08b6a981f",
+ "name": "Authorize User",
+ "order": 3,
+ "width": 3,
+ "height": 1,
+ "format": "",
+ "storeOutMessages": true,
+ "fwdInMessages": true,
+ "resendOnRefresh": true,
+ "templateScope": "local",
+ "x": 730,
+ "y": 110,
+ "wires": [
+ []
+ ]
+ },
+ {
+ "id": "3f7a96c6437a13b9",
+ "type": "function",
+ "z": "df207830040c7255",
+ "g": "fbd6b9fb.b67658",
+ "name": "Validate User Token",
+ "func": "msg = {\n \"headers\" : {\n \"Client-ID\": flow.get('AppID'),\n \"Authorization\": flow.get('UserToken'),\n \"Accept\" : \"application/vnd.twitchtv.v5+json\"\n },\n \"url\": \"https://id.twitch.tv/oauth2/validate\"\n}\nreturn msg;",
+ "outputs": 1,
+ "noerr": 0,
+ "initialize": "",
+ "finalize": "",
+ "libs": [],
+ "x": 340,
+ "y": 360,
+ "wires": [
+ [
+ "a0c81e642c7a3105"
+ ]
+ ]
+ },
+ {
+ "id": "a0c81e642c7a3105",
+ "type": "http request",
+ "z": "df207830040c7255",
+ "g": "fbd6b9fb.b67658",
+ "name": "Request",
+ "method": "GET",
+ "ret": "obj",
+ "paytoqs": "ignore",
+ "url": "",
+ "tls": "",
+ "persist": false,
+ "proxy": "",
+ "authType": "",
+ "x": 520,
+ "y": 360,
+ "wires": [
+ [
+ "2c4a0a29dd209504"
+ ]
+ ]
+ },
+ {
+ "id": "ad6618efadfffb7c",
+ "type": "template",
+ "z": "df207830040c7255",
+ "g": "fbd6b9fb.b67658",
+ "name": "Authorize App",
+ "field": "template",
+ "fieldType": "msg",
+ "format": "handlebars",
+ "syntax": "mustache",
+ "template": "\n\n\n
\n \n \n Authorize APP\n\n\n",
+ "output": "str",
+ "x": 540,
+ "y": 70,
+ "wires": [
+ [
+ "e44ac409f8d18e83"
+ ]
+ ]
+ },
+ {
+ "id": "d063ce8e1987378e",
+ "type": "template",
+ "z": "df207830040c7255",
+ "g": "fbd6b9fb.b67658",
+ "name": "Authorize User",
+ "field": "template",
+ "fieldType": "msg",
+ "format": "handlebars",
+ "syntax": "mustache",
+ "template": "\n\n\n\n \n \n Authorize USER\n\n\n",
+ "output": "str",
+ "x": 730,
+ "y": 70,
+ "wires": [
+ [
+ "8b2294e6bc52446d"
+ ]
+ ]
+ },
+ {
+ "id": "2c88d43747076c97",
+ "type": "function",
+ "z": "df207830040c7255",
+ "g": "fbd6b9fb.b67658",
+ "name": "Validate App Token",
+ "func": "msg = {\n \"headers\" : {\n \"Client-ID\": flow.get('AppID'),\n \"Authorization\": flow.get('AppToken'),\n \"Accept\" : \"application/vnd.twitchtv.v5+json\"\n },\n \"url\": \"https://id.twitch.tv/oauth2/validate\"\n}\nreturn msg;",
+ "outputs": 1,
+ "noerr": 0,
+ "initialize": "",
+ "finalize": "",
+ "libs": [],
+ "x": 330,
+ "y": 400,
+ "wires": [
+ [
+ "e35fd443178b1637"
+ ]
+ ]
+ },
+ {
+ "id": "e35fd443178b1637",
+ "type": "http request",
+ "z": "df207830040c7255",
+ "g": "fbd6b9fb.b67658",
+ "name": "Request",
+ "method": "GET",
+ "ret": "obj",
+ "paytoqs": "ignore",
+ "url": "",
+ "tls": "",
+ "persist": false,
+ "proxy": "",
+ "authType": "",
+ "x": 520,
+ "y": 400,
+ "wires": [
+ [
+ "2b8377a30ae7e578"
+ ]
+ ]
+ },
+ {
+ "id": "d7b248978206a06f",
+ "type": "ui_text_input",
+ "z": "df207830040c7255",
+ "g": "fbd6b9fb.b67658",
+ "name": "",
+ "label": "Username",
+ "tooltip": "",
+ "group": "9fcc1ffb8aba8b21",
+ "order": 1,
+ "width": 4,
+ "height": 1,
+ "passthru": true,
+ "mode": "text",
+ "delay": "0",
+ "topic": "username",
+ "sendOnBlur": true,
+ "className": "",
+ "topicType": "str",
+ "x": 130,
+ "y": 320,
+ "wires": [
+ [
+ "a9ab8eef.baa2"
+ ]
+ ]
+ },
+ {
+ "id": "b1096a477fb9abe5",
+ "type": "ui_text",
+ "z": "df207830040c7255",
+ "g": "fbd6b9fb.b67658",
+ "group": "9fcc1ffb8aba8b21",
+ "order": 3,
+ "width": 4,
+ "height": 1,
+ "name": "",
+ "label": "ID :",
+ "format": "{{msg.payload}}",
+ "layout": "row-left",
+ "className": "",
+ "x": 820,
+ "y": 320,
+ "wires": []
+ },
+ {
+ "id": "055dadece0fd3af6",
+ "type": "ui_button",
+ "z": "df207830040c7255",
+ "g": "fbd6b9fb.b67658",
+ "name": "",
+ "group": "174e8ee08b6a981f",
+ "order": 6,
+ "width": 0,
+ "height": 0,
+ "passthru": true,
+ "label": "Test token",
+ "tooltip": "",
+ "color": "",
+ "bgcolor": "",
+ "icon": "",
+ "payload": "",
+ "payloadType": "str",
+ "topic": "topic",
+ "topicType": "msg",
+ "x": 130,
+ "y": 380,
+ "wires": [
+ [
+ "3f7a96c6437a13b9",
+ "2c88d43747076c97"
+ ]
+ ]
+ },
+ {
+ "id": "aea1f7b492402c01",
+ "type": "ui_button",
+ "z": "df207830040c7255",
+ "g": "fbd6b9fb.b67658",
+ "name": "User",
+ "group": "174e8ee08b6a981f",
+ "order": 5,
+ "width": 3,
+ "height": 1,
+ "passthru": false,
+ "label": "",
+ "tooltip": "",
+ "color": "",
+ "bgcolor": "{{payload}}",
+ "className": "",
+ "icon": "",
+ "payload": "",
+ "payloadType": "str",
+ "topic": "topic",
+ "topicType": "msg",
+ "x": 680,
+ "y": 410,
+ "wires": [
+ []
+ ]
+ },
+ {
+ "id": "4d6e5b640e32530c",
+ "type": "ui_button",
+ "z": "df207830040c7255",
+ "g": "fbd6b9fb.b67658",
+ "name": "App",
+ "group": "174e8ee08b6a981f",
+ "order": 4,
+ "width": 3,
+ "height": 1,
+ "passthru": false,
+ "label": "",
+ "tooltip": "",
+ "color": "",
+ "bgcolor": "{{payload}}",
+ "icon": "",
+ "payload": "",
+ "payloadType": "str",
+ "topic": "topic",
+ "topicType": "msg",
+ "x": 680,
+ "y": 450,
+ "wires": [
+ []
+ ]
+ },
+ {
+ "id": "2b8377a30ae7e578",
+ "type": "function",
+ "z": "df207830040c7255",
+ "g": "fbd6b9fb.b67658",
+ "name": "Test App",
+ "func": "if (msg.statusCode == 401) {\n return {payload : \"RED\"};\n}\nelse if(msg.statusCode == 200){\n return { payload: \"GREEN\" }\n}\n",
+ "outputs": 1,
+ "noerr": 0,
+ "initialize": "",
+ "finalize": "",
+ "libs": [],
+ "x": 300,
+ "y": 450,
+ "wires": [
+ [
+ "4d6e5b640e32530c"
+ ]
+ ]
+ },
+ {
+ "id": "2c4a0a29dd209504",
+ "type": "function",
+ "z": "df207830040c7255",
+ "g": "fbd6b9fb.b67658",
+ "name": "Test User",
+ "func": "if (msg.statusCode == 401) {\n return {payload : \"RED\"};\n}\nelse if(msg.statusCode == 200){\n return { payload: \"GREEN\" }\n}\n",
+ "outputs": 1,
+ "noerr": 0,
+ "initialize": "",
+ "finalize": "",
+ "libs": [],
+ "x": 520,
+ "y": 450,
+ "wires": [
+ [
+ "aea1f7b492402c01"
+ ]
+ ]
+ },
+ {
+ "id": "18a0ecdb51dce96a",
+ "type": "ui_form",
+ "z": "df207830040c7255",
+ "g": "fbd6b9fb.b67658",
+ "name": "",
+ "label": "Settings",
+ "group": "174e8ee08b6a981f",
+ "order": 1,
+ "width": 0,
+ "height": 0,
+ "options": [
+ {
+ "label": "Client ID",
+ "value": "ClientID",
+ "type": "text",
+ "required": false,
+ "rows": null
+ },
+ {
+ "label": "Client Secret",
+ "value": "ClientSecret",
+ "type": "text",
+ "required": false,
+ "rows": null
+ },
+ {
+ "label": "Sub Secret",
+ "value": "SubSecret",
+ "type": "text",
+ "required": false,
+ "rows": null
+ },
+ {
+ "label": "Channel",
+ "value": "Channel",
+ "type": "text",
+ "required": false,
+ "rows": null
+ },
+ {
+ "label": "Sub URI",
+ "value": "SubURI",
+ "type": "text",
+ "required": false,
+ "rows": null
+ },
+ {
+ "label": "Scopes",
+ "value": "Scopes",
+ "type": "text",
+ "required": false,
+ "rows": null
+ }
+ ],
+ "formValue": {
+ "ClientID": "",
+ "ClientSecret": "",
+ "SubSecret": "",
+ "Channel": "",
+ "SubURI": "",
+ "Scopes": ""
+ },
+ "payload": "",
+ "submit": "submit",
+ "cancel": "cancel",
+ "topic": "topic",
+ "topicType": "msg",
+ "splitLayout": true,
+ "className": "",
+ "x": 130,
+ "y": 70,
+ "wires": [
+ [
+ "a70f82e316ae9b20"
+ ]
+ ]
+ },
+ {
+ "id": "a70f82e316ae9b20",
+ "type": "function",
+ "z": "df207830040c7255",
+ "g": "fbd6b9fb.b67658",
+ "name": "Save settings",
+ "func": "for (var key in msg.payload) {\n if (msg.payload[key] != \"\") {\n flow.set(key, msg.payload[key]);\n }\n}\nreturn { payload: \"OK\" };",
+ "outputs": 1,
+ "noerr": 0,
+ "initialize": "",
+ "finalize": "",
+ "libs": [],
+ "x": 310,
+ "y": 70,
+ "wires": [
+ [
+ "ad6618efadfffb7c",
+ "d063ce8e1987378e"
+ ]
+ ]
+ },
+ {
+ "id": "eff64b41360d736d",
+ "type": "template",
+ "z": "df207830040c7255",
+ "g": "fbd6b9fb.b67658",
+ "name": "Reponse",
+ "field": "payload",
+ "fieldType": "msg",
+ "format": "handlebars",
+ "syntax": "mustache",
+ "template": "\n \n \n \n\n \n App Token generated
\n If you are not redirected after 2 sec, click here.
\n \n\n",
+ "output": "str",
+ "x": 300,
+ "y": 200,
+ "wires": [
+ [
+ "293eff994c230d75"
+ ]
+ ]
+ },
+ {
+ "id": "ecd9237822214175",
+ "type": "template",
+ "z": "df207830040c7255",
+ "g": "fbd6b9fb.b67658",
+ "name": "Response",
+ "field": "payload",
+ "fieldType": "msg",
+ "format": "handlebars",
+ "syntax": "mustache",
+ "template": "\n \n \n \n\n \n User Token generated
\n If you are not redirected after 2 sec, click here.
\n \n\n",
+ "output": "str",
+ "x": 300,
+ "y": 280,
+ "wires": [
+ [
+ "379327a91b22c7dd"
+ ]
+ ]
+ },
+ {
+ "id": "e6f5f8a94cc12207",
+ "type": "change",
+ "z": "df207830040c7255",
+ "g": "fbd6b9fb.b67658",
+ "name": "Get ID",
+ "rules": [
+ {
+ "t": "set",
+ "p": "payload",
+ "pt": "msg",
+ "to": "payload.data[0].id",
+ "tot": "msg"
+ }
+ ],
+ "action": "",
+ "property": "",
+ "from": "",
+ "to": "",
+ "reg": false,
+ "x": 680,
+ "y": 320,
+ "wires": [
+ [
+ "b1096a477fb9abe5"
+ ]
+ ]
+ },
+ {
+ "id": "4c3ce8432cc7554a",
+ "type": "ui_template",
+ "z": "df207830040c7255",
+ "g": "fbd6b9fb.b67658",
+ "group": "9fcc1ffb8aba8b21",
+ "name": "IMG",
+ "order": 2,
+ "width": 2,
+ "height": 2,
+ "format": "\n
\n
",
+ "storeOutMessages": true,
+ "fwdInMessages": true,
+ "resendOnRefresh": true,
+ "templateScope": "local",
+ "className": "",
+ "x": 820,
+ "y": 360,
+ "wires": [
+ []
+ ]
+ },
+ {
+ "id": "527713e229815eae",
+ "type": "change",
+ "z": "df207830040c7255",
+ "g": "fbd6b9fb.b67658",
+ "name": "Get IMG",
+ "rules": [
+ {
+ "t": "set",
+ "p": "payload",
+ "pt": "msg",
+ "to": "payload.data[0].thumbnail_url",
+ "tot": "msg"
+ }
+ ],
+ "action": "",
+ "property": "",
+ "from": "",
+ "to": "",
+ "reg": false,
+ "x": 690,
+ "y": 360,
+ "wires": [
+ [
+ "4c3ce8432cc7554a"
+ ]
+ ]
+ },
+ {
+ "id": "645e4c286635a52f",
+ "type": "link in",
+ "z": "df207830040c7255",
+ "g": "fbd6b9fb.b67658",
+ "name": "Username",
+ "links": [
+ "697267a917a5ede1"
+ ],
+ "x": 75,
+ "y": 280,
+ "wires": [
+ [
+ "d7b248978206a06f"
+ ]
+ ]
+ },
+ {
+ "id": "b9d57c51dcfa392e",
+ "type": "link out",
+ "z": "df207830040c7255",
+ "g": "fbd6b9fb.b67658",
+ "name": "Username OK",
+ "mode": "link",
+ "links": [
+ "c6a0489a3ee00082"
+ ],
+ "x": 855,
+ "y": 280,
+ "wires": []
+ },
+ {
+ "id": "172852334e067eab",
+ "type": "http in",
+ "z": "df207830040c7255",
+ "g": "da23423c6c5ba9f9",
"name": "WebHook",
"url": "/webhook",
"method": "post",
"upload": false,
"swaggerDoc": "",
- "x": 140,
- "y": 900,
+ "x": 110,
+ "y": 1050,
"wires": [
[
- "cf0cc718151d358c",
- "5970201814f50194"
+ "0953d456cfdb4563",
+ "189539cfa8fd4634"
]
]
},
{
- "id": "b24de4d8c4c1bec5",
+ "id": "a14899d1bdaee6ae",
"type": "switch",
- "z": "7c36e6b244586b90",
- "g": "92e1bc854f009fbe",
+ "z": "df207830040c7255",
+ "g": "da23423c6c5ba9f9",
"name": "Type ?",
"property": "req.headers[\"twitch-eventsub-message-type\"]",
"propertyType": "msg",
@@ -1150,25 +2474,25 @@
"checkall": "true",
"repair": false,
"outputs": 3,
- "x": 620,
- "y": 940,
+ "x": 590,
+ "y": 1090,
"wires": [
[
- "31e1b1bf8353dccc"
+ "b99ebb122e5c2d93"
],
[
- "25dc8656e1bfa516"
+ "e9b516c0427c7331"
],
[
- "e2bf3df8cde51c10"
+ "9bae08932a4b918f"
]
]
},
{
- "id": "25dc8656e1bfa516",
+ "id": "e9b516c0427c7331",
"type": "function",
- "z": "7c36e6b244586b90",
- "g": "92e1bc854f009fbe",
+ "z": "df207830040c7255",
+ "g": "da23423c6c5ba9f9",
"name": "Notification",
"func": "msg.statusCode = 200;\nreturn msg",
"outputs": 1,
@@ -1176,32 +2500,32 @@
"initialize": "",
"finalize": "",
"libs": [],
- "x": 790,
- "y": 930,
+ "x": 760,
+ "y": 1080,
"wires": [
[
- "837d3dc56ed07a67",
- "cb2ff17efa270361"
+ "09b3f14a7ec50bce",
+ "e2b1a1d555abedaa"
]
]
},
{
- "id": "e2bf3df8cde51c10",
+ "id": "9bae08932a4b918f",
"type": "link out",
- "z": "7c36e6b244586b90",
- "g": "92e1bc854f009fbe",
+ "z": "df207830040c7255",
+ "g": "da23423c6c5ba9f9",
"name": "WebHook revocation",
+ "mode": "link",
"links": [],
- "x": 820,
- "y": 970,
- "wires": [],
- "l": true
+ "x": 705,
+ "y": 1120,
+ "wires": []
},
{
- "id": "31e1b1bf8353dccc",
+ "id": "b99ebb122e5c2d93",
"type": "function",
- "z": "7c36e6b244586b90",
- "g": "92e1bc854f009fbe",
+ "z": "df207830040c7255",
+ "g": "da23423c6c5ba9f9",
"name": "Subscription",
"func": "msg.payload = msg.payload.challenge.toString();\nmsg.statusCode = 200;\nreturn msg",
"outputs": 1,
@@ -1209,45 +2533,46 @@
"initialize": "",
"finalize": "",
"libs": [],
- "x": 790,
- "y": 890,
+ "x": 760,
+ "y": 1040,
"wires": [
[
- "cb2ff17efa270361"
+ "e2b1a1d555abedaa"
]
]
},
{
- "id": "cb2ff17efa270361",
+ "id": "e2b1a1d555abedaa",
"type": "http response",
- "z": "7c36e6b244586b90",
- "g": "92e1bc854f009fbe",
+ "z": "df207830040c7255",
+ "g": "da23423c6c5ba9f9",
"name": "Response",
"statusCode": "",
"headers": {},
- "x": 940,
- "y": 890,
+ "x": 910,
+ "y": 1040,
"wires": []
},
{
- "id": "032f8b46cd35fd8b",
+ "id": "496beddfeba0baee",
"type": "link out",
- "z": "7c36e6b244586b90",
- "g": "92e1bc854f009fbe",
+ "z": "df207830040c7255",
+ "g": "da23423c6c5ba9f9",
"name": "WebHook Notification",
+ "mode": "link",
"links": [
"03f134a19d11f009"
],
- "x": 1130,
- "y": 930,
+ "x": 1260,
+ "y": 1080,
"wires": [],
"l": true
},
{
- "id": "837d3dc56ed07a67",
+ "id": "09b3f14a7ec50bce",
"type": "function",
- "z": "7c36e6b244586b90",
- "g": "92e1bc854f009fbe",
+ "z": "df207830040c7255",
+ "g": "da23423c6c5ba9f9",
"name": "ID Filter",
"func": "let IDList = flow.get('EventID')||[];\nlet ID = msg.req.headers[\"twitch-eventsub-message-id\"];\n\nif(!IDList.includes(ID)){\n IDList.push(ID);\n flow.set('EventID', IDList);\n return msg;\n}\n\n",
"outputs": 1,
@@ -1255,38 +2580,20 @@
"initialize": "",
"finalize": "",
"libs": [],
- "x": 940,
- "y": 930,
+ "x": 910,
+ "y": 1080,
"wires": [
[
- "032f8b46cd35fd8b",
- "087d1279b39b6fdc"
+ "94f06a5db5091ecc",
+ "f4803e78add4ee2f"
]
]
},
{
- "id": "087d1279b39b6fdc",
- "type": "debug",
- "z": "7c36e6b244586b90",
- "g": "92e1bc854f009fbe",
- "name": "",
- "active": true,
- "tosidebar": true,
- "console": false,
- "tostatus": false,
- "complete": "true",
- "targetType": "full",
- "statusVal": "",
- "statusType": "auto",
- "x": 1080,
- "y": 970,
- "wires": []
- },
- {
- "id": "2d2ab0f1c6b3f056",
+ "id": "8c2a43d196ec7e5c",
"type": "inject",
- "z": "7c36e6b244586b90",
- "g": "92e1bc854f009fbe",
+ "z": "df207830040c7255",
+ "g": "da23423c6c5ba9f9",
"name": "",
"props": [
{
@@ -1303,20 +2610,20 @@
"onceDelay": 0.1,
"topic": "",
"payloadType": "date",
- "x": 790,
- "y": 850,
+ "x": 760,
+ "y": 1000,
"wires": [
[
- "185dbbdda096b452"
+ "83822eaec1eca52b"
]
]
},
{
- "id": "185dbbdda096b452",
+ "id": "83822eaec1eca52b",
"type": "change",
- "z": "7c36e6b244586b90",
- "g": "92e1bc854f009fbe",
- "name": "Reset EventID",
+ "z": "df207830040c7255",
+ "g": "da23423c6c5ba9f9",
+ "name": "",
"rules": [
{
"t": "set",
@@ -1331,17 +2638,17 @@
"from": "",
"to": "",
"reg": false,
- "x": 960,
- "y": 850,
+ "x": 930,
+ "y": 1000,
"wires": [
[]
]
},
{
- "id": "7080117654ae5e2c",
+ "id": "9ae2fc3a337f9a0e",
"type": "function",
- "z": "7c36e6b244586b90",
- "g": "92e1bc854f009fbe",
+ "z": "df207830040c7255",
+ "g": "da23423c6c5ba9f9",
"name": "Signature match ?",
"func": "const Request = flow.get('Req_To_Test');\nflow.set('Req_To_Test', {});\nconst Signature_To_Test = Request.req.headers[\"twitch-eventsub-message-signature\"];\nconst Signature = \"sha256=\" + msg.payload;\n\nif(Signature_To_Test == Signature){\n return Request;\n}",
"outputs": 1,
@@ -1349,35 +2656,35 @@
"initialize": "",
"finalize": "",
"libs": [],
- "x": 450,
- "y": 940,
+ "x": 420,
+ "y": 1090,
"wires": [
[
- "b24de4d8c4c1bec5"
+ "a14899d1bdaee6ae"
]
]
},
{
- "id": "76b5440e882e8a03",
+ "id": "70fdfa29ec214ea2",
"type": "hmac",
- "z": "7c36e6b244586b90",
- "g": "92e1bc854f009fbe",
+ "z": "df207830040c7255",
+ "g": "da23423c6c5ba9f9",
"name": "",
"algorithm": "HmacSHA256",
"key": "NA",
- "x": 290,
- "y": 940,
+ "x": 260,
+ "y": 1090,
"wires": [
[
- "7080117654ae5e2c"
+ "9ae2fc3a337f9a0e"
]
]
},
{
- "id": "5970201814f50194",
+ "id": "189539cfa8fd4634",
"type": "function",
- "z": "7c36e6b244586b90",
- "g": "92e1bc854f009fbe",
+ "z": "df207830040c7255",
+ "g": "da23423c6c5ba9f9",
"name": "Signature verification",
"func": "const ID = msg.req.headers[\"twitch-eventsub-message-id\"];\nconst TS = msg.req.headers[\"twitch-eventsub-message-timestamp\"];\nconst Body = JSON.stringify(msg.req.body);\n\nmsg.secrectkey = flow.get('SubSecret');\nmsg.payload = ID + TS + Body;\n\nreturn msg;",
"outputs": 1,
@@ -1385,19 +2692,19 @@
"initialize": "",
"finalize": "",
"libs": [],
- "x": 340,
- "y": 900,
+ "x": 310,
+ "y": 1050,
"wires": [
[
- "76b5440e882e8a03"
+ "70fdfa29ec214ea2"
]
]
},
{
- "id": "cf0cc718151d358c",
+ "id": "0953d456cfdb4563",
"type": "function",
- "z": "7c36e6b244586b90",
- "g": "92e1bc854f009fbe",
+ "z": "df207830040c7255",
+ "g": "da23423c6c5ba9f9",
"name": "Save Request",
"func": "flow.set(\"Req_To_Test\", msg);\nreturn msg;",
"outputs": 1,
@@ -1405,1897 +2712,86 @@
"initialize": "",
"finalize": "",
"libs": [],
- "x": 320,
- "y": 860,
+ "x": 290,
+ "y": 1010,
"wires": [
[]
]
},
{
- "id": "8d7c21b59ca060cb",
- "type": "inject",
- "z": "7c36e6b244586b90",
- "g": "ebb10d640f7ac801",
- "name": "Settings",
- "props": [
- {
- "p": "payload"
- },
- {
- "p": "topic",
- "vt": "str"
- }
- ],
- "repeat": "",
- "crontab": "",
- "once": true,
- "onceDelay": 0.1,
- "topic": "",
- "payloadType": "date",
- "x": 160,
- "y": 110,
- "wires": [
- [
- "e83fe6a08adf5a78"
- ]
- ]
- },
- {
- "id": "e83fe6a08adf5a78",
- "type": "change",
- "z": "7c36e6b244586b90",
- "g": "ebb10d640f7ac801",
- "name": "API Settings",
- "rules": [
- {
- "t": "set",
- "p": "ClientID",
- "pt": "flow",
- "to": "YOUR CLIENT ID",
- "tot": "str"
- },
- {
- "t": "set",
- "p": "ClientSecret",
- "pt": "flow",
- "to": "YOUR CLIENT SECRET",
- "tot": "str"
- },
- {
- "t": "set",
- "p": "SubSecret",
- "pt": "flow",
- "to": "YOUR SUB SECRET",
- "tot": "str"
- },
- {
- "t": "set",
- "p": "Channel",
- "pt": "flow",
- "to": "ioodyme",
- "tot": "str"
- },
- {
- "t": "set",
- "p": "SubURI",
- "pt": "flow",
- "to": "SUB URI",
- "tot": "str"
- },
- {
- "t": "set",
- "p": "Scopes",
- "pt": "flow",
- "to": "bits:read channel:manage:broadcast channel:manage:polls channel:manage:predictions channel:manage:redemptions channel:read:polls channel:read:predictions channel:read:redemptions channel:read:subscriptions moderation:read user:read:follows user:read:subscriptions channel:moderate channel:read:hype_train",
- "tot": "str"
- }
- ],
- "action": "",
- "property": "",
- "from": "",
- "to": "",
- "reg": false,
- "x": 340,
- "y": 110,
- "wires": [
- [
- "5286830d2035ddb0",
- "6c9da833ab31fa4e"
- ]
- ]
- },
- {
- "id": "a8d2a2d533bd0343",
- "type": "inject",
- "z": "7c36e6b244586b90",
- "g": "ebb10d640f7ac801",
- "name": "Get channel ID",
- "props": [
- {
- "p": "payload"
- },
- {
- "p": "topic",
- "vt": "str"
- }
- ],
- "repeat": "",
- "crontab": "",
- "once": false,
- "onceDelay": 0.1,
- "topic": "",
- "payload": "",
- "payloadType": "date",
- "x": 180,
- "y": 340,
- "wires": [
- [
- "8fe60d5e257ad07c"
- ]
- ]
- },
- {
- "id": "8fe60d5e257ad07c",
- "type": "function",
- "z": "7c36e6b244586b90",
- "g": "ebb10d640f7ac801",
- "name": "Request channel ID",
- "func": "msg = {\n \"headers\" : {\n \"Client-ID\" : flow.get('ClientID'),\n \"Authorization\" : flow.get('AppToken'),\n \"Accept\" : \"application/vnd.twitchtv.v5+json\"\n },\n \"url\": 'https://api.twitch.tv/helix/search/channels?query=\"' + flow.get(\"Channel\") + '\"'\n}\nreturn msg;",
- "outputs": 1,
- "noerr": 0,
- "initialize": "",
- "finalize": "",
- "libs": [],
- "x": 360,
- "y": 340,
- "wires": [
- [
- "184e1f350ac5f70c"
- ]
- ]
- },
- {
- "id": "184e1f350ac5f70c",
- "type": "http request",
- "z": "7c36e6b244586b90",
- "g": "ebb10d640f7ac801",
+ "id": "94f06a5db5091ecc",
+ "type": "switch",
+ "z": "df207830040c7255",
+ "g": "da23423c6c5ba9f9",
"name": "Channel ID",
- "method": "GET",
- "ret": "obj",
- "paytoqs": "ignore",
- "url": "",
- "tls": "",
- "persist": false,
- "proxy": "",
- "authType": "",
- "x": 560,
- "y": 340,
- "wires": [
- [
- "b0f5b34fc4ee73c2",
- "1d463669496fe001"
- ]
- ]
- },
- {
- "id": "b0f5b34fc4ee73c2",
- "type": "change",
- "z": "7c36e6b244586b90",
- "g": "ebb10d640f7ac801",
- "name": "",
+ "property": "payload.event.broadcaster_user_id",
+ "propertyType": "msg",
"rules": [
{
- "t": "set",
- "p": "ChannelID",
- "pt": "flow",
- "to": "msg.payload.data[0].id",
- "tot": "msg"
- }
- ],
- "action": "",
- "property": "",
- "from": "",
- "to": "",
- "reg": false,
- "x": 750,
- "y": 340,
- "wires": [
- []
- ]
- },
- {
- "id": "8ec8884435ea23c1",
- "type": "http in",
- "z": "7c36e6b244586b90",
- "g": "ebb10d640f7ac801",
- "name": "",
- "url": "/apptoken",
- "method": "get",
- "upload": false,
- "swaggerDoc": "",
- "x": 160,
- "y": 160,
- "wires": [
- [
- "6a3ebc5d2b927cea",
- "f6d9a2ce342ba743"
- ]
- ]
- },
- {
- "id": "6a3ebc5d2b927cea",
- "type": "function",
- "z": "7c36e6b244586b90",
- "g": "ebb10d640f7ac801",
- "name": "Request APP Token",
- "func": "msg = {};\nmsg.url = \"https://id.twitch.tv/oauth2/token\";\nmsg.url += \"?client_id=\" + flow.get('ClientID');\nmsg.url += \"&client_secret=\" + flow.get('ClientSecret');\nmsg.url += \"&grant_type=client_credentials\";\nmsg.url += \"&scope=\" + flow.get('Scopes');\nreturn msg;",
- "outputs": 1,
- "noerr": 0,
- "initialize": "",
- "finalize": "",
- "libs": [],
- "x": 370,
- "y": 160,
- "wires": [
- [
- "d24a87b460302d14"
- ]
- ]
- },
- {
- "id": "d24a87b460302d14",
- "type": "http request",
- "z": "7c36e6b244586b90",
- "g": "ebb10d640f7ac801",
- "name": "",
- "method": "POST",
- "ret": "obj",
- "paytoqs": "ignore",
- "url": "",
- "tls": "",
- "persist": false,
- "proxy": "",
- "authType": "",
- "x": 560,
- "y": 160,
- "wires": [
- [
- "77d45f6f763b298b"
- ]
- ]
- },
- {
- "id": "77d45f6f763b298b",
- "type": "function",
- "z": "7c36e6b244586b90",
- "g": "ebb10d640f7ac801",
- "name": "Save Bearer",
- "func": "const Token = \"Bearer \" + msg.payload[\"access_token\"];\nflow.set('AppToken', Token);\nreturn;",
- "outputs": 1,
- "noerr": 0,
- "initialize": "",
- "finalize": "",
- "libs": [],
- "x": 730,
- "y": 160,
- "wires": [
- []
- ]
- },
- {
- "id": "f6d9a2ce342ba743",
- "type": "function",
- "z": "7c36e6b244586b90",
- "g": "ebb10d640f7ac801",
- "name": "Subscription",
- "func": "msg.payload = \"APP Token generated\";\nmsg.statusCode = 200;\nreturn msg;",
- "outputs": 1,
- "noerr": 0,
- "initialize": "",
- "finalize": "",
- "libs": [],
- "x": 340,
- "y": 200,
- "wires": [
- [
- "47fd8e30637509da"
- ]
- ]
- },
- {
- "id": "47fd8e30637509da",
- "type": "http response",
- "z": "7c36e6b244586b90",
- "g": "ebb10d640f7ac801",
- "name": "Response",
- "statusCode": "",
- "headers": {},
- "x": 550,
- "y": 200,
- "wires": []
- },
- {
- "id": "7879e1af17029fe2",
- "type": "http in",
- "z": "7c36e6b244586b90",
- "g": "ebb10d640f7ac801",
- "name": "",
- "url": "/usertoken",
- "method": "get",
- "upload": false,
- "swaggerDoc": "",
- "x": 160,
- "y": 260,
- "wires": [
- [
- "fae1084e76c22048",
- "8c13b7d40a7b719e"
- ]
- ]
- },
- {
- "id": "8c13b7d40a7b719e",
- "type": "function",
- "z": "7c36e6b244586b90",
- "g": "ebb10d640f7ac801",
- "name": "Request USER Token",
- "func": "const code = msg.payload.code;\nmsg = {};\nmsg.url = \"https://id.twitch.tv/oauth2/token?\";\nmsg.url += \"client_id=\" + flow.get('ClientID');\nmsg.url += \"&client_secret=\" + flow.get('ClientSecret');\nmsg.url += \"&code=\" + code;\nmsg.url += \"&grant_type=authorization_code\";\nmsg.url += \"&redirect_uri=https://\" + flow.get('SubURI') + \"/debug\";\nreturn msg;",
- "outputs": 1,
- "noerr": 0,
- "initialize": "",
- "finalize": "",
- "libs": [],
- "x": 370,
- "y": 260,
- "wires": [
- [
- "6ea6b91f73c37542"
- ]
- ]
- },
- {
- "id": "6ea6b91f73c37542",
- "type": "http request",
- "z": "7c36e6b244586b90",
- "g": "ebb10d640f7ac801",
- "name": "",
- "method": "POST",
- "ret": "obj",
- "paytoqs": "ignore",
- "url": "",
- "tls": "",
- "persist": false,
- "proxy": "",
- "authType": "",
- "x": 560,
- "y": 260,
- "wires": [
- [
- "832db0cc8c788581"
- ]
- ]
- },
- {
- "id": "832db0cc8c788581",
- "type": "function",
- "z": "7c36e6b244586b90",
- "g": "ebb10d640f7ac801",
- "name": "Save Bearer",
- "func": "const Token = \"Bearer \" + msg.payload[\"access_token\"];\nflow.set('UserToken', Token);\nreturn msg;",
- "outputs": 1,
- "noerr": 0,
- "initialize": "",
- "finalize": "",
- "libs": [],
- "x": 730,
- "y": 260,
- "wires": [
- []
- ]
- },
- {
- "id": "fae1084e76c22048",
- "type": "function",
- "z": "7c36e6b244586b90",
- "g": "ebb10d640f7ac801",
- "name": "Subscription",
- "func": "msg.payload = \"User token generated\";\nmsg.statusCode = 200;\nreturn msg",
- "outputs": 1,
- "noerr": 0,
- "initialize": "",
- "finalize": "",
- "libs": [],
- "x": 340,
- "y": 300,
- "wires": [
- [
- "4fa722aac4d95d35"
- ]
- ]
- },
- {
- "id": "4fa722aac4d95d35",
- "type": "http response",
- "z": "7c36e6b244586b90",
- "g": "ebb10d640f7ac801",
- "name": "Response",
- "statusCode": "",
- "headers": {},
- "x": 550,
- "y": 300,
- "wires": []
- },
- {
- "id": "cccfb16c105ce92e",
- "type": "ui_template",
- "z": "7c36e6b244586b90",
- "g": "ebb10d640f7ac801",
- "group": "4a602848e19e8b65",
- "name": "Authorize App",
- "order": 1,
- "width": 3,
- "height": 1,
- "format": "",
- "storeOutMessages": true,
- "fwdInMessages": true,
- "resendOnRefresh": true,
- "templateScope": "local",
- "x": 550,
- "y": 120,
- "wires": [
- []
- ]
- },
- {
- "id": "317349278d3e55eb",
- "type": "ui_template",
- "z": "7c36e6b244586b90",
- "g": "ebb10d640f7ac801",
- "group": "4a602848e19e8b65",
- "name": "Authorize User",
- "order": 2,
- "width": 3,
- "height": 1,
- "format": "",
- "storeOutMessages": true,
- "fwdInMessages": true,
- "resendOnRefresh": true,
- "templateScope": "local",
- "x": 740,
- "y": 120,
- "wires": [
- []
- ]
- },
- {
- "id": "1d463669496fe001",
- "type": "debug",
- "z": "7c36e6b244586b90",
- "g": "ebb10d640f7ac801",
- "name": "",
- "active": true,
- "tosidebar": true,
- "console": false,
- "tostatus": false,
- "complete": "false",
- "statusVal": "",
- "statusType": "auto",
- "x": 730,
- "y": 300,
- "wires": []
- },
- {
- "id": "7f2d06ccf6b875f0",
- "type": "inject",
- "z": "7c36e6b244586b90",
- "g": "ebb10d640f7ac801",
- "name": "Validate",
- "props": [
- {
- "p": "payload"
+ "t": "eq",
+ "v": "ChannelID",
+ "vt": "flow"
},
{
- "p": "topic",
- "vt": "str"
+ "t": "else"
}
],
- "repeat": "",
- "crontab": "",
- "once": false,
- "onceDelay": 0.1,
- "topic": "",
- "payloadType": "date",
- "x": 150,
- "y": 380,
+ "checkall": "false",
+ "repair": false,
+ "outputs": 2,
+ "x": 1060,
+ "y": 1080,
"wires": [
[
- "9f2b3a3a73712b8e"
- ]
+ "496beddfeba0baee"
+ ],
+ []
]
},
{
- "id": "9f2b3a3a73712b8e",
- "type": "function",
- "z": "7c36e6b244586b90",
- "g": "ebb10d640f7ac801",
- "name": "Validate User Token",
- "func": "msg = {\n \"headers\" : {\n \"Client-ID\": flow.get('AppID'),\n \"Authorization\": flow.get('UserToken'),\n \"Accept\" : \"application/vnd.twitchtv.v5+json\"\n },\n \"url\": \"https://id.twitch.tv/oauth2/validate\"\n}\nreturn msg;",
- "outputs": 1,
- "noerr": 0,
- "initialize": "",
- "finalize": "",
- "libs": [],
- "x": 370,
- "y": 380,
- "wires": [
- [
- "d45d1bed0a44069b"
- ]
- ]
- },
- {
- "id": "d45d1bed0a44069b",
- "type": "http request",
- "z": "7c36e6b244586b90",
- "g": "ebb10d640f7ac801",
- "name": "Request",
- "method": "GET",
- "ret": "obj",
- "paytoqs": "ignore",
- "url": "",
- "tls": "",
- "persist": false,
- "proxy": "",
- "authType": "",
- "x": 550,
- "y": 380,
- "wires": [
- [
- "9ccd95da63d631ba"
- ]
- ]
- },
- {
- "id": "9ccd95da63d631ba",
- "type": "debug",
- "z": "7c36e6b244586b90",
- "g": "ebb10d640f7ac801",
- "name": "",
- "active": true,
- "tosidebar": true,
- "console": false,
- "tostatus": false,
- "complete": "false",
- "statusVal": "",
- "statusType": "auto",
- "x": 730,
- "y": 380,
- "wires": []
- },
- {
- "id": "5286830d2035ddb0",
- "type": "template",
- "z": "7c36e6b244586b90",
- "g": "ebb10d640f7ac801",
- "name": "Authorize App",
- "field": "template",
- "fieldType": "msg",
- "format": "handlebars",
- "syntax": "mustache",
- "template": "\n\n\n\n \n \n \n\n\n",
- "output": "str",
- "x": 550,
- "y": 80,
- "wires": [
- [
- "cccfb16c105ce92e"
- ]
- ]
- },
- {
- "id": "6c9da833ab31fa4e",
- "type": "template",
- "z": "7c36e6b244586b90",
- "g": "ebb10d640f7ac801",
- "name": "Authorize User",
- "field": "template",
- "fieldType": "msg",
- "format": "handlebars",
- "syntax": "mustache",
- "template": "\n\n\n\n \n \n \n\n\n",
- "output": "str",
- "x": 740,
- "y": 80,
- "wires": [
- [
- "317349278d3e55eb"
- ]
- ]
- },
- {
- "id": "d15b88885243d289",
- "type": "debug",
- "z": "7c36e6b244586b90",
- "g": "ebb10d640f7ac801",
- "name": "",
- "active": true,
- "tosidebar": true,
- "console": false,
- "tostatus": false,
- "complete": "false",
- "statusVal": "",
- "statusType": "auto",
- "x": 740,
- "y": 220,
- "wires": []
- },
- {
- "id": "6c1201d518e72827",
- "type": "inject",
- "z": "7c36e6b244586b90",
- "g": "ebb10d640f7ac801",
- "name": "Validate",
- "props": [
+ "id": "f4803e78add4ee2f",
+ "type": "switch",
+ "z": "df207830040c7255",
+ "g": "da23423c6c5ba9f9",
+ "name": "To Channel ID",
+ "property": "payload.event.to_broadcaster_user_id",
+ "propertyType": "msg",
+ "rules": [
{
- "p": "payload"
+ "t": "eq",
+ "v": "ChannelID",
+ "vt": "flow"
},
{
- "p": "topic",
- "vt": "str"
+ "t": "else"
}
],
- "repeat": "",
- "crontab": "",
- "once": false,
- "onceDelay": 0.1,
- "topic": "",
- "payloadType": "date",
- "x": 150,
- "y": 420,
- "wires": [
- [
- "155d67dffab25869"
- ]
- ]
- },
- {
- "id": "155d67dffab25869",
- "type": "function",
- "z": "7c36e6b244586b90",
- "g": "ebb10d640f7ac801",
- "name": "Validate App Token",
- "func": "msg = {\n \"headers\" : {\n \"Client-ID\": flow.get('AppID'),\n \"Authorization\": flow.get('AppToken'),\n \"Accept\" : \"application/vnd.twitchtv.v5+json\"\n },\n \"url\": \"https://id.twitch.tv/oauth2/validate\"\n}\nreturn msg;",
- "outputs": 1,
- "noerr": 0,
- "initialize": "",
- "finalize": "",
- "libs": [],
- "x": 360,
- "y": 420,
- "wires": [
- [
- "486bb864c93facee"
- ]
- ]
- },
- {
- "id": "486bb864c93facee",
- "type": "http request",
- "z": "7c36e6b244586b90",
- "g": "ebb10d640f7ac801",
- "name": "Request",
- "method": "GET",
- "ret": "obj",
- "paytoqs": "ignore",
- "url": "",
- "tls": "",
- "persist": false,
- "proxy": "",
- "authType": "",
- "x": 550,
- "y": 420,
- "wires": [
- [
- "9ccd95da63d631ba"
- ]
- ]
- },
- {
- "id": "7098c94cefad6f46",
- "type": "function",
- "z": "f9eff8535747992a",
- "name": "Channel Update",
- "func": "const broadcaster = msg.payload.event.broadcaster_user_name;\nconst title = msg.payload.event.title;\nconst category = msg.payload.event.category_name;\n\nreturn [{payload: broadcaster}, {payload : title}, {payload : category}];",
- "outputs": 3,
- "noerr": 0,
- "initialize": "",
- "finalize": "",
- "libs": [],
- "x": 1110,
- "y": 60,
- "wires": [
- [
- "d8d1f2dfc5c946e8"
- ],
- [
- "d8d1f2dfc5c946e8"
- ],
- [
- "d8d1f2dfc5c946e8"
- ]
- ],
- "outputLabels": [
- "Broadcaster",
- "Title",
- "Category"
- ]
- },
- {
- "id": "3c5392d536a6758c",
- "type": "link in",
- "z": "f9eff8535747992a",
- "name": "Channel Update",
- "links": [
- "d1c64ebc8a5feec9"
- ],
- "x": 985,
- "y": 60,
- "wires": [
- [
- "7098c94cefad6f46"
- ]
- ]
- },
- {
- "id": "d8d1f2dfc5c946e8",
- "type": "debug",
- "z": "f9eff8535747992a",
- "name": "",
- "active": true,
- "tosidebar": true,
- "console": false,
- "tostatus": false,
- "complete": "false",
- "statusVal": "",
- "statusType": "auto",
- "x": 1290,
- "y": 60,
- "wires": []
- },
- {
- "id": "e3fdefc8024d75a1",
- "type": "link in",
- "z": "f9eff8535747992a",
- "name": "Channel Update",
- "links": [
- "099c35a256887f74"
- ],
- "x": 985,
- "y": 110,
- "wires": [
- [
- "781d8b6ea144560b"
- ]
- ]
- },
- {
- "id": "781d8b6ea144560b",
- "type": "function",
- "z": "f9eff8535747992a",
- "name": "Follower",
- "func": "const username = msg.payload.event.user_name;\n\nreturn [{payload : username}];",
- "outputs": 1,
- "noerr": 0,
- "initialize": "",
- "finalize": "",
- "libs": [],
- "x": 1090,
- "y": 110,
- "wires": [
- [
- "508c9bdbf9f32cf2"
- ]
- ],
- "outputLabels": [
- "Follower Username"
- ]
- },
- {
- "id": "508c9bdbf9f32cf2",
- "type": "debug",
- "z": "f9eff8535747992a",
- "name": "",
- "active": true,
- "tosidebar": true,
- "console": false,
- "tostatus": false,
- "complete": "false",
- "statusVal": "",
- "statusType": "auto",
- "x": 1290,
- "y": 110,
- "wires": []
- },
- {
- "id": "46a3a69959ede421",
- "type": "link in",
- "z": "f9eff8535747992a",
- "name": "Channel Update",
- "links": [
- "35d2b6f068729230"
- ],
- "x": 985,
- "y": 150,
- "wires": [
- [
- "0706fa919a2b66b7"
- ]
- ]
- },
- {
- "id": "0706fa919a2b66b7",
- "type": "function",
- "z": "f9eff8535747992a",
- "name": "Subscriber",
- "func": "const username = msg.payload.event.user_name;\nconst tier = parseInt(msg.payload.event.tier)/1000;\n\nreturn [{payload : username}, {payload : tier}];\n",
+ "checkall": "false",
+ "repair": false,
"outputs": 2,
- "noerr": 0,
- "initialize": "",
- "finalize": "",
- "libs": [],
- "x": 1100,
- "y": 150,
+ "x": 1070,
+ "y": 1120,
"wires": [
[
- "13aa39ce93155d90"
+ "496beddfeba0baee"
],
- [
- "13aa39ce93155d90"
- ]
- ],
- "outputLabels": [
- "Subscriber Username",
- "Tier"
+ []
]
},
- {
- "id": "13aa39ce93155d90",
- "type": "debug",
- "z": "f9eff8535747992a",
- "name": "",
- "active": true,
- "tosidebar": true,
- "console": false,
- "tostatus": false,
- "complete": "false",
- "statusVal": "",
- "statusType": "auto",
- "x": 1290,
- "y": 150,
- "wires": []
- },
- {
- "id": "22b9bd03717a6092",
- "type": "function",
- "z": "f9eff8535747992a",
- "name": "SubGift",
- "func": "const username = msg.payload.event.user_name;\nconst tier = parseInt(msg.payload.event.tier)/1000;\n\nreturn [{payload : username}, {payload : tier}];\n",
- "outputs": 2,
- "noerr": 0,
- "initialize": "",
- "finalize": "",
- "libs": [],
- "x": 1090,
- "y": 190,
- "wires": [
- [
- "c9bd7b1cdbdaca88"
- ],
- [
- "c9bd7b1cdbdaca88"
- ]
- ],
- "outputLabels": [
- "Subscriber Username",
- "Tier"
- ]
- },
- {
- "id": "bc942504e9d6822a",
- "type": "link in",
- "z": "f9eff8535747992a",
- "name": "Channel Update",
- "links": [
- "66db194703a62045"
- ],
- "x": 985,
- "y": 190,
- "wires": [
- [
- "22b9bd03717a6092"
- ]
- ]
- },
- {
- "id": "c9bd7b1cdbdaca88",
- "type": "debug",
- "z": "f9eff8535747992a",
- "name": "",
- "active": true,
- "tosidebar": true,
- "console": false,
- "tostatus": false,
- "complete": "false",
- "statusVal": "",
- "statusType": "auto",
- "x": 1290,
- "y": 190,
- "wires": []
- },
- {
- "id": "2e12e6b6e53b0967",
- "type": "function",
- "z": "f9eff8535747992a",
- "name": "Sub Mesage",
- "func": "const username = msg.payload.event.user_name;\nconst tier = parseInt(msg.payload.event.tier)/1000;\nconst message = msg.payload.event.message.text;\n\nreturn [{payload : username}, {payload : tier}, {payload : message}];",
- "outputs": 3,
- "noerr": 0,
- "initialize": "",
- "finalize": "",
- "libs": [],
- "x": 1100,
- "y": 240,
- "wires": [
- [
- "c4cd0c41321ef3bd"
- ],
- [
- "c4cd0c41321ef3bd"
- ],
- [
- "c4cd0c41321ef3bd"
- ]
- ],
- "outputLabels": [
- "Subscriber Username",
- "Tier",
- "Message"
- ]
- },
- {
- "id": "f436b7331bd9609b",
- "type": "link in",
- "z": "f9eff8535747992a",
- "name": "Channel Update",
- "links": [
- "7008cac6ebd21511"
- ],
- "x": 985,
- "y": 240,
- "wires": [
- [
- "2e12e6b6e53b0967"
- ]
- ]
- },
- {
- "id": "c4cd0c41321ef3bd",
- "type": "debug",
- "z": "f9eff8535747992a",
- "name": "",
- "active": true,
- "tosidebar": true,
- "console": false,
- "tostatus": false,
- "complete": "false",
- "statusVal": "",
- "statusType": "auto",
- "x": 1290,
- "y": 240,
- "wires": []
- },
- {
- "id": "4c49467a35df9851",
- "type": "function",
- "z": "f9eff8535747992a",
- "name": "Bits",
- "func": "const username = msg.payload.event.user_name;\nconst bits = msg.payload.event.bits;\nconst message = msg.payload.event.message;\n\nreturn [{payload : username}, {payload : bits}, {payload : message}];",
- "outputs": 3,
- "noerr": 0,
- "initialize": "",
- "finalize": "",
- "libs": [],
- "x": 1080,
- "y": 300,
- "wires": [
- [
- "ca9267f59495a61e"
- ],
- [
- "ca9267f59495a61e"
- ],
- [
- "ca9267f59495a61e"
- ]
- ],
- "outputLabels": [
- "Username",
- "Bits",
- "Message"
- ]
- },
- {
- "id": "674ee05d36a01381",
- "type": "link in",
- "z": "f9eff8535747992a",
- "name": "Channel Update",
- "links": [
- "e1ed82cfe4ac1c7b"
- ],
- "x": 985,
- "y": 300,
- "wires": [
- [
- "4c49467a35df9851"
- ]
- ]
- },
- {
- "id": "ca9267f59495a61e",
- "type": "debug",
- "z": "f9eff8535747992a",
- "name": "",
- "active": true,
- "tosidebar": true,
- "console": false,
- "tostatus": false,
- "complete": "false",
- "statusVal": "",
- "statusType": "auto",
- "x": 1290,
- "y": 300,
- "wires": []
- },
- {
- "id": "c282f7bbe2ea94a6",
- "type": "function",
- "z": "f9eff8535747992a",
- "name": "Raid",
- "func": "const username = msg.payload.event.from_broadcaster_user_name;\nconst viewers = msg.payload.event.viewers;\n\nreturn[{payload : username}, {payload : viewers}];",
- "outputs": 2,
- "noerr": 0,
- "initialize": "",
- "finalize": "",
- "libs": [],
- "x": 1080,
- "y": 350,
- "wires": [
- [
- "0e8b1da7d78d9e04"
- ],
- [
- "0e8b1da7d78d9e04"
- ]
- ],
- "outputLabels": [
- "Broadcaster Username",
- "Viewers"
- ]
- },
- {
- "id": "6c6457495d5b73d4",
- "type": "link in",
- "z": "f9eff8535747992a",
- "name": "Channel Update",
- "links": [
- "8e64834c2e4ab9c6"
- ],
- "x": 985,
- "y": 350,
- "wires": [
- [
- "c282f7bbe2ea94a6"
- ]
- ]
- },
- {
- "id": "0e8b1da7d78d9e04",
- "type": "debug",
- "z": "f9eff8535747992a",
- "name": "",
- "active": true,
- "tosidebar": true,
- "console": false,
- "tostatus": false,
- "complete": "false",
- "statusVal": "",
- "statusType": "auto",
- "x": 1290,
- "y": 350,
- "wires": []
- },
- {
- "id": "216bb963f207e682",
- "type": "function",
- "z": "f9eff8535747992a",
- "name": "Ban",
- "func": "const username = msg.payload.event.user_name;\nconst moderator = msg.payload.event.moderator_user_name;\nconst reason = msg.payload.event.reason;\nconst end = msg.payload.event.ends_at;\nconst permanent = msg.payload.event.is_permanent;\n\nreturn [{payload : username},{payload : moderator},{payload : reason}, {payload : end},{payload : permanent}];",
- "outputs": 5,
- "noerr": 0,
- "initialize": "",
- "finalize": "",
- "libs": [],
- "x": 1080,
- "y": 410,
- "wires": [
- [
- "d1e21ddc83cc908f"
- ],
- [
- "d1e21ddc83cc908f"
- ],
- [
- "d1e21ddc83cc908f"
- ],
- [
- "d1e21ddc83cc908f"
- ],
- [
- "d1e21ddc83cc908f"
- ]
- ],
- "outputLabels": [
- "Banned User",
- "Moderator",
- "Reason",
- "End date",
- "Permanent"
- ]
- },
- {
- "id": "46a44352c8d66e56",
- "type": "link in",
- "z": "f9eff8535747992a",
- "name": "Channel Update",
- "links": [
- "3e4196fcfe60dd91"
- ],
- "x": 985,
- "y": 410,
- "wires": [
- [
- "216bb963f207e682"
- ]
- ]
- },
- {
- "id": "d1e21ddc83cc908f",
- "type": "debug",
- "z": "f9eff8535747992a",
- "name": "",
- "active": true,
- "tosidebar": true,
- "console": false,
- "tostatus": false,
- "complete": "false",
- "statusVal": "",
- "statusType": "auto",
- "x": 1290,
- "y": 410,
- "wires": []
- },
- {
- "id": "b7796720760df4ca",
- "type": "function",
- "z": "f9eff8535747992a",
- "name": "Unban",
- "func": "const username = msg.payload.event.user_name;\nconst moderator = msg.payload.event.moderator_user_name;\n\nreturn [{payload : username}, {payload : moderator}];",
- "outputs": 2,
- "noerr": 0,
- "initialize": "",
- "finalize": "",
- "libs": [],
- "x": 1080,
- "y": 470,
- "wires": [
- [
- "2a80b4bcb77e25b1"
- ],
- [
- "2a80b4bcb77e25b1"
- ]
- ],
- "outputLabels": [
- "Banned User",
- "Moderator"
- ]
- },
- {
- "id": "e7138cd2dc73b8c0",
- "type": "link in",
- "z": "f9eff8535747992a",
- "name": "Channel Update",
- "links": [
- "ec063c27cbdff5bc"
- ],
- "x": 985,
- "y": 470,
- "wires": [
- [
- "b7796720760df4ca"
- ]
- ]
- },
- {
- "id": "2a80b4bcb77e25b1",
- "type": "debug",
- "z": "f9eff8535747992a",
- "name": "",
- "active": true,
- "tosidebar": true,
- "console": false,
- "tostatus": false,
- "complete": "false",
- "statusVal": "",
- "statusType": "auto",
- "x": 1290,
- "y": 470,
- "wires": []
- },
- {
- "id": "3ee0a398d56ce81b",
- "type": "function",
- "z": "f9eff8535747992a",
- "name": "Channel Point",
- "func": "const username = msg.payload.event.user_name;\nconst message = msg.payload.event.user_input;\nconst title = msg.payload.event.reward.title;\nconst prompt = msg.payload.event.reward.prompt;\nconst cost = msg.payload.event.reward.cost;\n\nreturn [{payload : username}, {payload : message}, {payload : title}, {payload : prompt}, {payload : cost}];",
- "outputs": 5,
- "noerr": 0,
- "initialize": "",
- "finalize": "",
- "libs": [],
- "x": 1110,
- "y": 530,
- "wires": [
- [
- "bb15db95da85594b"
- ],
- [
- "bb15db95da85594b"
- ],
- [
- "bb15db95da85594b"
- ],
- [
- "bb15db95da85594b"
- ],
- [
- "bb15db95da85594b"
- ]
- ],
- "outputLabels": [
- "Username",
- "Message",
- "Title",
- "Prompt",
- "Cost"
- ]
- },
- {
- "id": "2720e13c28d5f2a6",
- "type": "link in",
- "z": "f9eff8535747992a",
- "name": "Channel Update",
- "links": [
- "b97c23ba88296b1b"
- ],
- "x": 985,
- "y": 530,
- "wires": [
- [
- "3ee0a398d56ce81b"
- ]
- ]
- },
- {
- "id": "bb15db95da85594b",
- "type": "debug",
- "z": "f9eff8535747992a",
- "name": "",
- "active": true,
- "tosidebar": true,
- "console": false,
- "tostatus": false,
- "complete": "false",
- "statusVal": "",
- "statusType": "auto",
- "x": 1290,
- "y": 530,
- "wires": []
- },
- {
- "id": "f23b95398eaa0fb5",
- "type": "function",
- "z": "f9eff8535747992a",
- "name": "Poll Begin",
- "func": "const title = msg.payload.event.title;\nconst choices = msg.payload.event.choices;\nconst end = msg.payload.event.ends_at;\n\nreturn [{payload : title}, {payload : choices}, {payload : end}];",
- "outputs": 3,
- "noerr": 0,
- "initialize": "",
- "finalize": "",
- "libs": [],
- "x": 1090,
- "y": 600,
- "wires": [
- [
- "0a6403e990465b45"
- ],
- [
- "0a6403e990465b45"
- ],
- [
- "0a6403e990465b45"
- ]
- ],
- "outputLabels": [
- "Title",
- "Choices",
- "End"
- ]
- },
- {
- "id": "c977fc48940eaa1f",
- "type": "link in",
- "z": "f9eff8535747992a",
- "name": "Channel Update",
- "links": [
- "f71de6f3f45ab546"
- ],
- "x": 985,
- "y": 600,
- "wires": [
- [
- "f23b95398eaa0fb5"
- ]
- ]
- },
- {
- "id": "0a6403e990465b45",
- "type": "debug",
- "z": "f9eff8535747992a",
- "name": "",
- "active": true,
- "tosidebar": true,
- "console": false,
- "tostatus": false,
- "complete": "false",
- "statusVal": "",
- "statusType": "auto",
- "x": 1290,
- "y": 600,
- "wires": []
- },
- {
- "id": "e66321b5eebb9e62",
- "type": "function",
- "z": "f9eff8535747992a",
- "name": "Poll Progress",
- "func": "const title = msg.payload.event.title;\nconst choices = msg.payload.event.choices;\nconst end = msg.payload.event.ends_at;\n\nreturn [{payload : title}, {payload : choices}, {payload : end}];",
- "outputs": 3,
- "noerr": 0,
- "initialize": "",
- "finalize": "",
- "libs": [],
- "x": 1100,
- "y": 650,
- "wires": [
- [
- "82982a94bf2f96e5"
- ],
- [
- "82982a94bf2f96e5"
- ],
- [
- "82982a94bf2f96e5"
- ]
- ],
- "outputLabels": [
- "Title",
- "Choices",
- "End"
- ]
- },
- {
- "id": "013eac261f7f830a",
- "type": "link in",
- "z": "f9eff8535747992a",
- "name": "Channel Update",
- "links": [
- "52f26835eeca107c"
- ],
- "x": 985,
- "y": 650,
- "wires": [
- [
- "e66321b5eebb9e62"
- ]
- ]
- },
- {
- "id": "82982a94bf2f96e5",
- "type": "debug",
- "z": "f9eff8535747992a",
- "name": "",
- "active": true,
- "tosidebar": true,
- "console": false,
- "tostatus": false,
- "complete": "false",
- "statusVal": "",
- "statusType": "auto",
- "x": 1290,
- "y": 650,
- "wires": []
- },
- {
- "id": "7822bd853ff32202",
- "type": "function",
- "z": "f9eff8535747992a",
- "name": "Poll End",
- "func": "const title = msg.payload.event.title;\nconst choices = msg.payload.event.choices;\n\nreturn [{payload : title}, {payload : choices}];",
- "outputs": 2,
- "noerr": 0,
- "initialize": "",
- "finalize": "",
- "libs": [],
- "x": 1090,
- "y": 700,
- "wires": [
- [
- "e3a2b757bc7b4f00"
- ],
- [
- "e3a2b757bc7b4f00"
- ]
- ],
- "outputLabels": [
- "Title",
- "Choices"
- ]
- },
- {
- "id": "440ca17ff1420dfe",
- "type": "link in",
- "z": "f9eff8535747992a",
- "name": "Channel Update",
- "links": [
- "90d9f9f778dfea84"
- ],
- "x": 985,
- "y": 700,
- "wires": [
- [
- "7822bd853ff32202"
- ]
- ]
- },
- {
- "id": "e3a2b757bc7b4f00",
- "type": "debug",
- "z": "f9eff8535747992a",
- "name": "",
- "active": true,
- "tosidebar": true,
- "console": false,
- "tostatus": false,
- "complete": "false",
- "statusVal": "",
- "statusType": "auto",
- "x": 1290,
- "y": 700,
- "wires": []
- },
- {
- "id": "bf777e01107c8dad",
- "type": "function",
- "z": "f9eff8535747992a",
- "name": "Prediction Begin",
- "func": "const title = msg.payload.event.title;\nconst outcomes = msg.payload.event.outcomes;\nconst end = msg.payload.event.locks_at;\n\nreturn [{payload : title}, {payload : outcomes}, {payload : end}];",
- "outputs": 3,
- "noerr": 0,
- "initialize": "",
- "finalize": "",
- "libs": [],
- "x": 1110,
- "y": 750,
- "wires": [
- [
- "cf8eb778297937fe"
- ],
- [
- "cf8eb778297937fe"
- ],
- [
- "cf8eb778297937fe"
- ]
- ],
- "outputLabels": [
- "Title",
- "Outcomes",
- "End"
- ]
- },
- {
- "id": "02eff79de54243df",
- "type": "link in",
- "z": "f9eff8535747992a",
- "name": "Channel Update",
- "links": [
- "956b7e15e56e3e6e"
- ],
- "x": 985,
- "y": 750,
- "wires": [
- [
- "bf777e01107c8dad"
- ]
- ]
- },
- {
- "id": "cf8eb778297937fe",
- "type": "debug",
- "z": "f9eff8535747992a",
- "name": "",
- "active": true,
- "tosidebar": true,
- "console": false,
- "tostatus": false,
- "complete": "false",
- "statusVal": "",
- "statusType": "auto",
- "x": 1290,
- "y": 760,
- "wires": []
- },
- {
- "id": "31b7edc241da122b",
- "type": "function",
- "z": "f9eff8535747992a",
- "name": "Prediction Progress",
- "func": "const title = msg.payload.event.title;\nconst outcomes = msg.payload.event.outcomes;\nconst end = msg.payload.event.locks_at;\n\nreturn [{payload : title}, {payload : outcomes}, {payload : end}];",
- "outputs": 3,
- "noerr": 0,
- "initialize": "",
- "finalize": "",
- "libs": [],
- "x": 1120,
- "y": 810,
- "wires": [
- [
- "d3ae76bd5a99fe61"
- ],
- [
- "d3ae76bd5a99fe61"
- ],
- [
- "d3ae76bd5a99fe61"
- ]
- ],
- "outputLabels": [
- "Title",
- "Outcomes",
- "End"
- ]
- },
- {
- "id": "58059205d3b59963",
- "type": "link in",
- "z": "f9eff8535747992a",
- "name": "Channel Update",
- "links": [
- "03c5d3303b39046e"
- ],
- "x": 985,
- "y": 810,
- "wires": [
- [
- "31b7edc241da122b"
- ]
- ]
- },
- {
- "id": "d3ae76bd5a99fe61",
- "type": "debug",
- "z": "f9eff8535747992a",
- "name": "",
- "active": true,
- "tosidebar": true,
- "console": false,
- "tostatus": false,
- "complete": "false",
- "statusVal": "",
- "statusType": "auto",
- "x": 1300,
- "y": 810,
- "wires": []
- },
- {
- "id": "4ce638dd76c24bdb",
- "type": "function",
- "z": "f9eff8535747992a",
- "name": "Prediction End",
- "func": "const title = msg.payload.event.title;\nconst outcomes = msg.payload.event.outcomes;\n\nreturn [{payload : title}, {payload : outcomes}];",
- "outputs": 2,
- "noerr": 0,
- "initialize": "",
- "finalize": "",
- "libs": [],
- "x": 1110,
- "y": 860,
- "wires": [
- [
- "9438739a0d42032a"
- ],
- [
- "9438739a0d42032a"
- ]
- ],
- "outputLabels": [
- "Title",
- "Outcomes"
- ]
- },
- {
- "id": "d8842a92a68f0e27",
- "type": "link in",
- "z": "f9eff8535747992a",
- "name": "Channel Update",
- "links": [
- "8b358c8a79eba44f"
- ],
- "x": 985,
- "y": 860,
- "wires": [
- [
- "4ce638dd76c24bdb"
- ]
- ]
- },
- {
- "id": "9438739a0d42032a",
- "type": "debug",
- "z": "f9eff8535747992a",
- "name": "",
- "active": true,
- "tosidebar": true,
- "console": false,
- "tostatus": false,
- "complete": "false",
- "statusVal": "",
- "statusType": "auto",
- "x": 1290,
- "y": 860,
- "wires": []
- },
- {
- "id": "ba962cb706960ca3",
- "type": "function",
- "z": "f9eff8535747992a",
- "name": "HypeTrain Begin",
- "func": "const total = msg.payload.event.total;\nconst progress = msg.payload.event.progress;\nconst goal = msg.payload.event.goal;\nconst top_contrib = msg.payload.event.top_contributions;\nconst last_contrib = msg.payload.event.last_contribution;\n\nreturn [{payload : total}, {payload : progress}, {payload : goal}, {payload : top_contrib}, {payload : last_contrib}];",
- "outputs": 5,
- "noerr": 0,
- "initialize": "",
- "finalize": "",
- "libs": [],
- "x": 1120,
- "y": 920,
- "wires": [
- [
- "bcf41039c5488aa0"
- ],
- [
- "bcf41039c5488aa0"
- ],
- [
- "bcf41039c5488aa0"
- ],
- [
- "bcf41039c5488aa0"
- ],
- [
- "bcf41039c5488aa0"
- ]
- ],
- "outputLabels": [
- "Total",
- "Progress",
- "Goal",
- "Top contrib",
- "Last contrib"
- ]
- },
- {
- "id": "3445992ddf31cb4e",
- "type": "link in",
- "z": "f9eff8535747992a",
- "name": "Channel Update",
- "links": [
- "aa03c725061760dd"
- ],
- "x": 985,
- "y": 920,
- "wires": [
- [
- "ba962cb706960ca3"
- ]
- ]
- },
- {
- "id": "bcf41039c5488aa0",
- "type": "debug",
- "z": "f9eff8535747992a",
- "name": "",
- "active": true,
- "tosidebar": true,
- "console": false,
- "tostatus": false,
- "complete": "false",
- "statusVal": "",
- "statusType": "auto",
- "x": 1310,
- "y": 920,
- "wires": []
- },
- {
- "id": "2082c62be84dcf16",
- "type": "function",
- "z": "f9eff8535747992a",
- "name": "HypeTrain Progress",
- "func": "const level = msg.payload.event.level;\nconst total = msg.payload.event.total;\nconst progress = msg.payload.event.progress;\nconst goal = msg.payload.event.goal;\nconst top_contrib = msg.payload.event.top_contributions;\nconst last_contrib = msg.payload.event.last_contribution;\n\nreturn [{payload : level}, {payload : total}, {payload : progress}, {payload : goal}, {payload : top_contrib}, {payload : last_contrib}];",
- "outputs": 6,
- "noerr": 0,
- "initialize": "",
- "finalize": "",
- "libs": [],
- "x": 1130,
- "y": 1010,
- "wires": [
- [
- "9f32750213a4f0c6"
- ],
- [
- "9f32750213a4f0c6"
- ],
- [
- "9f32750213a4f0c6"
- ],
- [
- "9f32750213a4f0c6"
- ],
- [
- "9f32750213a4f0c6"
- ],
- [
- "9f32750213a4f0c6"
- ]
- ],
- "outputLabels": [
- "Level",
- "Total",
- "Progress",
- "Goal",
- "Top contrib",
- "Last contrib"
- ]
- },
- {
- "id": "1d7fb21bf35a91b8",
- "type": "link in",
- "z": "f9eff8535747992a",
- "name": "Channel Update",
- "links": [
- "a3ee39814135cad2"
- ],
- "x": 985,
- "y": 1010,
- "wires": [
- [
- "2082c62be84dcf16"
- ]
- ]
- },
- {
- "id": "9f32750213a4f0c6",
- "type": "debug",
- "z": "f9eff8535747992a",
- "name": "",
- "active": true,
- "tosidebar": true,
- "console": false,
- "tostatus": false,
- "complete": "false",
- "statusVal": "",
- "statusType": "auto",
- "x": 1340,
- "y": 1010,
- "wires": []
- },
- {
- "id": "65537eb9b8bb35b8",
- "type": "function",
- "z": "f9eff8535747992a",
- "name": "HyperTrain End",
- "func": "const level = msg.payload.event.level;\nconst total = msg.payload.event.total;\nconst top_contrib = msg.payload.event.top_contributions;\n\nreturn [{payload : level}, {payload : total}, {payload : top_contrib}];",
- "outputs": 3,
- "noerr": 0,
- "initialize": "",
- "finalize": "",
- "libs": [],
- "x": 1110,
- "y": 1090,
- "wires": [
- [
- "df791e577307e9f7"
- ],
- [
- "df791e577307e9f7"
- ],
- [
- "df791e577307e9f7"
- ]
- ],
- "outputLabels": [
- "Level",
- "Total",
- "Top contrib"
- ]
- },
- {
- "id": "c22851c0379367b6",
- "type": "link in",
- "z": "f9eff8535747992a",
- "name": "Channel Update",
- "links": [
- "74a51ad373778ee6"
- ],
- "x": 985,
- "y": 1090,
- "wires": [
- [
- "65537eb9b8bb35b8"
- ]
- ]
- },
- {
- "id": "df791e577307e9f7",
- "type": "debug",
- "z": "f9eff8535747992a",
- "name": "",
- "active": true,
- "tosidebar": true,
- "console": false,
- "tostatus": false,
- "complete": "false",
- "statusVal": "",
- "statusType": "auto",
- "x": 1310,
- "y": 1090,
- "wires": []
- },
{
"id": "4b779b18cfa18def",
"type": "function",
- "z": "f9eff8535747992a",
+ "z": "bedf5b9469855c83",
"g": "1d9e4b26a824022f",
"name": "Fake Sub",
- "func": "msg.payload = {\n \"subscription\": {\n \"id\": \"f1c2a387-161a-49f9-a165-0f21d7a4e1c4\",\n \"type\": \"channel.subscribe\",\n \"version\": \"1\",\n \"status\": \"enabled\",\n \"cost\": 0,\n \"condition\": {\n \"broadcaster_user_id\": \"1337\"\n },\n \"transport\": {\n \"method\": \"webhook\",\n \"callback\": \"https://example.com/webhooks/callback\"\n },\n \"created_at\": \"2019-11-16T10:11:12.123Z\"\n },\n \"event\": {\n \"user_id\": \"1234\",\n \"user_login\": \"cool_user\",\n \"user_name\": \"Cool_User\",\n \"broadcaster_user_id\": \"1337\",\n \"broadcaster_user_login\": \"cooler_user\",\n \"broadcaster_user_name\": \"Cooler_User\",\n \"tier\": \"1000\",\n \"is_gift\": false\n }\n}\n\nreturn msg;",
+ "func": "msg.payload = {\n \"subscription\": {\n \"id\": \"f1c2a387-161a-49f9-a165-0f21d7a4e1c4\",\n \"type\": \"channel.subscribe\",\n \"version\": \"1\",\n \"status\": \"enabled\",\n \"cost\": 0,\n \"condition\": {\n \"broadcaster_user_id\": \"564492369\"\n },\n \"transport\": {\n \"method\": \"webhook\",\n \"callback\": \"https://example.com/webhooks/callback\"\n },\n \"created_at\": \"2019-11-16T10:11:12.123Z\"\n },\n \"event\": {\n \"user_id\": \"558919467\",\n \"user_login\": \"ioodyme\",\n \"user_name\": \"ioodyme\",\n \"broadcaster_user_id\": \"564492369\",\n \"broadcaster_user_login\": \"ioodyme\",\n \"broadcaster_user_name\": \"ioodyme\",\n \"tier\": \"1000\",\n \"is_gift\": false\n }\n}\n\nreturn msg;",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
- "x": 320,
- "y": 210,
+ "x": 290,
+ "y": 180,
"wires": [
[
"c46892d6233c5391"
@@ -3305,17 +2801,17 @@
{
"id": "fee40a11987375da",
"type": "function",
- "z": "f9eff8535747992a",
+ "z": "bedf5b9469855c83",
"g": "1d9e4b26a824022f",
"name": "Fake Follow",
- "func": "msg.payload = {\n \"subscription\": {\n \"id\": \"f1c2a387-161a-49f9-a165-0f21d7a4e1c4\",\n \"type\": \"channel.follow\",\n \"version\": \"1\",\n \"status\": \"enabled\",\n \"cost\": 0,\n \"condition\": {\n \"broadcaster_user_id\": \"1337\"\n },\n \"transport\": {\n \"method\": \"webhook\",\n \"callback\": \"https://example.com/webhooks/callback\"\n },\n \"created_at\": \"2019-11-16T10:11:12.123Z\"\n },\n \"event\": {\n \"user_id\": \"1234\",\n \"user_login\": \"cool_user\",\n \"user_name\": \"Cool_User\",\n \"broadcaster_user_id\": \"1337\",\n \"broadcaster_user_login\": \"cooler_user\",\n \"broadcaster_user_name\": \"Cooler_User\",\n \"followed_at\": \"2020-07-15T18:16:11.17106713Z\"\n }\n}\nreturn msg;",
+ "func": "msg.payload = {\n \"subscription\": {\n \"id\": \"f1c2a387-161a-49f9-a165-0f21d7a4e1c4\",\n \"type\": \"channel.follow\",\n \"version\": \"1\",\n \"status\": \"enabled\",\n \"cost\": 0,\n \"condition\": {\n \"broadcaster_user_id\": \"564492369\"\n },\n \"transport\": {\n \"method\": \"webhook\",\n \"callback\": \"https://example.com/webhooks/callback\"\n },\n \"created_at\": \"2019-11-16T10:11:12.123Z\"\n },\n \"event\": {\n \"user_id\": \"558919467\",\n \"user_login\": \"ioodyme\",\n \"user_name\": \"ioodyme\",\n \"broadcaster_user_id\": \"564492369\",\n \"broadcaster_user_login\": \"ioodyme\",\n \"broadcaster_user_name\": \"ioodyme\",\n \"followed_at\": \"2020-07-15T18:16:11.17106713Z\"\n }\n}\nreturn msg;",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
- "x": 330,
- "y": 170,
+ "x": 300,
+ "y": 140,
"wires": [
[
"c46892d6233c5391"
@@ -3325,7 +2821,7 @@
{
"id": "c46892d6233c5391",
"type": "switch",
- "z": "f9eff8535747992a",
+ "z": "bedf5b9469855c83",
"g": "1d9e4b26a824022f",
"name": "",
"property": "payload.subscription.type",
@@ -3440,8 +2936,8 @@
"checkall": "true",
"repair": false,
"outputs": 21,
- "x": 550,
- "y": 490,
+ "x": 520,
+ "y": 460,
"wires": [
[
"d1c64ebc8a5feec9"
@@ -3511,35 +3007,35 @@
{
"id": "03f134a19d11f009",
"type": "link in",
- "z": "f9eff8535747992a",
+ "z": "bedf5b9469855c83",
"g": "1d9e4b26a824022f",
"name": "Webhook Response",
"links": [
"496beddfeba0baee"
],
- "x": 310,
- "y": 90,
+ "x": 245,
+ "y": 60,
"wires": [
[
- "c46892d6233c5391"
+ "c46892d6233c5391",
+ "8a0b93500015be22"
]
- ],
- "l": true
+ ]
},
{
"id": "0e717f858b8d799c",
"type": "function",
- "z": "f9eff8535747992a",
+ "z": "bedf5b9469855c83",
"g": "1d9e4b26a824022f",
"name": "Fake Update",
- "func": "msg.payload = {\n \"subscription\": {\n \"id\": \"f1c2a387-161a-49f9-a165-0f21d7a4e1c4\",\n \"type\": \"channel.update\",\n \"version\": \"1\",\n \"status\": \"enabled\",\n \"cost\": 0,\n \"condition\": {\n \"broadcaster_user_id\": \"1337\"\n },\n \"transport\": {\n \"method\": \"webhook\",\n \"callback\": \"https://example.com/webhooks/callback\"\n },\n \"created_at\": \"2019-11-16T10:11:12.123Z\"\n },\n \"event\": {\n \"broadcaster_user_id\": \"1337\",\n \"broadcaster_user_login\": \"cool_user\",\n \"broadcaster_user_name\": \"Cool_User\",\n \"title\": \"Best Stream Ever\",\n \"language\": \"en\",\n \"category_id\": \"21779\",\n \"category_name\": \"Fortnite\",\n \"is_mature\": false\n }\n}\nreturn msg;",
+ "func": "msg.payload = {\n \"subscription\": {\n \"id\": \"f1c2a387-161a-49f9-a165-0f21d7a4e1c4\",\n \"type\": \"channel.update\",\n \"version\": \"1\",\n \"status\": \"enabled\",\n \"cost\": 0,\n \"condition\": {\n \"broadcaster_user_id\": \"564492369\"\n },\n \"transport\": {\n \"method\": \"webhook\",\n \"callback\": \"https://example.com/webhooks/callback\"\n },\n \"created_at\": \"2019-11-16T10:11:12.123Z\"\n },\n \"event\": {\n \"broadcaster_user_id\": \"564492369\",\n \"broadcaster_user_login\": \"ioodyme\",\n \"broadcaster_user_name\": \"ioodyme\",\n \"title\": \"Eventsub Demo\",\n \"language\": \"fr\",\n \"category_id\": \"99999\",\n \"category_name\": \"Node-RED\",\n \"is_mature\": false\n }\n}\nreturn msg;",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
- "x": 330,
- "y": 130,
+ "x": 300,
+ "y": 100,
"wires": [
[
"c46892d6233c5391"
@@ -3549,7 +3045,7 @@
{
"id": "bd60cc12bad786d6",
"type": "inject",
- "z": "f9eff8535747992a",
+ "z": "bedf5b9469855c83",
"g": "1d9e4b26a824022f",
"name": "Inject",
"props": [
@@ -3567,8 +3063,8 @@
"onceDelay": 0.1,
"topic": "",
"payloadType": "date",
- "x": 160,
- "y": 130,
+ "x": 130,
+ "y": 100,
"wires": [
[
"0e717f858b8d799c"
@@ -3578,52 +3074,51 @@
{
"id": "d1c64ebc8a5feec9",
"type": "link out",
- "z": "f9eff8535747992a",
+ "z": "bedf5b9469855c83",
"g": "1d9e4b26a824022f",
"name": "Channel Update OUT",
"links": [
"3c5392d536a6758c"
],
- "x": 760,
- "y": 130,
- "wires": [],
- "l": true
+ "x": 685,
+ "y": 100,
+ "wires": []
},
{
"id": "099c35a256887f74",
"type": "link out",
- "z": "f9eff8535747992a",
+ "z": "bedf5b9469855c83",
"g": "1d9e4b26a824022f",
"name": "Follower OUT",
"links": [
- "e3fdefc8024d75a1"
+ "e3fdefc8024d75a1",
+ "bfade4f4c4470fca"
],
- "x": 740,
- "y": 170,
- "wires": [],
- "l": true
+ "x": 685,
+ "y": 140,
+ "wires": []
},
{
"id": "35d2b6f068729230",
"type": "link out",
- "z": "f9eff8535747992a",
+ "z": "bedf5b9469855c83",
"g": "1d9e4b26a824022f",
"name": "Subscriber OUT",
"links": [
"46a3a69959ede421",
"f29e0798f7657a80",
"56eb628ad3cecd79",
- "e48379b1b04cd476"
+ "e48379b1b04cd476",
+ "31c0814baa995486"
],
- "x": 740,
- "y": 210,
- "wires": [],
- "l": true
+ "x": 685,
+ "y": 180,
+ "wires": []
},
{
"id": "9f4b9459d55f954b",
"type": "inject",
- "z": "f9eff8535747992a",
+ "z": "bedf5b9469855c83",
"g": "1d9e4b26a824022f",
"name": "Inject",
"props": [
@@ -3641,8 +3136,8 @@
"onceDelay": 0.1,
"topic": "",
"payloadType": "date",
- "x": 160,
- "y": 170,
+ "x": 130,
+ "y": 140,
"wires": [
[
"fee40a11987375da"
@@ -3652,7 +3147,7 @@
{
"id": "d6b5f07cf744a7b2",
"type": "inject",
- "z": "f9eff8535747992a",
+ "z": "bedf5b9469855c83",
"g": "1d9e4b26a824022f",
"name": "Inject",
"props": [
@@ -3670,8 +3165,8 @@
"onceDelay": 0.1,
"topic": "",
"payloadType": "date",
- "x": 160,
- "y": 210,
+ "x": 130,
+ "y": 180,
"wires": [
[
"4b779b18cfa18def"
@@ -3681,21 +3176,20 @@
{
"id": "66db194703a62045",
"type": "link out",
- "z": "f9eff8535747992a",
+ "z": "bedf5b9469855c83",
"g": "1d9e4b26a824022f",
"name": " SubGift OUT",
"links": [
"bc942504e9d6822a"
],
- "x": 730,
- "y": 250,
- "wires": [],
- "l": true
+ "x": 685,
+ "y": 220,
+ "wires": []
},
{
"id": "789b0a1d5d87ac36",
"type": "inject",
- "z": "f9eff8535747992a",
+ "z": "bedf5b9469855c83",
"g": "1d9e4b26a824022f",
"name": "Inject",
"props": [
@@ -3713,8 +3207,8 @@
"onceDelay": 0.1,
"topic": "",
"payloadType": "date",
- "x": 160,
- "y": 250,
+ "x": 130,
+ "y": 220,
"wires": [
[
"74325974cbdc5c90"
@@ -3724,17 +3218,17 @@
{
"id": "74325974cbdc5c90",
"type": "function",
- "z": "f9eff8535747992a",
+ "z": "bedf5b9469855c83",
"g": "1d9e4b26a824022f",
"name": "Fake SubGift",
- "func": "msg.payload ={\n \"subscription\": {\n \"id\": \"f1c2a387-161a-49f9-a165-0f21d7a4e1c4\",\n \"type\": \"channel.subscription.gift\",\n \"version\": \"1\",\n \"status\": \"enabled\",\n \"cost\": 0,\n \"condition\": {\n \"broadcaster_user_id\": \"1337\"\n },\n \"transport\": {\n \"method\": \"webhook\",\n \"callback\": \"https://example.com/webhooks/callback\"\n },\n \"created_at\": \"2019-11-16T10:11:12.123Z\"\n },\n \"event\": {\n \"user_id\": \"1234\",\n \"user_login\": \"cool_user\",\n \"user_name\": \"Cool_User\",\n \"broadcaster_user_id\": \"1337\",\n \"broadcaster_user_login\": \"cooler_user\",\n \"broadcaster_user_name\": \"Cooler_User\",\n \"total\": 2,\n \"tier\": \"1000\",\n \"cumulative_total\": 284, //null if anonymous or not shared by the user\n \"is_anonymous\": false\n }\n}\n\nreturn msg;",
+ "func": "msg.payload ={\n \"subscription\": {\n \"id\": \"f1c2a387-161a-49f9-a165-0f21d7a4e1c4\",\n \"type\": \"channel.subscription.gift\",\n \"version\": \"1\",\n \"status\": \"enabled\",\n \"cost\": 0,\n \"condition\": {\n \"broadcaster_user_id\": \"564492369\"\n },\n \"transport\": {\n \"method\": \"webhook\",\n \"callback\": \"https://example.com/webhooks/callback\"\n },\n \"created_at\": \"2019-11-16T10:11:12.123Z\"\n },\n \"event\": {\n \"user_id\": \"558919467\",\n \"user_login\": \"ioodyme\",\n \"user_name\": \"ioodyme\",\n \"broadcaster_user_id\": \"564492369\",\n \"broadcaster_user_login\": \"ioodyme\",\n \"broadcaster_user_name\": \"ioodyme\",\n \"total\": 2,\n \"tier\": \"1000\",\n \"cumulative_total\": 284, //null if anonymous or not shared by the user\n \"is_anonymous\": false\n }\n}\n\nreturn msg;",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
- "x": 330,
- "y": 250,
+ "x": 300,
+ "y": 220,
"wires": [
[
"c46892d6233c5391"
@@ -3744,7 +3238,7 @@
{
"id": "353f3049743bafc3",
"type": "inject",
- "z": "f9eff8535747992a",
+ "z": "bedf5b9469855c83",
"g": "1d9e4b26a824022f",
"name": "Inject",
"props": [
@@ -3762,8 +3256,8 @@
"onceDelay": 0.1,
"topic": "",
"payloadType": "date",
- "x": 160,
- "y": 330,
+ "x": 130,
+ "y": 300,
"wires": [
[
"85deb0b591c10ce6"
@@ -3773,17 +3267,17 @@
{
"id": "85deb0b591c10ce6",
"type": "function",
- "z": "f9eff8535747992a",
+ "z": "bedf5b9469855c83",
"g": "1d9e4b26a824022f",
"name": "Fake Bits",
- "func": "msg.payload ={\n \"subscription\": {\n \"id\": \"f1c2a387-161a-49f9-a165-0f21d7a4e1c4\",\n \"type\": \"channel.cheer\",\n \"version\": \"1\",\n \"status\": \"enabled\",\n \"cost\": 0,\n \"condition\": {\n \"broadcaster_user_id\": \"1337\"\n },\n \"transport\": {\n \"method\": \"webhook\",\n \"callback\": \"https://example.com/webhooks/callback\"\n },\n \"created_at\": \"2019-11-16T10:11:12.123Z\"\n },\n \"event\": {\n \"is_anonymous\": false,\n \"user_id\": \"1234\", // null if is_anonymous=true\n \"user_login\": \"cool_user\", // null if is_anonymous=true\n \"user_name\": \"Cool_User\", // null if is_anonymous=true\n \"broadcaster_user_id\": \"1337\",\n \"broadcaster_user_login\": \"cooler_user\",\n \"broadcaster_user_name\": \"Cooler_User\",\n \"message\": \"pogchamp\",\n \"bits\": 1000\n }\n}\n\nreturn msg;",
+ "func": "msg.payload ={\n \"subscription\": {\n \"id\": \"f1c2a387-161a-49f9-a165-0f21d7a4e1c4\",\n \"type\": \"channel.cheer\",\n \"version\": \"1\",\n \"status\": \"enabled\",\n \"cost\": 0,\n \"condition\": {\n \"broadcaster_user_id\": \"564492369\"\n },\n \"transport\": {\n \"method\": \"webhook\",\n \"callback\": \"https://example.com/webhooks/callback\"\n },\n \"created_at\": \"2019-11-16T10:11:12.123Z\"\n },\n \"event\": {\n \"is_anonymous\": false,\n \"user_id\": \"1234\", // null if is_anonymous=true\n \"user_login\": \"ioodyme\", // null if is_anonymous=true\n \"user_name\": \"ioodyme\", // null if is_anonymous=true\n \"broadcaster_user_id\": \"564492369\",\n \"broadcaster_user_login\": \"ioodyme\",\n \"broadcaster_user_name\": \"ioodyme\",\n \"message\": \"pogchamp\",\n \"bits\": 1000\n }\n}\n\nreturn msg;",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
- "x": 320,
- "y": 330,
+ "x": 290,
+ "y": 300,
"wires": [
[
"c46892d6233c5391"
@@ -3793,21 +3287,22 @@
{
"id": "e1ed82cfe4ac1c7b",
"type": "link out",
- "z": "f9eff8535747992a",
+ "z": "bedf5b9469855c83",
"g": "1d9e4b26a824022f",
"name": " Bits OUT",
"links": [
- "674ee05d36a01381"
+ "674ee05d36a01381",
+ "58ca90d863d4dc52",
+ "f5cefdde5937b428"
],
- "x": 720,
- "y": 330,
- "wires": [],
- "l": true
+ "x": 685,
+ "y": 300,
+ "wires": []
},
{
"id": "dd04e54715766887",
"type": "inject",
- "z": "f9eff8535747992a",
+ "z": "bedf5b9469855c83",
"g": "1d9e4b26a824022f",
"name": "Inject",
"props": [
@@ -3825,8 +3320,8 @@
"onceDelay": 0.1,
"topic": "",
"payloadType": "date",
- "x": 160,
- "y": 290,
+ "x": 130,
+ "y": 260,
"wires": [
[
"a69ac429f7a89027"
@@ -3836,17 +3331,17 @@
{
"id": "a69ac429f7a89027",
"type": "function",
- "z": "f9eff8535747992a",
+ "z": "bedf5b9469855c83",
"g": "1d9e4b26a824022f",
"name": "Fake Sub Message",
- "func": "msg.payload ={\n \"subscription\": {\n \"id\": \"f1c2a387-161a-49f9-a165-0f21d7a4e1c4\",\n \"type\": \"channel.subscription.message\",\n \"version\": \"1\",\n \"status\": \"enabled\",\n \"cost\": 0,\n \"condition\": {\n \"broadcaster_user_id\": \"1337\"\n },\n \"transport\": {\n \"method\": \"webhook\",\n \"callback\": \"https://example.com/webhooks/callback\"\n },\n \"created_at\": \"2019-11-16T10:11:12.123Z\"\n },\n \"event\": {\n \"user_id\": \"1234\",\n \"user_login\": \"cool_user\",\n \"user_name\": \"Cool_User\",\n \"broadcaster_user_id\": \"1337\",\n \"broadcaster_user_login\": \"cooler_user\",\n \"broadcaster_user_name\": \"Cooler_User\",\n \"tier\": \"1000\",\n \"message\": {\n \"text\": \"Love the stream! FevziGG\",\n \"emotes\": [\n {\n \"begin\": 23,\n \"end\": 30,\n \"id\": \"302976485\"\n }\n ]\n },\n \"cumulative_months\": 15,\n \"streak_months\": 1, // null if not shared\n \"duration_months\": 6\n }\n}\n\nreturn msg;",
+ "func": "msg.payload ={\n \"subscription\": {\n \"id\": \"f1c2a387-161a-49f9-a165-0f21d7a4e1c4\",\n \"type\": \"channel.subscription.message\",\n \"version\": \"1\",\n \"status\": \"enabled\",\n \"cost\": 0,\n \"condition\": {\n \"broadcaster_user_id\": \"564492369\"\n },\n \"transport\": {\n \"method\": \"webhook\",\n \"callback\": \"https://example.com/webhooks/callback\"\n },\n \"created_at\": \"2019-11-16T10:11:12.123Z\"\n },\n \"event\": {\n \"user_id\": \"558919467\",\n \"user_login\": \"ioodyme\",\n \"user_name\": \"ioodyme\",\n \"broadcaster_user_id\": \"564492369\",\n \"broadcaster_user_login\": \"ioodyme\",\n \"broadcaster_user_name\": \"ioodyme\",\n \"tier\": \"1000\",\n \"message\": {\n \"text\": \"Love the stream! FevziGG\",\n \"emotes\": [\n {\n \"begin\": 23,\n \"end\": 30,\n \"id\": \"302976485\"\n }\n ]\n },\n \"cumulative_months\": 15,\n \"streak_months\": 1, // null if not shared\n \"duration_months\": 6\n }\n}\n\nreturn msg;",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
- "x": 350,
- "y": 290,
+ "x": 320,
+ "y": 260,
"wires": [
[
"c46892d6233c5391"
@@ -3856,21 +3351,20 @@
{
"id": "7008cac6ebd21511",
"type": "link out",
- "z": "f9eff8535747992a",
+ "z": "bedf5b9469855c83",
"g": "1d9e4b26a824022f",
"name": "SubMessage OUT",
"links": [
"f436b7331bd9609b"
],
- "x": 750,
- "y": 290,
- "wires": [],
- "l": true
+ "x": 685,
+ "y": 260,
+ "wires": []
},
{
"id": "4f3290f9114221db",
"type": "inject",
- "z": "f9eff8535747992a",
+ "z": "bedf5b9469855c83",
"g": "1d9e4b26a824022f",
"name": "Inject",
"props": [
@@ -3888,8 +3382,8 @@
"onceDelay": 0.1,
"topic": "",
"payloadType": "date",
- "x": 160,
- "y": 370,
+ "x": 130,
+ "y": 340,
"wires": [
[
"442489b5937e9783"
@@ -3899,17 +3393,17 @@
{
"id": "442489b5937e9783",
"type": "function",
- "z": "f9eff8535747992a",
+ "z": "bedf5b9469855c83",
"g": "1d9e4b26a824022f",
"name": "Fake Raid",
- "func": "msg.payload ={\n \"subscription\": {\n \"id\": \"f1c2a387-161a-49f9-a165-0f21d7a4e1c4\",\n \"type\": \"channel.raid\",\n \"version\": \"1\",\n \"status\": \"enabled\",\n \"cost\": 0,\n \"condition\": {\n \"to_broadcaster_user_id\": \"1337\"\n },\n \"transport\": {\n \"method\": \"webhook\",\n \"callback\": \"https://example.com/webhooks/callback\"\n },\n \"created_at\": \"2019-11-16T10:11:12.123Z\"\n },\n \"event\": {\n \"from_broadcaster_user_id\": \"1234\",\n \"from_broadcaster_user_login\": \"cool_user\",\n \"from_broadcaster_user_name\": \"Cool_User\",\n \"to_broadcaster_user_id\": \"1337\",\n \"to_broadcaster_user_login\": \"cooler_user\",\n \"to_broadcaster_user_name\": \"Cooler_User\",\n \"viewers\": 9001\n }\n}\n\nreturn msg;",
+ "func": "msg.payload ={\n \"subscription\": {\n \"id\": \"f1c2a387-161a-49f9-a165-0f21d7a4e1c4\",\n \"type\": \"channel.raid\",\n \"version\": \"1\",\n \"status\": \"enabled\",\n \"cost\": 0,\n \"condition\": {\n \"to_broadcaster_user_id\": \"564492369\"\n },\n \"transport\": {\n \"method\": \"webhook\",\n \"callback\": \"https://example.com/webhooks/callback\"\n },\n \"created_at\": \"2019-11-16T10:11:12.123Z\"\n },\n \"event\": {\n \"from_broadcaster_user_id\": \"1234\",\n \"from_broadcaster_user_login\": \"ioodyme\",\n \"from_broadcaster_user_name\": \"ioodyme\",\n \"to_broadcaster_user_id\": \"564492369\",\n \"to_broadcaster_user_login\": \"ioodyme\",\n \"to_broadcaster_user_name\": \"ioodyme\",\n \"viewers\": 9001\n }\n}\n\nreturn msg;",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
- "x": 330,
- "y": 370,
+ "x": 300,
+ "y": 340,
"wires": [
[
"c46892d6233c5391"
@@ -3919,21 +3413,21 @@
{
"id": "8e64834c2e4ab9c6",
"type": "link out",
- "z": "f9eff8535747992a",
+ "z": "bedf5b9469855c83",
"g": "1d9e4b26a824022f",
"name": " Raid OUT",
"links": [
- "6c6457495d5b73d4"
+ "6c6457495d5b73d4",
+ "550ccd4012fa1fbf"
],
- "x": 720,
- "y": 370,
- "wires": [],
- "l": true
+ "x": 685,
+ "y": 340,
+ "wires": []
},
{
"id": "14246c59203bf325",
"type": "inject",
- "z": "f9eff8535747992a",
+ "z": "bedf5b9469855c83",
"g": "1d9e4b26a824022f",
"name": "Inject",
"props": [
@@ -3951,8 +3445,8 @@
"onceDelay": 0.1,
"topic": "",
"payloadType": "date",
- "x": 160,
- "y": 450,
+ "x": 130,
+ "y": 420,
"wires": [
[
"f76ce5c449b39ec1"
@@ -3962,17 +3456,17 @@
{
"id": "f76ce5c449b39ec1",
"type": "function",
- "z": "f9eff8535747992a",
+ "z": "bedf5b9469855c83",
"g": "1d9e4b26a824022f",
"name": "Fake Unban",
- "func": "msg.payload ={\n \"subscription\": {\n \"id\": \"f1c2a387-161a-49f9-a165-0f21d7a4e1c4\",\n \"type\": \"channel.unban\",\n \"version\": \"1\",\n \"status\": \"enabled\",\n \"cost\": 0,\n \"condition\": {\n \"broadcaster_user_id\": \"1337\"\n },\n \"transport\": {\n \"method\": \"webhook\",\n \"callback\": \"https://example.com/webhooks/callback\"\n },\n \"created_at\": \"2019-11-16T10:11:12.123Z\"\n },\n \"event\": {\n \"user_id\": \"1234\",\n \"user_login\": \"cool_user\",\n \"user_name\": \"Cool_User\",\n \"broadcaster_user_id\": \"1337\",\n \"broadcaster_user_login\": \"cooler_user\",\n \"broadcaster_user_name\": \"Cooler_User\",\n \"moderator_user_id\": \"1339\",\n \"moderator_user_login\": \"mod_user\",\n \"moderator_user_name\": \"Mod_User\"\n }\n}\n\nreturn msg;",
+ "func": "msg.payload ={\n \"subscription\": {\n \"id\": \"f1c2a387-161a-49f9-a165-0f21d7a4e1c4\",\n \"type\": \"channel.unban\",\n \"version\": \"1\",\n \"status\": \"enabled\",\n \"cost\": 0,\n \"condition\": {\n \"broadcaster_user_id\": \"564492369\"\n },\n \"transport\": {\n \"method\": \"webhook\",\n \"callback\": \"https://example.com/webhooks/callback\"\n },\n \"created_at\": \"2019-11-16T10:11:12.123Z\"\n },\n \"event\": {\n \"user_id\": \"1234\",\n \"user_login\": \"cool_user\",\n \"user_name\": \"Cool_User\",\n \"broadcaster_user_id\": \"564492369\",\n \"broadcaster_user_login\": \"ioodyme\",\n \"broadcaster_user_name\": \"ioodyme\",\n \"moderator_user_id\": \"1339\",\n \"moderator_user_login\": \"mod_user\",\n \"moderator_user_name\": \"Mod_User\"\n }\n}\n\nreturn msg;",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
- "x": 330,
- "y": 450,
+ "x": 300,
+ "y": 420,
"wires": [
[
"c46892d6233c5391"
@@ -3982,21 +3476,20 @@
{
"id": "ec063c27cbdff5bc",
"type": "link out",
- "z": "f9eff8535747992a",
+ "z": "bedf5b9469855c83",
"g": "1d9e4b26a824022f",
"name": " Unban OUT",
"links": [
"e7138cd2dc73b8c0"
],
- "x": 730,
- "y": 450,
- "wires": [],
- "l": true
+ "x": 685,
+ "y": 420,
+ "wires": []
},
{
"id": "fc172da139ae610c",
"type": "inject",
- "z": "f9eff8535747992a",
+ "z": "bedf5b9469855c83",
"g": "1d9e4b26a824022f",
"name": "Inject",
"props": [
@@ -4014,8 +3507,8 @@
"onceDelay": 0.1,
"topic": "",
"payloadType": "date",
- "x": 160,
- "y": 410,
+ "x": 130,
+ "y": 380,
"wires": [
[
"09ca04c0b1964ea9"
@@ -4025,17 +3518,17 @@
{
"id": "09ca04c0b1964ea9",
"type": "function",
- "z": "f9eff8535747992a",
+ "z": "bedf5b9469855c83",
"g": "1d9e4b26a824022f",
"name": "Fake Ban",
- "func": "msg.payload ={\n \"subscription\": {\n \"id\": \"f1c2a387-161a-49f9-a165-0f21d7a4e1c4\",\n \"type\": \"channel.ban\",\n \"version\": \"1\",\n \"status\": \"enabled\",\n \"cost\": 0,\n \"condition\": {\n \"broadcaster_user_id\": \"1337\"\n },\n \"transport\": {\n \"method\": \"webhook\",\n \"callback\": \"https://example.com/webhooks/callback\"\n },\n \"created_at\": \"2019-11-16T10:11:12.123Z\"\n },\n \"event\": {\n \"user_id\": \"1234\",\n \"user_login\": \"cool_user\",\n \"user_name\": \"Cool_User\",\n \"broadcaster_user_id\": \"1337\",\n \"broadcaster_user_login\": \"cooler_user\",\n \"broadcaster_user_name\": \"Cooler_User\",\n \"moderator_user_id\": \"1339\",\n \"moderator_user_login\": \"mod_user\",\n \"moderator_user_name\": \"Mod_User\",\n \"reason\": \"Offensive language\",\n \"ends_at\": \"2020-07-15T18:16:11.17106713Z\",\n \"is_permanent\": false\n }\n}\n\nreturn msg;",
+ "func": "msg.payload ={\n \"subscription\": {\n \"id\": \"f1c2a387-161a-49f9-a165-0f21d7a4e1c4\",\n \"type\": \"channel.ban\",\n \"version\": \"1\",\n \"status\": \"enabled\",\n \"cost\": 0,\n \"condition\": {\n \"broadcaster_user_id\": \"564492369\"\n },\n \"transport\": {\n \"method\": \"webhook\",\n \"callback\": \"https://example.com/webhooks/callback\"\n },\n \"created_at\": \"2019-11-16T10:11:12.123Z\"\n },\n \"event\": {\n \"user_id\": \"1234\",\n \"user_login\": \"cool_user\",\n \"user_name\": \"Cool_User\",\n \"broadcaster_user_id\": \"564492369\",\n \"broadcaster_user_login\": \"ioodyme\",\n \"broadcaster_user_name\": \"ioodyme\",\n \"moderator_user_id\": \"1339\",\n \"moderator_user_login\": \"mod_user\",\n \"moderator_user_name\": \"Mod_User\",\n \"reason\": \"Offensive language\",\n \"ends_at\": \"2020-07-15T18:16:11.17106713Z\",\n \"is_permanent\": false\n }\n}\n\nreturn msg;",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
- "x": 320,
- "y": 410,
+ "x": 290,
+ "y": 380,
"wires": [
[
"c46892d6233c5391"
@@ -4045,21 +3538,20 @@
{
"id": "3e4196fcfe60dd91",
"type": "link out",
- "z": "f9eff8535747992a",
+ "z": "bedf5b9469855c83",
"g": "1d9e4b26a824022f",
"name": "Ban OUT",
"links": [
"46a44352c8d66e56"
],
- "x": 720,
- "y": 410,
- "wires": [],
- "l": true
+ "x": 685,
+ "y": 380,
+ "wires": []
},
{
"id": "904fead80acf0883",
"type": "inject",
- "z": "f9eff8535747992a",
+ "z": "bedf5b9469855c83",
"g": "1d9e4b26a824022f",
"name": "Inject",
"props": [
@@ -4077,8 +3569,8 @@
"onceDelay": 0.1,
"topic": "",
"payloadType": "date",
- "x": 160,
- "y": 490,
+ "x": 130,
+ "y": 460,
"wires": [
[
"57835b0e8181dc56"
@@ -4088,17 +3580,17 @@
{
"id": "57835b0e8181dc56",
"type": "function",
- "z": "f9eff8535747992a",
+ "z": "bedf5b9469855c83",
"g": "1d9e4b26a824022f",
"name": "Fake Channel point",
- "func": "msg.payload ={\n \"subscription\": {\n \"id\": \"f1c2a387-161a-49f9-a165-0f21d7a4e1c4\",\n \"type\": \"channel.channel_points_custom_reward_redemption.add\",\n \"version\": \"1\",\n \"status\": \"enabled\",\n \"cost\": 0,\n \"condition\": {\n \"broadcaster_user_id\": \"1337\"\n },\n \"transport\": {\n \"method\": \"webhook\",\n \"callback\": \"https://example.com/webhooks/callback\"\n },\n \"created_at\": \"2019-11-16T10:11:12.123Z\"\n },\n \"event\": {\n \"id\": \"1234\",\n \"broadcaster_user_id\": \"1337\",\n \"broadcaster_user_login\": \"cool_user\",\n \"broadcaster_user_name\": \"Cool_User\",\n \"user_id\": \"9001\",\n \"user_login\": \"cooler_user\",\n \"user_name\": \"Cooler_User\",\n \"user_input\": \"pogchamp\",\n \"status\": \"unfulfilled\",\n \"reward\": {\n \"id\": \"9001\",\n \"title\": \"title\",\n \"cost\": 100,\n \"prompt\": \"reward prompt\"\n },\n \"redeemed_at\": \"2020-07-15T17:16:03.17106713Z\"\n }\n}\n\nreturn msg;",
+ "func": "msg.payload ={\n \"subscription\": {\n \"id\": \"f1c2a387-161a-49f9-a165-0f21d7a4e1c4\",\n \"type\": \"channel.channel_points_custom_reward_redemption.add\",\n \"version\": \"1\",\n \"status\": \"enabled\",\n \"cost\": 0,\n \"condition\": {\n \"broadcaster_user_id\": \"1337\"\n },\n \"transport\": {\n \"method\": \"webhook\",\n \"callback\": \"https://example.com/webhooks/callback\"\n },\n \"created_at\": \"2019-11-16T10:11:12.123Z\"\n },\n \"event\": {\n \"id\": \"1234\",\n \"broadcaster_user_id\": \"564492369\",\n \"broadcaster_user_login\": \"ioodyme\",\n \"broadcaster_user_name\": \"ioodyme\",\n \"user_id\": \"9001\",\n \"user_login\": \"cooler_user\",\n \"user_name\": \"Cooler_User\",\n \"user_input\": \"pogchamp\",\n \"status\": \"unfulfilled\",\n \"reward\": {\n \"id\": \"9001\",\n \"title\": \"title\",\n \"cost\": 100,\n \"prompt\": \"reward prompt\"\n },\n \"redeemed_at\": \"2020-07-15T17:16:03.17106713Z\"\n }\n}\n\nreturn msg;",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
- "x": 350,
- "y": 490,
+ "x": 320,
+ "y": 460,
"wires": [
[
"c46892d6233c5391"
@@ -4108,22 +3600,27 @@
{
"id": "b97c23ba88296b1b",
"type": "link out",
- "z": "f9eff8535747992a",
+ "z": "bedf5b9469855c83",
"g": "1d9e4b26a824022f",
"name": "Channel point OUT",
"links": [
"2720e13c28d5f2a6",
- "855f17e48633f9cb"
+ "855f17e48633f9cb",
+ "bfd5b37e82c754af",
+ "716dda6b2e195e16",
+ "9f9939bb1d5a3621",
+ "1b401f6940424d10",
+ "f11751938967bc06",
+ "d0b826a68fb7648f"
],
- "x": 750,
- "y": 490,
- "wires": [],
- "l": true
+ "x": 685,
+ "y": 460,
+ "wires": []
},
{
"id": "b4c1b467be768e4a",
"type": "inject",
- "z": "f9eff8535747992a",
+ "z": "bedf5b9469855c83",
"g": "1d9e4b26a824022f",
"name": "Inject",
"props": [
@@ -4141,8 +3638,8 @@
"onceDelay": 0.1,
"topic": "",
"payloadType": "date",
- "x": 160,
- "y": 610,
+ "x": 130,
+ "y": 580,
"wires": [
[
"76a3218918c97560"
@@ -4152,17 +3649,17 @@
{
"id": "76a3218918c97560",
"type": "function",
- "z": "f9eff8535747992a",
+ "z": "bedf5b9469855c83",
"g": "1d9e4b26a824022f",
"name": "Fake Poll end",
- "func": "msg.payload ={\n \"subscription\": {\n \"id\": \"f1c2a387-161a-49f9-a165-0f21d7a4e1c4\",\n \"type\": \"channel.poll.end\",\n \"version\": \"1\",\n \"status\": \"enabled\",\n \"cost\": 0,\n \"condition\": {\n \"broadcaster_user_id\": \"1337\"\n },\n \"transport\": {\n \"method\": \"webhook\",\n \"callback\": \"https://example.com/webhooks/callback\"\n },\n \"created_at\": \"2019-11-16T10:11:12.123Z\"\n },\n \"event\": {\n \"id\": \"1243456\",\n \"broadcaster_user_id\": \"1337\",\n \"broadcaster_user_login\": \"cool_user\",\n \"broadcaster_user_name\": \"Cool_User\",\n \"title\": \"Aren’t shoes just really hard socks?\",\n \"choices\": [\n {\"id\": \"123\", \"title\": \"Blue\", \"bits_votes\": 50, \"channel_points_votes\": 70, \"votes\": 120},\n {\"id\": \"124\", \"title\": \"Yellow\", \"bits_votes\": 100, \"channel_points_votes\": 40, \"votes\": 140},\n {\"id\": \"125\", \"title\": \"Green\", \"bits_votes\": 10, \"channel_points_votes\": 70, \"votes\": 80}\n ],\n \"bits_voting\": {\n \"is_enabled\": true,\n \"amount_per_vote\": 10\n },\n \"channel_points_voting\": {\n \"is_enabled\": true,\n \"amount_per_vote\": 10\n },\n \"status\": \"completed\",\n \"started_at\": \"2020-07-15T17:16:03.17106713Z\",\n \"ended_at\": \"2020-07-15T17:16:11.17106713Z\"\n }\n}\n\nreturn msg;",
+ "func": "msg.payload ={\n \"subscription\": {\n \"id\": \"f1c2a387-161a-49f9-a165-0f21d7a4e1c4\",\n \"type\": \"channel.poll.end\",\n \"version\": \"1\",\n \"status\": \"enabled\",\n \"cost\": 0,\n \"condition\": {\n \"broadcaster_user_id\": \"1337\"\n },\n \"transport\": {\n \"method\": \"webhook\",\n \"callback\": \"https://example.com/webhooks/callback\"\n },\n \"created_at\": \"2019-11-16T10:11:12.123Z\"\n },\n \"event\": {\n \"id\": \"1243456\",\n \"broadcaster_user_id\": \"564492369\",\n \"broadcaster_user_login\": \"ioodyme\",\n \"broadcaster_user_name\": \"ioodyme\",\n \"title\": \"Aren’t shoes just really hard socks?\",\n \"choices\": [\n {\"id\": \"123\", \"title\": \"Blue\", \"bits_votes\": 50, \"channel_points_votes\": 70, \"votes\": 120},\n {\"id\": \"124\", \"title\": \"Yellow\", \"bits_votes\": 100, \"channel_points_votes\": 40, \"votes\": 140},\n {\"id\": \"125\", \"title\": \"Green\", \"bits_votes\": 10, \"channel_points_votes\": 70, \"votes\": 80}\n ],\n \"bits_voting\": {\n \"is_enabled\": true,\n \"amount_per_vote\": 10\n },\n \"channel_points_voting\": {\n \"is_enabled\": true,\n \"amount_per_vote\": 10\n },\n \"status\": \"completed\",\n \"started_at\": \"2020-07-15T17:16:03.17106713Z\",\n \"ended_at\": \"2020-07-15T17:16:11.17106713Z\"\n }\n}\n\nreturn msg;",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
- "x": 340,
- "y": 610,
+ "x": 310,
+ "y": 580,
"wires": [
[
"c46892d6233c5391"
@@ -4172,21 +3669,20 @@
{
"id": "90d9f9f778dfea84",
"type": "link out",
- "z": "f9eff8535747992a",
+ "z": "bedf5b9469855c83",
"g": "1d9e4b26a824022f",
"name": "Poll End OUT",
"links": [
"440ca17ff1420dfe"
],
- "x": 740,
- "y": 610,
- "wires": [],
- "l": true
+ "x": 685,
+ "y": 580,
+ "wires": []
},
{
"id": "1b82f3fefef1c56c",
"type": "inject",
- "z": "f9eff8535747992a",
+ "z": "bedf5b9469855c83",
"g": "1d9e4b26a824022f",
"name": "Inject",
"props": [
@@ -4204,8 +3700,8 @@
"onceDelay": 0.1,
"topic": "",
"payloadType": "date",
- "x": 160,
- "y": 530,
+ "x": 130,
+ "y": 500,
"wires": [
[
"427e0239f95d69ba"
@@ -4215,17 +3711,17 @@
{
"id": "427e0239f95d69ba",
"type": "function",
- "z": "f9eff8535747992a",
+ "z": "bedf5b9469855c83",
"g": "1d9e4b26a824022f",
"name": "Fake Poll Begin",
- "func": "msg.payload ={\n \"subscription\": {\n \"id\": \"f1c2a387-161a-49f9-a165-0f21d7a4e1c4\",\n \"type\": \"channel.poll.begin\",\n \"version\": \"1\",\n \"status\": \"enabled\",\n \"cost\": 0,\n \"condition\": {\n \"broadcaster_user_id\": \"1337\"\n },\n \"transport\": {\n \"method\": \"webhook\",\n \"callback\": \"https://example.com/webhooks/callback\"\n },\n \"created_at\": \"2019-11-16T10:11:12.123Z\"\n },\n \"event\": {\n \"id\": \"1243456\",\n \"broadcaster_user_id\": \"1337\",\n \"broadcaster_user_login\": \"cool_user\",\n \"broadcaster_user_name\": \"Cool_User\",\n \"title\": \"Aren’t shoes just really hard socks?\",\n \"choices\": [\n {\"id\": \"123\", \"title\": \"Yeah!\"},\n {\"id\": \"124\", \"title\": \"No!\"},\n {\"id\": \"125\", \"title\": \"Maybe!\"}\n ],\n \"bits_voting\": {\n \"is_enabled\": true,\n \"amount_per_vote\": 10\n },\n \"channel_points_voting\": {\n \"is_enabled\": true,\n \"amount_per_vote\": 10\n },\n \"started_at\": \"2020-07-15T17:16:03.17106713Z\",\n \"ends_at\": \"2020-07-15T17:16:08.17106713Z\"\n }\n}\n\nreturn msg;",
+ "func": "msg.payload ={\n \"subscription\": {\n \"id\": \"f1c2a387-161a-49f9-a165-0f21d7a4e1c4\",\n \"type\": \"channel.poll.begin\",\n \"version\": \"1\",\n \"status\": \"enabled\",\n \"cost\": 0,\n \"condition\": {\n \"broadcaster_user_id\": \"564492369\"\n },\n \"transport\": {\n \"method\": \"webhook\",\n \"callback\": \"https://example.com/webhooks/callback\"\n },\n \"created_at\": \"2019-11-16T10:11:12.123Z\"\n },\n \"event\": {\n \"id\": \"1243456\",\n \"broadcaster_user_id\": \"564492369\",\n \"broadcaster_user_login\": \"ioodyme\",\n \"broadcaster_user_name\": \"ioodyme\",\n \"title\": \"Aren’t shoes just really hard socks?\",\n \"choices\": [\n {\"id\": \"123\", \"title\": \"Yeah!\"},\n {\"id\": \"124\", \"title\": \"No!\"},\n {\"id\": \"125\", \"title\": \"Maybe!\"}\n ],\n \"bits_voting\": {\n \"is_enabled\": true,\n \"amount_per_vote\": 10\n },\n \"channel_points_voting\": {\n \"is_enabled\": true,\n \"amount_per_vote\": 10\n },\n \"started_at\": \"2020-07-15T17:16:03.17106713Z\",\n \"ends_at\": \"2020-07-15T17:16:08.17106713Z\"\n }\n}\n\nreturn msg;",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
- "x": 340,
- "y": 530,
+ "x": 310,
+ "y": 500,
"wires": [
[
"c46892d6233c5391"
@@ -4235,21 +3731,21 @@
{
"id": "f71de6f3f45ab546",
"type": "link out",
- "z": "f9eff8535747992a",
+ "z": "bedf5b9469855c83",
"g": "1d9e4b26a824022f",
"name": "Poll Begin OUT",
+ "mode": "link",
"links": [
"c977fc48940eaa1f"
],
- "x": 740,
- "y": 530,
- "wires": [],
- "l": true
+ "x": 685,
+ "y": 500,
+ "wires": []
},
{
"id": "aafeca1840745c1a",
"type": "inject",
- "z": "f9eff8535747992a",
+ "z": "bedf5b9469855c83",
"g": "1d9e4b26a824022f",
"name": "Inject",
"props": [
@@ -4267,8 +3763,8 @@
"onceDelay": 0.1,
"topic": "",
"payloadType": "date",
- "x": 160,
- "y": 650,
+ "x": 130,
+ "y": 620,
"wires": [
[
"641360867f4299e0"
@@ -4278,17 +3774,17 @@
{
"id": "641360867f4299e0",
"type": "function",
- "z": "f9eff8535747992a",
+ "z": "bedf5b9469855c83",
"g": "1d9e4b26a824022f",
"name": "Fake Prediction Begin",
- "func": "msg.payload ={\n \"subscription\": {\n \"id\": \"f1c2a387-161a-49f9-a165-0f21d7a4e1c4\",\n \"type\": \"channel.prediction.begin\",\n \"version\": \"1\",\n \"status\": \"enabled\",\n \"cost\": 0,\n \"condition\": {\n \"broadcaster_user_id\": \"1337\"\n },\n \"transport\": {\n \"method\": \"webhook\",\n \"callback\": \"https://example.com/webhooks/callback\"\n },\n \"created_at\": \"2019-11-16T10:11:12.123Z\"\n },\n \"event\": {\n \"id\": \"1243456\",\n \"broadcaster_user_id\": \"1337\",\n \"broadcaster_user_login\": \"cool_user\",\n \"broadcaster_user_name\": \"Cool_User\",\n \"title\": \"Aren’t shoes just really hard socks?\",\n \"outcomes\": [\n {\"id\": \"1243456\", \"title\": \"Yeah!\", \"color\": \"blue\"},\n {\"id\": \"2243456\", \"title\": \"No!\", \"color\": \"pink\"},\n ],\n \"started_at\": \"2020-07-15T17:16:03.17106713Z\",\n \"locks_at\": \"2020-07-15T17:21:03.17106713Z\"\n }\n}\n\nreturn msg;",
+ "func": "msg.payload ={\n \"subscription\": {\n \"id\": \"f1c2a387-161a-49f9-a165-0f21d7a4e1c4\",\n \"type\": \"channel.prediction.begin\",\n \"version\": \"1\",\n \"status\": \"enabled\",\n \"cost\": 0,\n \"condition\": {\n \"broadcaster_user_id\": \"564492369\"\n },\n \"transport\": {\n \"method\": \"webhook\",\n \"callback\": \"https://example.com/webhooks/callback\"\n },\n \"created_at\": \"2019-11-16T10:11:12.123Z\"\n },\n \"event\": {\n \"id\": \"1243456\",\n \"broadcaster_user_id\": \"564492369\",\n \"broadcaster_user_login\": \"ioodyme\",\n \"broadcaster_user_name\": \"ioodyme\",\n \"title\": \"Aren’t shoes just really hard socks?\",\n \"outcomes\": [\n {\"id\": \"1243456\", \"title\": \"Yeah!\", \"color\": \"blue\"},\n {\"id\": \"2243456\", \"title\": \"No!\", \"color\": \"pink\"},\n ],\n \"started_at\": \"2020-07-15T17:16:03.17106713Z\",\n \"locks_at\": \"2020-07-15T17:21:03.17106713Z\"\n }\n}\n\nreturn msg;",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
- "x": 360,
- "y": 650,
+ "x": 330,
+ "y": 620,
"wires": [
[
"c46892d6233c5391"
@@ -4298,21 +3794,20 @@
{
"id": "956b7e15e56e3e6e",
"type": "link out",
- "z": "f9eff8535747992a",
+ "z": "bedf5b9469855c83",
"g": "1d9e4b26a824022f",
"name": " Prediction Begin OUT",
"links": [
"02eff79de54243df"
],
- "x": 760,
- "y": 650,
- "wires": [],
- "l": true
+ "x": 685,
+ "y": 620,
+ "wires": []
},
{
"id": "2557738c1c37389e",
"type": "inject",
- "z": "f9eff8535747992a",
+ "z": "bedf5b9469855c83",
"g": "1d9e4b26a824022f",
"name": "Inject",
"props": [
@@ -4330,8 +3825,8 @@
"onceDelay": 0.1,
"topic": "",
"payloadType": "date",
- "x": 160,
- "y": 770,
+ "x": 130,
+ "y": 740,
"wires": [
[
"976a5ddd48218c96"
@@ -4341,17 +3836,17 @@
{
"id": "976a5ddd48218c96",
"type": "function",
- "z": "f9eff8535747992a",
+ "z": "bedf5b9469855c83",
"g": "1d9e4b26a824022f",
"name": "Fake HypeTrain Begin",
- "func": "msg.payload ={\n \"subscription\": {\n \"id\": \"f1c2a387-161a-49f9-a165-0f21d7a4e1c4\",\n \"type\": \"channel.hype_train.begin\",\n \"version\": \"1\",\n \"status\": \"enabled\",\n \"cost\": 0,\n \"condition\": {\n \"broadcaster_user_id\": \"1337\"\n },\n \"transport\": {\n \"method\": \"webhook\",\n \"callback\": \"https://example.com/webhooks/callback\"\n },\n \"created_at\": \"2019-11-16T10:11:12.123Z\"\n },\n \"event\": {\n \"id\": \"1b0AsbInCHZW2SQFQkCzqN07Ib2\",\n \"broadcaster_user_id\": \"1337\",\n \"broadcaster_user_login\": \"cool_user\",\n \"broadcaster_user_name\": \"Cool_User\",\n \"total\": 137,\n \"progress\": 137,\n \"goal\": 500,\n \"top_contributions\": [\n { \"user_id\": \"123\", \"user_login\": \"pogchamp\", \"user_name\": \"PogChamp\", \"type\": \"bits\", \"total\": 50 },\n { \"user_id\": \"456\", \"user_login\": \"kappa\", \"user_name\": \"Kappa\", \"type\": \"subscription\", \"total\": 45 }\n ],\n \"last_contribution\": { \"user_id\": \"123\", \"user_login\": \"pogchamp\", \"user_name\": \"PogChamp\", \"type\": \"bits\", \"total\": 50 },\n \"started_at\": \"2020-07-15T17:16:03.17106713Z\",\n \"expires_at\": \"2020-07-15T17:16:11.17106713Z\"\n }\n}\n\nreturn msg;",
+ "func": "msg.payload ={\n \"subscription\": {\n \"id\": \"f1c2a387-161a-49f9-a165-0f21d7a4e1c4\",\n \"type\": \"channel.hype_train.begin\",\n \"version\": \"1\",\n \"status\": \"enabled\",\n \"cost\": 0,\n \"condition\": {\n \"broadcaster_user_id\": \"564492369\"\n },\n \"transport\": {\n \"method\": \"webhook\",\n \"callback\": \"https://example.com/webhooks/callback\"\n },\n \"created_at\": \"2019-11-16T10:11:12.123Z\"\n },\n \"event\": {\n \"id\": \"1b0AsbInCHZW2SQFQkCzqN07Ib2\",\n \"broadcaster_user_id\": \"564492369\",\n \"broadcaster_user_login\": \"ioodyme\",\n \"broadcaster_user_name\": \"ioodyme\",\n \"total\": 137,\n \"progress\": 137,\n \"goal\": 500,\n \"top_contributions\": [\n { \"user_id\": \"123\", \"user_login\": \"pogchamp\", \"user_name\": \"PogChamp\", \"type\": \"bits\", \"total\": 50 },\n { \"user_id\": \"456\", \"user_login\": \"kappa\", \"user_name\": \"Kappa\", \"type\": \"subscription\", \"total\": 45 }\n ],\n \"last_contribution\": { \"user_id\": \"123\", \"user_login\": \"pogchamp\", \"user_name\": \"PogChamp\", \"type\": \"bits\", \"total\": 50 },\n \"started_at\": \"2020-07-15T17:16:03.17106713Z\",\n \"expires_at\": \"2020-07-15T17:16:11.17106713Z\"\n }\n}\n\nreturn msg;",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
- "x": 360,
- "y": 770,
+ "x": 330,
+ "y": 740,
"wires": [
[
"c46892d6233c5391"
@@ -4361,21 +3856,20 @@
{
"id": "aa03c725061760dd",
"type": "link out",
- "z": "f9eff8535747992a",
+ "z": "bedf5b9469855c83",
"g": "1d9e4b26a824022f",
"name": "HypeTrain Begin OUT",
"links": [
"3445992ddf31cb4e"
],
- "x": 760,
- "y": 770,
- "wires": [],
- "l": true
+ "x": 685,
+ "y": 740,
+ "wires": []
},
{
"id": "c936ce23cdc37428",
"type": "inject",
- "z": "f9eff8535747992a",
+ "z": "bedf5b9469855c83",
"g": "1d9e4b26a824022f",
"name": "Inject",
"props": [
@@ -4393,8 +3887,8 @@
"onceDelay": 0.1,
"topic": "",
"payloadType": "date",
- "x": 160,
- "y": 730,
+ "x": 130,
+ "y": 700,
"wires": [
[
"7cb22ecd302d5fe5"
@@ -4404,17 +3898,17 @@
{
"id": "7cb22ecd302d5fe5",
"type": "function",
- "z": "f9eff8535747992a",
+ "z": "bedf5b9469855c83",
"g": "1d9e4b26a824022f",
"name": "Fake Prediction End",
- "func": "msg.payload ={\n \"subscription\": {\n \"id\": \"f1c2a387-161a-49f9-a165-0f21d7a4e1c4\",\n \"type\": \"channel.prediction.end\",\n \"version\": \"1\",\n \"status\": \"enabled\",\n \"cost\": 0,\n \"condition\": {\n \"broadcaster_user_id\": \"1337\"\n },\n \"transport\": {\n \"method\": \"webhook\",\n \"callback\": \"https://example.com/webhooks/callback\"\n },\n \"created_at\": \"2019-11-16T10:11:12.123Z\"\n },\n \"event\": {\n \"id\": \"1243456\",\n \"broadcaster_user_id\": \"1337\",\n \"broadcaster_user_login\": \"cool_user\",\n \"broadcaster_user_name\": \"Cool_User\",\n \"title\": \"Aren’t shoes just really hard socks?\",\n \"winning_outcome_id\": \"12345\",\n \"outcomes\": [\n {\n \"id\": \"12345\",\n \"title\": \"Yeah!\",\n \"color\": \"blue\", // can be blue or pink\n \"users\": 2,\n \"channel_points\": 15000,\n \"top_predictors\": [ // contains up to 10 users\n {\n \"user_name\": \"Cool_User\",\n \"user_login\": \"cool_user\",\n \"user_id\": \"1234\",\n \"channel_points_won\": 10000,\n \"channel_points_used\": 500\n },\n {\n \"user_name\": \"Coolest_User\",\n \"user_login\": \"coolest_user\",\n \"user_id\": \"1236\",\n \"channel_points_won\": 5000,\n \"channel_points_used\": 100\n },\n ]\n },\n {\n \"id\": \"22435\",\n \"title\": \"No!\",\n \"users\": 2,\n \"channel_points\": 200,\n \"color\": \"pink\",\n \"top_predictors\": [\n {\n \"user_name\": \"Cooler_User\",\n \"user_login\": \"cooler_user\",\n \"user_id\": 12345,\n \"channel_points_won\": null, // null if result is refund or loss\n \"channel_points_used\": 100\n },\n {\n \"user_name\": \"Elite_User\",\n \"user_login\": \"elite_user\",\n \"user_id\": 1337,\n \"channel_points_won\": null, // null if result is refund or loss\n \"channel_points_used\": 100\n }\n ]\n }\n ],\n \"status\": \"resolved\", // valid values: resolved, canceled\n \"started_at\": \"2020-07-15T17:16:03.17106713Z\",\n \"ended_at\": \"2020-07-15T17:16:11.17106713Z\"\n }\n}\n\nreturn msg;",
+ "func": "msg.payload ={\n \"subscription\": {\n \"id\": \"f1c2a387-161a-49f9-a165-0f21d7a4e1c4\",\n \"type\": \"channel.prediction.end\",\n \"version\": \"1\",\n \"status\": \"enabled\",\n \"cost\": 0,\n \"condition\": {\n \"broadcaster_user_id\": \"564492369\"\n },\n \"transport\": {\n \"method\": \"webhook\",\n \"callback\": \"https://example.com/webhooks/callback\"\n },\n \"created_at\": \"2019-11-16T10:11:12.123Z\"\n },\n \"event\": {\n \"id\": \"1243456\",\n \"broadcaster_user_id\": \"564492369\",\n \"broadcaster_user_login\": \"ioodyme\",\n \"broadcaster_user_name\": \"ioodyme\",\n \"title\": \"Aren’t shoes just really hard socks?\",\n \"winning_outcome_id\": \"12345\",\n \"outcomes\": [\n {\n \"id\": \"12345\",\n \"title\": \"Yeah!\",\n \"color\": \"blue\", // can be blue or pink\n \"users\": 2,\n \"channel_points\": 15000,\n \"top_predictors\": [ // contains up to 10 users\n {\n \"user_name\": \"Cool_User\",\n \"user_login\": \"cool_user\",\n \"user_id\": \"1234\",\n \"channel_points_won\": 10000,\n \"channel_points_used\": 500\n },\n {\n \"user_name\": \"Coolest_User\",\n \"user_login\": \"coolest_user\",\n \"user_id\": \"1236\",\n \"channel_points_won\": 5000,\n \"channel_points_used\": 100\n },\n ]\n },\n {\n \"id\": \"22435\",\n \"title\": \"No!\",\n \"users\": 2,\n \"channel_points\": 200,\n \"color\": \"pink\",\n \"top_predictors\": [\n {\n \"user_name\": \"Cooler_User\",\n \"user_login\": \"cooler_user\",\n \"user_id\": 12345,\n \"channel_points_won\": null, // null if result is refund or loss\n \"channel_points_used\": 100\n },\n {\n \"user_name\": \"Elite_User\",\n \"user_login\": \"elite_user\",\n \"user_id\": 1337,\n \"channel_points_won\": null, // null if result is refund or loss\n \"channel_points_used\": 100\n }\n ]\n }\n ],\n \"status\": \"resolved\", // valid values: resolved, canceled\n \"started_at\": \"2020-07-15T17:16:03.17106713Z\",\n \"ended_at\": \"2020-07-15T17:16:11.17106713Z\"\n }\n}\n\nreturn msg;",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
- "x": 360,
- "y": 730,
+ "x": 330,
+ "y": 700,
"wires": [
[
"c46892d6233c5391"
@@ -4424,21 +3918,20 @@
{
"id": "8b358c8a79eba44f",
"type": "link out",
- "z": "f9eff8535747992a",
+ "z": "bedf5b9469855c83",
"g": "1d9e4b26a824022f",
"name": "Prediction End OUT",
"links": [
"d8842a92a68f0e27"
],
- "x": 760,
- "y": 730,
- "wires": [],
- "l": true
+ "x": 685,
+ "y": 700,
+ "wires": []
},
{
"id": "e2e09ba8297e6c08",
"type": "inject",
- "z": "f9eff8535747992a",
+ "z": "bedf5b9469855c83",
"g": "1d9e4b26a824022f",
"name": "Inject",
"props": [
@@ -4456,8 +3949,8 @@
"onceDelay": 0.1,
"topic": "",
"payloadType": "date",
- "x": 160,
- "y": 850,
+ "x": 130,
+ "y": 820,
"wires": [
[
"91a14548331e78ff"
@@ -4467,17 +3960,17 @@
{
"id": "91a14548331e78ff",
"type": "function",
- "z": "f9eff8535747992a",
+ "z": "bedf5b9469855c83",
"g": "1d9e4b26a824022f",
"name": "Fake HypeTrain End",
- "func": "msg.payload ={\n \"subscription\": {\n \"id\": \"f1c2a387-161a-49f9-a165-0f21d7a4e1c4\",\n \"type\": \"channel.hype_train.end\",\n \"version\": \"1\",\n \"status\": \"enabled\",\n \"cost\": 0,\n \"condition\": {\n \"broadcaster_user_id\": \"1337\"\n },\n \"transport\": {\n \"method\": \"webhook\",\n \"callback\": \"https://example.com/webhooks/callback\"\n },\n \"created_at\": \"2019-11-16T10:11:12.123Z\"\n },\n \"event\": {\n \"id\": \"1b0AsbInCHZW2SQFQkCzqN07Ib2\",\n \"broadcaster_user_id\": \"1337\",\n \"broadcaster_user_login\": \"cool_user\",\n \"broadcaster_user_name\": \"Cool_User\",\n \"level\": 2,\n \"total\": 137,\n \"top_contributions\": [\n { \"user_id\": \"123\", \"user_login\": \"pogchamp\", \"user_name\": \"PogChamp\", \"type\": \"bits\", \"total\": 50 },\n { \"user_id\": \"456\", \"user_login\": \"kappa\", \"user_name\": \"Kappa\", \"type\": \"subscription\", \"total\": 45 }\n ],\n \"started_at\": \"2020-07-15T17:16:03.17106713Z\",\n \"ended_at\": \"2020-07-15T17:16:11.17106713Z\",\n \"cooldown_ends_at\": \"2020-07-15T18:16:11.17106713Z\"\n }\n}\n\nreturn msg;",
+ "func": "msg.payload ={\n \"subscription\": {\n \"id\": \"f1c2a387-161a-49f9-a165-0f21d7a4e1c4\",\n \"type\": \"channel.hype_train.end\",\n \"version\": \"1\",\n \"status\": \"enabled\",\n \"cost\": 0,\n \"condition\": {\n \"broadcaster_user_id\": \"564492369\"\n },\n \"transport\": {\n \"method\": \"webhook\",\n \"callback\": \"https://example.com/webhooks/callback\"\n },\n \"created_at\": \"2019-11-16T10:11:12.123Z\"\n },\n \"event\": {\n \"id\": \"1b0AsbInCHZW2SQFQkCzqN07Ib2\",\n \"broadcaster_user_id\": \"564492369\",\n \"broadcaster_user_login\": \"ioodyme\",\n \"broadcaster_user_name\": \"ioodyme\",\n \"level\": 2,\n \"total\": 137,\n \"top_contributions\": [\n { \"user_id\": \"123\", \"user_login\": \"pogchamp\", \"user_name\": \"PogChamp\", \"type\": \"bits\", \"total\": 50 },\n { \"user_id\": \"456\", \"user_login\": \"kappa\", \"user_name\": \"Kappa\", \"type\": \"subscription\", \"total\": 45 }\n ],\n \"started_at\": \"2020-07-15T17:16:03.17106713Z\",\n \"ended_at\": \"2020-07-15T17:16:11.17106713Z\",\n \"cooldown_ends_at\": \"2020-07-15T18:16:11.17106713Z\"\n }\n}\n\nreturn msg;",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
- "x": 360,
- "y": 850,
+ "x": 330,
+ "y": 820,
"wires": [
[
"c46892d6233c5391"
@@ -4487,21 +3980,20 @@
{
"id": "74a51ad373778ee6",
"type": "link out",
- "z": "f9eff8535747992a",
+ "z": "bedf5b9469855c83",
"g": "1d9e4b26a824022f",
"name": "HypeTrain End OUT",
"links": [
"c22851c0379367b6"
],
- "x": 760,
- "y": 850,
- "wires": [],
- "l": true
+ "x": 685,
+ "y": 820,
+ "wires": []
},
{
"id": "cb0ba07aa871111a",
"type": "inject",
- "z": "f9eff8535747992a",
+ "z": "bedf5b9469855c83",
"g": "1d9e4b26a824022f",
"name": "Inject",
"props": [
@@ -4519,8 +4011,8 @@
"onceDelay": 0.1,
"topic": "",
"payloadType": "date",
- "x": 160,
- "y": 890,
+ "x": 130,
+ "y": 860,
"wires": [
[
"e8239ae110070f53"
@@ -4530,17 +4022,17 @@
{
"id": "e8239ae110070f53",
"type": "function",
- "z": "f9eff8535747992a",
+ "z": "bedf5b9469855c83",
"g": "1d9e4b26a824022f",
"name": "Fake Stream Online",
- "func": "msg.payload ={\n \"subscription\": {\n \"id\": \"f1c2a387-161a-49f9-a165-0f21d7a4e1c4\",\n \"type\": \"stream.online\",\n \"version\": \"1\",\n \"status\": \"enabled\",\n \"cost\": 0,\n \"condition\": {\n \"broadcaster_user_id\": \"1337\"\n },\n \"transport\": {\n \"method\": \"webhook\",\n \"callback\": \"https://example.com/webhooks/callback\"\n },\n \"created_at\": \"2019-11-16T10:11:12.123Z\"\n },\n \"event\": {\n \"id\": \"9001\",\n \"broadcaster_user_id\": \"1337\",\n \"broadcaster_user_login\": \"cool_user\",\n \"broadcaster_user_name\": \"Cool_User\",\n \"type\": \"live\",\n \"started_at\": \"2020-10-11T10:11:12.123Z\"\n }\n}\n\nreturn msg;",
+ "func": "msg.payload ={\n \"subscription\": {\n \"id\": \"f1c2a387-161a-49f9-a165-0f21d7a4e1c4\",\n \"type\": \"stream.online\",\n \"version\": \"1\",\n \"status\": \"enabled\",\n \"cost\": 0,\n \"condition\": {\n \"broadcaster_user_id\": \"564492369\"\n },\n \"transport\": {\n \"method\": \"webhook\",\n \"callback\": \"https://example.com/webhooks/callback\"\n },\n \"created_at\": \"2019-11-16T10:11:12.123Z\"\n },\n \"event\": {\n \"id\": \"9001\",\n \"broadcaster_user_id\": \"564492369\",\n \"broadcaster_user_login\": \"ioodyme\",\n \"broadcaster_user_name\": \"ioodyme\",\n \"type\": \"live\",\n \"started_at\": \"2020-10-11T10:11:12.123Z\"\n }\n}\n\nreturn msg;",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
- "x": 360,
- "y": 890,
+ "x": 330,
+ "y": 860,
"wires": [
[
"c46892d6233c5391"
@@ -4550,21 +4042,21 @@
{
"id": "104b71d90f13b9fa",
"type": "link out",
- "z": "f9eff8535747992a",
+ "z": "bedf5b9469855c83",
"g": "1d9e4b26a824022f",
"name": "Stream Online OUT",
+ "mode": "link",
"links": [
- "444252717fbfd856"
+ "97fecabe81f273fd"
],
- "x": 750,
- "y": 890,
- "wires": [],
- "l": true
+ "x": 685,
+ "y": 860,
+ "wires": []
},
{
"id": "3b489bf1f69ab04e",
"type": "inject",
- "z": "f9eff8535747992a",
+ "z": "bedf5b9469855c83",
"g": "1d9e4b26a824022f",
"name": "Inject",
"props": [
@@ -4582,8 +4074,8 @@
"onceDelay": 0.1,
"topic": "",
"payloadType": "date",
- "x": 160,
- "y": 810,
+ "x": 130,
+ "y": 780,
"wires": [
[
"e158862b2ad9e355"
@@ -4593,17 +4085,17 @@
{
"id": "e158862b2ad9e355",
"type": "function",
- "z": "f9eff8535747992a",
+ "z": "bedf5b9469855c83",
"g": "1d9e4b26a824022f",
"name": "Fake HypeTrainProgress",
- "func": "msg.payload ={\n \"subscription\": {\n \"id\": \"f1c2a387-161a-49f9-a165-0f21d7a4e1c4\",\n \"type\": \"channel.hype_train.progress\",\n \"version\": \"1\",\n \"status\": \"enabled\",\n \"cost\": 0,\n \"condition\": {\n \"broadcaster_user_id\": \"1337\"\n },\n \"transport\": {\n \"method\": \"webhook\",\n \"callback\": \"https://example.com/webhooks/callback\"\n },\n \"created_at\": \"2019-11-16T10:11:12.123Z\"\n },\n \"event\": {\n \"id\": \"1b0AsbInCHZW2SQFQkCzqN07Ib2\",\n \"broadcaster_user_id\": \"1337\",\n \"broadcaster_user_login\": \"cool_user\",\n \"broadcaster_user_name\": \"Cool_User\",\n \"level\": 2,\n \"total\": 700,\n \"progress\": 200,\n \"goal\": 1000,\n \"top_contributions\": [\n { \"user_id\": \"123\", \"user_login\": \"pogchamp\", \"user_name\": \"PogChamp\", \"type\": \"bits\", \"total\": 50 },\n { \"user_id\": \"456\", \"user_login\": \"kappa\", \"user_name\": \"Kappa\", \"type\": \"subscription\", \"total\": 45 }\n ],\n \"last_contribution\": { \"user_id\": \"123\", \"user_login\": \"pogchamp\", \"user_name\": \"PogChamp\", \"type\": \"bits\", \"total\": 50 },\n \"started_at\": \"2020-07-15T17:16:03.17106713Z\",\n \"expires_at\": \"2020-07-15T17:16:11.17106713Z\"\n }\n}\n\nreturn msg;",
+ "func": "msg.payload ={\n \"subscription\": {\n \"id\": \"f1c2a387-161a-49f9-a165-0f21d7a4e1c4\",\n \"type\": \"channel.hype_train.progress\",\n \"version\": \"1\",\n \"status\": \"enabled\",\n \"cost\": 0,\n \"condition\": {\n \"broadcaster_user_id\": \"564492369\"\n },\n \"transport\": {\n \"method\": \"webhook\",\n \"callback\": \"https://example.com/webhooks/callback\"\n },\n \"created_at\": \"2019-11-16T10:11:12.123Z\"\n },\n \"event\": {\n \"id\": \"1b0AsbInCHZW2SQFQkCzqN07Ib2\",\n \"broadcaster_user_id\": \"564492369\",\n \"broadcaster_user_login\": \"ioodyme\",\n \"broadcaster_user_name\": \"ioodyme\",\n \"level\": 2,\n \"total\": 700,\n \"progress\": 200,\n \"goal\": 1000,\n \"top_contributions\": [\n { \"user_id\": \"123\", \"user_login\": \"pogchamp\", \"user_name\": \"PogChamp\", \"type\": \"bits\", \"total\": 50 },\n { \"user_id\": \"456\", \"user_login\": \"kappa\", \"user_name\": \"Kappa\", \"type\": \"subscription\", \"total\": 45 }\n ],\n \"last_contribution\": { \"user_id\": \"123\", \"user_login\": \"pogchamp\", \"user_name\": \"PogChamp\", \"type\": \"bits\", \"total\": 50 },\n \"started_at\": \"2020-07-15T17:16:03.17106713Z\",\n \"expires_at\": \"2020-07-15T17:16:11.17106713Z\"\n }\n}\n\nreturn msg;",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
- "x": 370,
- "y": 810,
+ "x": 340,
+ "y": 780,
"wires": [
[
"c46892d6233c5391"
@@ -4613,21 +4105,20 @@
{
"id": "a3ee39814135cad2",
"type": "link out",
- "z": "f9eff8535747992a",
+ "z": "bedf5b9469855c83",
"g": "1d9e4b26a824022f",
"name": "HypeTrain Progress OUT",
"links": [
"1d7fb21bf35a91b8"
],
- "x": 770,
- "y": 810,
- "wires": [],
- "l": true
+ "x": 685,
+ "y": 780,
+ "wires": []
},
{
"id": "4309ad73534e365c",
"type": "inject",
- "z": "f9eff8535747992a",
+ "z": "bedf5b9469855c83",
"g": "1d9e4b26a824022f",
"name": "Inject",
"props": [
@@ -4645,8 +4136,8 @@
"onceDelay": 0.1,
"topic": "",
"payloadType": "date",
- "x": 160,
- "y": 930,
+ "x": 130,
+ "y": 900,
"wires": [
[
"2e435c1be18bebf7"
@@ -4656,17 +4147,17 @@
{
"id": "2e435c1be18bebf7",
"type": "function",
- "z": "f9eff8535747992a",
+ "z": "bedf5b9469855c83",
"g": "1d9e4b26a824022f",
"name": "Fake Stream Offline",
- "func": "msg.payload ={\n \"subscription\": {\n \"id\": \"f1c2a387-161a-49f9-a165-0f21d7a4e1c4\",\n \"type\": \"stream.offline\",\n \"version\": \"1\",\n \"status\": \"enabled\",\n \"cost\": 0,\n \"condition\": {\n \"broadcaster_user_id\": \"1337\"\n },\n \"created_at\": \"2019-11-16T10:11:12.123Z\",\n \"transport\": {\n \"method\": \"webhook\",\n \"callback\": \"https://example.com/webhooks/callback\"\n }\n },\n \"event\": {\n \"broadcaster_user_id\": \"1337\",\n \"broadcaster_user_login\": \"cool_user\",\n \"broadcaster_user_name\": \"Cool_User\"\n }\n}\n\nreturn msg;",
+ "func": "msg.payload ={\n \"subscription\": {\n \"id\": \"f1c2a387-161a-49f9-a165-0f21d7a4e1c4\",\n \"type\": \"stream.offline\",\n \"version\": \"1\",\n \"status\": \"enabled\",\n \"cost\": 0,\n \"condition\": {\n \"broadcaster_user_id\": \"564492369\"\n },\n \"created_at\": \"2019-11-16T10:11:12.123Z\",\n \"transport\": {\n \"method\": \"webhook\",\n \"callback\": \"https://example.com/webhooks/callback\"\n }\n },\n \"event\": {\n \"broadcaster_user_id\": \"564492369\",\n \"broadcaster_user_login\": \"ioodyme\",\n \"broadcaster_user_name\": \"ioodyme\"\n }\n}\n\nreturn msg;",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
- "x": 360,
- "y": 930,
+ "x": 330,
+ "y": 900,
"wires": [
[
"c46892d6233c5391"
@@ -4676,21 +4167,21 @@
{
"id": "07c0971dd23dd62d",
"type": "link out",
- "z": "f9eff8535747992a",
+ "z": "bedf5b9469855c83",
"g": "1d9e4b26a824022f",
"name": "Stream Offline OUT",
+ "mode": "link",
"links": [
- "cd7537381dac4350"
+ "63c02972795b5176"
],
- "x": 750,
- "y": 930,
- "wires": [],
- "l": true
+ "x": 685,
+ "y": 900,
+ "wires": []
},
{
"id": "59dac292ac05e5d8",
"type": "inject",
- "z": "f9eff8535747992a",
+ "z": "bedf5b9469855c83",
"g": "1d9e4b26a824022f",
"name": "Inject",
"props": [
@@ -4708,8 +4199,8 @@
"onceDelay": 0.1,
"topic": "",
"payloadType": "date",
- "x": 160,
- "y": 570,
+ "x": 130,
+ "y": 540,
"wires": [
[
"9cae1c4a7541c723"
@@ -4719,17 +4210,17 @@
{
"id": "9cae1c4a7541c723",
"type": "function",
- "z": "f9eff8535747992a",
+ "z": "bedf5b9469855c83",
"g": "1d9e4b26a824022f",
"name": "Fake Poll Progress",
- "func": "msg.payload ={\n \"subscription\": {\n \"id\": \"f1c2a387-161a-49f9-a165-0f21d7a4e1c4\",\n \"type\": \"channel.poll.progress\",\n \"version\": \"1\",\n \"status\": \"enabled\",\n \"cost\": 0,\n \"condition\": {\n \"broadcaster_user_id\": \"1337\"\n },\n \"transport\": {\n \"method\": \"webhook\",\n \"callback\": \"https://example.com/webhooks/callback\"\n },\n \"created_at\": \"2019-11-16T10:11:12.123Z\"\n },\n \"event\": {\n \"id\": \"1243456\",\n \"broadcaster_user_id\": \"1337\",\n \"broadcaster_user_login\": \"cool_user\",\n \"broadcaster_user_name\": \"Cool_User\",\n \"title\": \"Aren’t shoes just really hard socks?\",\n \"choices\": [\n {\"id\": \"123\", \"title\": \"Yeah!\", \"bits_votes\": 5, \"channel_points_votes\": 7, \"votes\": 12},\n {\"id\": \"124\", \"title\": \"No!\", \"bits_votes\": 10, \"channel_points_votes\": 4, \"votes\": 14},\n {\"id\": \"125\", \"title\": \"Maybe!\", \"bits_votes\": 0, \"channel_points_votes\": 7, \"votes\": 7}\n ],\n \"bits_voting\": {\n \"is_enabled\": true,\n \"amount_per_vote\": 10\n },\n \"channel_points_voting\": {\n \"is_enabled\": true,\n \"amount_per_vote\": 10\n },\n \"started_at\": \"2020-07-15T17:16:03.17106713Z\",\n \"ends_at\": \"2020-07-15T17:16:08.17106713Z\"\n }\n}\n\nreturn msg;",
+ "func": "msg.payload ={\n \"subscription\": {\n \"id\": \"f1c2a387-161a-49f9-a165-0f21d7a4e1c4\",\n \"type\": \"channel.poll.progress\",\n \"version\": \"1\",\n \"status\": \"enabled\",\n \"cost\": 0,\n \"condition\": {\n \"broadcaster_user_id\": \"564492369\"\n },\n \"transport\": {\n \"method\": \"webhook\",\n \"callback\": \"https://example.com/webhooks/callback\"\n },\n \"created_at\": \"2019-11-16T10:11:12.123Z\"\n },\n \"event\": {\n \"id\": \"1243456\",\n \"broadcaster_user_id\": \"564492369\",\n \"broadcaster_user_login\": \"ioodyme\",\n \"broadcaster_user_name\": \"ioodyme\",\n \"title\": \"Aren’t shoes just really hard socks?\",\n \"choices\": [\n {\"id\": \"123\", \"title\": \"Yeah!\", \"bits_votes\": 5, \"channel_points_votes\": 7, \"votes\": 12},\n {\"id\": \"124\", \"title\": \"No!\", \"bits_votes\": 10, \"channel_points_votes\": 4, \"votes\": 14},\n {\"id\": \"125\", \"title\": \"Maybe!\", \"bits_votes\": 0, \"channel_points_votes\": 7, \"votes\": 7}\n ],\n \"bits_voting\": {\n \"is_enabled\": true,\n \"amount_per_vote\": 10\n },\n \"channel_points_voting\": {\n \"is_enabled\": true,\n \"amount_per_vote\": 10\n },\n \"started_at\": \"2020-07-15T17:16:03.17106713Z\",\n \"ends_at\": \"2020-07-15T17:16:08.17106713Z\"\n }\n}\n\nreturn msg;",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
- "x": 350,
- "y": 570,
+ "x": 320,
+ "y": 540,
"wires": [
[
"c46892d6233c5391"
@@ -4739,35 +4230,33 @@
{
"id": "52f26835eeca107c",
"type": "link out",
- "z": "f9eff8535747992a",
+ "z": "bedf5b9469855c83",
"g": "1d9e4b26a824022f",
"name": "Poll Progress OUT",
"links": [
"013eac261f7f830a"
],
- "x": 750,
- "y": 570,
- "wires": [],
- "l": true
+ "x": 685,
+ "y": 540,
+ "wires": []
},
{
"id": "03c5d3303b39046e",
"type": "link out",
- "z": "f9eff8535747992a",
+ "z": "bedf5b9469855c83",
"g": "1d9e4b26a824022f",
"name": "Prediction Progress OUT",
"links": [
"58059205d3b59963"
],
- "x": 770,
- "y": 690,
- "wires": [],
- "l": true
+ "x": 685,
+ "y": 660,
+ "wires": []
},
{
"id": "8fe676f729352bd3",
"type": "inject",
- "z": "f9eff8535747992a",
+ "z": "bedf5b9469855c83",
"g": "1d9e4b26a824022f",
"name": "Inject",
"props": [
@@ -4785,8 +4274,8 @@
"onceDelay": 0.1,
"topic": "",
"payloadType": "date",
- "x": 160,
- "y": 690,
+ "x": 130,
+ "y": 660,
"wires": [
[
"870a89265d2adf1d"
@@ -4796,17 +4285,17 @@
{
"id": "870a89265d2adf1d",
"type": "function",
- "z": "f9eff8535747992a",
+ "z": "bedf5b9469855c83",
"g": "1d9e4b26a824022f",
"name": "Fake Prediction progress",
- "func": "msg.payload ={\n \"subscription\": {\n \"id\": \"f1c2a387-161a-49f9-a165-0f21d7a4e1c4\",\n \"type\": \"channel.prediction.progress\",\n \"version\": \"1\",\n \"status\": \"enabled\",\n \"cost\": 0,\n \"condition\": {\n \"broadcaster_user_id\": \"1337\"\n },\n \"transport\": {\n \"method\": \"webhook\",\n \"callback\": \"https://example.com/webhooks/callback\"\n },\n \"created_at\": \"2019-11-16T10:11:12.123Z\"\n },\n \"event\": {\n \"id\": \"1243456\",\n \"broadcaster_user_id\": \"1337\",\n \"broadcaster_user_login\": \"cool_user\",\n \"broadcaster_user_name\": \"Cool_User\",\n \"title\": \"Aren’t shoes just really hard socks?\",\n \"outcomes\": [\n {\n \"id\": \"1243456\",\n \"title\": \"Yeah!\",\n \"color\": \"blue\",\n \"users\": 10,\n \"channel_points\": 15000,\n \"top_predictors\": [ // contains up to 10 users\n {\n \"user_name\": \"Cool_User\",\n \"user_login\": \"cool_user\",\n \"user_id\": \"1234\",\n \"channel_points_won\": null,\n \"channel_points_used\": 500\n },\n {\n \"user_name\": \"Coolest_User\",\n \"user_login\": \"coolest_user\",\n \"user_id\": \"1236\",\n \"channel_points_won\": null,\n \"channel_points_used\": 200\n }\n ]\n },\n {\n \"id\": \"2243456\",\n \"title\": \"No!\",\n \"color\": \"pink\",\n \"top_predictors\": [ // contains up to 10 users\n {\n \"user_name\": \"Cooler_User\",\n \"user_login\": \"cooler_user\",\n \"user_id\": 12345,\n \"channel_points_won\": null,\n \"channel_points_used\": 5000\n }\n ]\n },\n ],\n \"started_at\": \"2020-07-15T17:16:03.17106713Z\",\n \"locks_at\": \"2020-07-15T17:21:03.17106713Z\"\n }\n}\nreturn msg;",
+ "func": "msg.payload ={\n \"subscription\": {\n \"id\": \"f1c2a387-161a-49f9-a165-0f21d7a4e1c4\",\n \"type\": \"channel.prediction.progress\",\n \"version\": \"1\",\n \"status\": \"enabled\",\n \"cost\": 0,\n \"condition\": {\n \"broadcaster_user_id\": \"564492369\"\n },\n \"transport\": {\n \"method\": \"webhook\",\n \"callback\": \"https://example.com/webhooks/callback\"\n },\n \"created_at\": \"2019-11-16T10:11:12.123Z\"\n },\n \"event\": {\n \"id\": \"1243456\",\n \"broadcaster_user_id\": \"564492369\",\n \"broadcaster_user_login\": \"ioodyme\",\n \"broadcaster_user_name\": \"ioodyme\",\n \"title\": \"Aren’t shoes just really hard socks?\",\n \"outcomes\": [\n {\n \"id\": \"1243456\",\n \"title\": \"Yeah!\",\n \"color\": \"blue\",\n \"users\": 10,\n \"channel_points\": 15000,\n \"top_predictors\": [ // contains up to 10 users\n {\n \"user_name\": \"Cool_User\",\n \"user_login\": \"cool_user\",\n \"user_id\": \"1234\",\n \"channel_points_won\": null,\n \"channel_points_used\": 500\n },\n {\n \"user_name\": \"Coolest_User\",\n \"user_login\": \"coolest_user\",\n \"user_id\": \"1236\",\n \"channel_points_won\": null,\n \"channel_points_used\": 200\n }\n ]\n },\n {\n \"id\": \"2243456\",\n \"title\": \"No!\",\n \"color\": \"pink\",\n \"top_predictors\": [ // contains up to 10 users\n {\n \"user_name\": \"Cooler_User\",\n \"user_login\": \"cooler_user\",\n \"user_id\": 12345,\n \"channel_points_won\": null,\n \"channel_points_used\": 5000\n }\n ]\n },\n ],\n \"started_at\": \"2020-07-15T17:16:03.17106713Z\",\n \"locks_at\": \"2020-07-15T17:21:03.17106713Z\"\n }\n}\nreturn msg;",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
- "x": 370,
- "y": 690,
+ "x": 340,
+ "y": 660,
"wires": [
[
"c46892d6233c5391"
@@ -4814,51 +4303,429 @@
]
},
{
- "id": "d7df12800dd78f6e",
+ "id": "8a0b93500015be22",
+ "type": "debug",
+ "z": "bedf5b9469855c83",
+ "g": "1d9e4b26a824022f",
+ "name": "",
+ "active": false,
+ "tosidebar": true,
+ "console": false,
+ "tostatus": false,
+ "complete": "payload",
+ "targetType": "msg",
+ "statusVal": "",
+ "statusType": "auto",
+ "x": 530,
+ "y": 60,
+ "wires": []
+ },
+ {
+ "id": "7098c94cefad6f46",
"type": "function",
- "z": "f9eff8535747992a",
- "name": "Stream Online",
- "func": "const broadcaster = msg.payload.event.broadcaster_user_name;\nconst start = msg.payload.event.started_at;\n\nglobal.set(\"STREAMON\", true);\n\nreturn [{payload : broadcaster}, {payload : start}];",
+ "z": "bedf5b9469855c83",
+ "g": "c3a384b88e4aae92",
+ "name": "Channel Update",
+ "func": "const broadcaster = msg.payload.event.broadcaster_user_name;\nconst title = msg.payload.event.title;\nconst category = msg.payload.event.category_name;\n\nreturn [{payload: broadcaster}, {payload : title}, {payload : category}];",
+ "outputs": 3,
+ "noerr": 0,
+ "initialize": "",
+ "finalize": "",
+ "libs": [],
+ "x": 920,
+ "y": 70,
+ "wires": [
+ [
+ "d8d1f2dfc5c946e8"
+ ],
+ [
+ "d8d1f2dfc5c946e8"
+ ],
+ [
+ "d8d1f2dfc5c946e8"
+ ]
+ ],
+ "outputLabels": [
+ "Broadcaster",
+ "Title",
+ "Category"
+ ]
+ },
+ {
+ "id": "3c5392d536a6758c",
+ "type": "link in",
+ "z": "bedf5b9469855c83",
+ "g": "c3a384b88e4aae92",
+ "name": "Channel Update",
+ "links": [
+ "d1c64ebc8a5feec9"
+ ],
+ "x": 795,
+ "y": 70,
+ "wires": [
+ [
+ "7098c94cefad6f46"
+ ]
+ ]
+ },
+ {
+ "id": "d8d1f2dfc5c946e8",
+ "type": "debug",
+ "z": "bedf5b9469855c83",
+ "g": "c3a384b88e4aae92",
+ "name": "",
+ "active": true,
+ "tosidebar": true,
+ "console": false,
+ "tostatus": false,
+ "complete": "false",
+ "statusVal": "",
+ "statusType": "auto",
+ "x": 1100,
+ "y": 70,
+ "wires": []
+ },
+ {
+ "id": "e3fdefc8024d75a1",
+ "type": "link in",
+ "z": "bedf5b9469855c83",
+ "g": "c3a384b88e4aae92",
+ "name": "Follower",
+ "links": [
+ "099c35a256887f74"
+ ],
+ "x": 795,
+ "y": 120,
+ "wires": [
+ [
+ "781d8b6ea144560b"
+ ]
+ ]
+ },
+ {
+ "id": "781d8b6ea144560b",
+ "type": "function",
+ "z": "bedf5b9469855c83",
+ "g": "c3a384b88e4aae92",
+ "name": "Follower",
+ "func": "const username = msg.payload.event.user_name;\n\nreturn [{payload : username}];",
+ "outputs": 1,
+ "noerr": 0,
+ "initialize": "",
+ "finalize": "",
+ "libs": [],
+ "x": 900,
+ "y": 120,
+ "wires": [
+ [
+ "44c07fb9fc35c75c"
+ ]
+ ],
+ "outputLabels": [
+ "Follower Username"
+ ]
+ },
+ {
+ "id": "46a3a69959ede421",
+ "type": "link in",
+ "z": "bedf5b9469855c83",
+ "g": "c3a384b88e4aae92",
+ "name": "Subscriber",
+ "links": [
+ "35d2b6f068729230"
+ ],
+ "x": 795,
+ "y": 160,
+ "wires": [
+ [
+ "0706fa919a2b66b7"
+ ]
+ ]
+ },
+ {
+ "id": "0706fa919a2b66b7",
+ "type": "function",
+ "z": "bedf5b9469855c83",
+ "g": "c3a384b88e4aae92",
+ "name": "Subscriber",
+ "func": "const username = msg.payload.event.user_name;\nconst tier = parseInt(msg.payload.event.tier)/1000;\n\nreturn [{payload : username}, {payload : tier}];\n",
"outputs": 2,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
- "x": 670,
- "y": 1050,
+ "x": 910,
+ "y": 160,
"wires": [
[
- "3a9f2efc21945060"
+ "13aa39ce93155d90"
],
[
- "3a9f2efc21945060"
+ "13aa39ce93155d90"
+ ]
+ ],
+ "outputLabels": [
+ "Subscriber Username",
+ "Tier"
+ ]
+ },
+ {
+ "id": "13aa39ce93155d90",
+ "type": "debug",
+ "z": "bedf5b9469855c83",
+ "g": "c3a384b88e4aae92",
+ "name": "",
+ "active": true,
+ "tosidebar": true,
+ "console": false,
+ "tostatus": false,
+ "complete": "false",
+ "statusVal": "",
+ "statusType": "auto",
+ "x": 1100,
+ "y": 160,
+ "wires": []
+ },
+ {
+ "id": "22b9bd03717a6092",
+ "type": "function",
+ "z": "bedf5b9469855c83",
+ "g": "c3a384b88e4aae92",
+ "name": "SubGift",
+ "func": "const username = msg.payload.event.user_name;\nconst tier = parseInt(msg.payload.event.tier)/1000;\n\nreturn [{payload : username}, {payload : tier}];\n",
+ "outputs": 2,
+ "noerr": 0,
+ "initialize": "",
+ "finalize": "",
+ "libs": [],
+ "x": 900,
+ "y": 200,
+ "wires": [
+ [
+ "c9bd7b1cdbdaca88"
+ ],
+ [
+ "c9bd7b1cdbdaca88"
+ ]
+ ],
+ "outputLabels": [
+ "Subscriber Username",
+ "Tier"
+ ]
+ },
+ {
+ "id": "bc942504e9d6822a",
+ "type": "link in",
+ "z": "bedf5b9469855c83",
+ "g": "c3a384b88e4aae92",
+ "name": "SubGift",
+ "links": [
+ "66db194703a62045"
+ ],
+ "x": 795,
+ "y": 200,
+ "wires": [
+ [
+ "22b9bd03717a6092"
+ ]
+ ]
+ },
+ {
+ "id": "c9bd7b1cdbdaca88",
+ "type": "debug",
+ "z": "bedf5b9469855c83",
+ "g": "c3a384b88e4aae92",
+ "name": "",
+ "active": true,
+ "tosidebar": true,
+ "console": false,
+ "tostatus": false,
+ "complete": "false",
+ "statusVal": "",
+ "statusType": "auto",
+ "x": 1100,
+ "y": 200,
+ "wires": []
+ },
+ {
+ "id": "2e12e6b6e53b0967",
+ "type": "function",
+ "z": "bedf5b9469855c83",
+ "g": "c3a384b88e4aae92",
+ "name": "Sub Mesage",
+ "func": "const username = msg.payload.event.user_name;\nconst tier = parseInt(msg.payload.event.tier)/1000;\nconst message = msg.payload.event.message.text;\n\nreturn [{payload : username}, {payload : tier}, {payload : message}];",
+ "outputs": 3,
+ "noerr": 0,
+ "initialize": "",
+ "finalize": "",
+ "libs": [],
+ "x": 910,
+ "y": 250,
+ "wires": [
+ [
+ "c4cd0c41321ef3bd"
+ ],
+ [
+ "c4cd0c41321ef3bd"
+ ],
+ [
+ "c4cd0c41321ef3bd"
+ ]
+ ],
+ "outputLabels": [
+ "Subscriber Username",
+ "Tier",
+ "Message"
+ ]
+ },
+ {
+ "id": "f436b7331bd9609b",
+ "type": "link in",
+ "z": "bedf5b9469855c83",
+ "g": "c3a384b88e4aae92",
+ "name": "Sub Message",
+ "links": [
+ "7008cac6ebd21511"
+ ],
+ "x": 795,
+ "y": 250,
+ "wires": [
+ [
+ "2e12e6b6e53b0967"
+ ]
+ ]
+ },
+ {
+ "id": "c4cd0c41321ef3bd",
+ "type": "debug",
+ "z": "bedf5b9469855c83",
+ "g": "c3a384b88e4aae92",
+ "name": "",
+ "active": true,
+ "tosidebar": true,
+ "console": false,
+ "tostatus": false,
+ "complete": "false",
+ "statusVal": "",
+ "statusType": "auto",
+ "x": 1100,
+ "y": 250,
+ "wires": []
+ },
+ {
+ "id": "4c49467a35df9851",
+ "type": "function",
+ "z": "bedf5b9469855c83",
+ "g": "c3a384b88e4aae92",
+ "name": "Bits",
+ "func": "const username = msg.payload.event.user_name;\nconst bits = msg.payload.event.bits;\nconst message = msg.payload.event.message;\n\nreturn [{payload : username}, {payload : bits}, {payload : message}];",
+ "outputs": 3,
+ "noerr": 0,
+ "initialize": "",
+ "finalize": "",
+ "libs": [],
+ "x": 890,
+ "y": 310,
+ "wires": [
+ [
+ "ca9267f59495a61e"
+ ],
+ [
+ "ca9267f59495a61e"
+ ],
+ [
+ "ca9267f59495a61e"
+ ]
+ ],
+ "outputLabels": [
+ "Username",
+ "Bits",
+ "Message"
+ ]
+ },
+ {
+ "id": "674ee05d36a01381",
+ "type": "link in",
+ "z": "bedf5b9469855c83",
+ "g": "c3a384b88e4aae92",
+ "name": "Bits",
+ "links": [
+ "e1ed82cfe4ac1c7b"
+ ],
+ "x": 795,
+ "y": 310,
+ "wires": [
+ [
+ "4c49467a35df9851"
+ ]
+ ]
+ },
+ {
+ "id": "ca9267f59495a61e",
+ "type": "debug",
+ "z": "bedf5b9469855c83",
+ "g": "c3a384b88e4aae92",
+ "name": "",
+ "active": true,
+ "tosidebar": true,
+ "console": false,
+ "tostatus": false,
+ "complete": "false",
+ "statusVal": "",
+ "statusType": "auto",
+ "x": 1100,
+ "y": 310,
+ "wires": []
+ },
+ {
+ "id": "c282f7bbe2ea94a6",
+ "type": "function",
+ "z": "bedf5b9469855c83",
+ "g": "c3a384b88e4aae92",
+ "name": "Raid",
+ "func": "const username = msg.payload.event.from_broadcaster_user_name;\nconst viewers = msg.payload.event.viewers;\n\nreturn[{payload : username}, {payload : viewers}];",
+ "outputs": 2,
+ "noerr": 0,
+ "initialize": "",
+ "finalize": "",
+ "libs": [],
+ "x": 890,
+ "y": 360,
+ "wires": [
+ [
+ "0e8b1da7d78d9e04"
+ ],
+ [
+ "0e8b1da7d78d9e04"
]
],
"outputLabels": [
"Broadcaster Username",
- "Started at"
+ "Viewers"
]
},
{
- "id": "444252717fbfd856",
+ "id": "6c6457495d5b73d4",
"type": "link in",
- "z": "f9eff8535747992a",
- "name": "Channel Update",
+ "z": "bedf5b9469855c83",
+ "g": "c3a384b88e4aae92",
+ "name": "Raid",
"links": [
- "104b71d90f13b9fa"
+ "8e64834c2e4ab9c6"
],
- "x": 545,
- "y": 1050,
+ "x": 795,
+ "y": 360,
"wires": [
[
- "d7df12800dd78f6e"
+ "c282f7bbe2ea94a6"
]
]
},
{
- "id": "3a9f2efc21945060",
+ "id": "0e8b1da7d78d9e04",
"type": "debug",
- "z": "f9eff8535747992a",
+ "z": "bedf5b9469855c83",
+ "g": "c3a384b88e4aae92",
"name": "",
"active": true,
"tosidebar": true,
@@ -4867,52 +4734,71 @@
"complete": "false",
"statusVal": "",
"statusType": "auto",
- "x": 850,
- "y": 1050,
+ "x": 1100,
+ "y": 360,
"wires": []
},
{
- "id": "14323d28693e9d72",
+ "id": "216bb963f207e682",
"type": "function",
- "z": "f9eff8535747992a",
- "name": "Stream Offline",
- "func": "const broadcaster = msg.payload.event.broadcaster_user_name;\n\nglobal.set(\"STREAMON\", false);\n\nreturn [{payload : broadcaster}];",
- "outputs": 1,
+ "z": "bedf5b9469855c83",
+ "g": "c3a384b88e4aae92",
+ "name": "Ban",
+ "func": "const username = msg.payload.event.user_name;\nconst moderator = msg.payload.event.moderator_user_name;\nconst reason = msg.payload.event.reason;\nconst end = msg.payload.event.ends_at;\nconst permanent = msg.payload.event.is_permanent;\n\nreturn [{payload : username},{payload : moderator},{payload : reason}, {payload : end},{payload : permanent}];",
+ "outputs": 5,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
- "x": 670,
- "y": 1090,
+ "x": 890,
+ "y": 420,
"wires": [
[
- "56a3e8c2387e3365"
+ "d1e21ddc83cc908f"
+ ],
+ [
+ "d1e21ddc83cc908f"
+ ],
+ [
+ "d1e21ddc83cc908f"
+ ],
+ [
+ "d1e21ddc83cc908f"
+ ],
+ [
+ "d1e21ddc83cc908f"
]
],
"outputLabels": [
- "Broadcaster Username"
+ "Banned User",
+ "Moderator",
+ "Reason",
+ "End date",
+ "Permanent"
]
},
{
- "id": "cd7537381dac4350",
+ "id": "46a44352c8d66e56",
"type": "link in",
- "z": "f9eff8535747992a",
- "name": "Channel Update",
+ "z": "bedf5b9469855c83",
+ "g": "c3a384b88e4aae92",
+ "name": "Ban",
"links": [
- "07c0971dd23dd62d"
+ "3e4196fcfe60dd91"
],
- "x": 545,
- "y": 1090,
+ "x": 795,
+ "y": 420,
"wires": [
[
- "14323d28693e9d72"
+ "216bb963f207e682"
]
]
},
{
- "id": "56a3e8c2387e3365",
+ "id": "d1e21ddc83cc908f",
"type": "debug",
- "z": "f9eff8535747992a",
+ "z": "bedf5b9469855c83",
+ "g": "c3a384b88e4aae92",
"name": "",
"active": true,
"tosidebar": true,
@@ -4921,28 +4807,867 @@
"complete": "false",
"statusVal": "",
"statusType": "auto",
- "x": 850,
- "y": 1090,
+ "x": 1100,
+ "y": 420,
"wires": []
},
{
- "id": "080a52db4f5eebc3",
+ "id": "b7796720760df4ca",
"type": "function",
- "z": "7c36e6b244586b90",
- "g": "fcc735a31613ba0b",
- "name": "Response ?",
- "func": "if (msg.payload == \"\") {\n msg.payload = \"Unsubscription successful\";\n}\nreturn msg;",
+ "z": "bedf5b9469855c83",
+ "g": "c3a384b88e4aae92",
+ "name": "Unban",
+ "func": "const username = msg.payload.event.user_name;\nconst moderator = msg.payload.event.moderator_user_name;\n\nreturn [{payload : username}, {payload : moderator}];",
+ "outputs": 2,
+ "noerr": 0,
+ "initialize": "",
+ "finalize": "",
+ "libs": [],
+ "x": 890,
+ "y": 480,
+ "wires": [
+ [
+ "2a80b4bcb77e25b1"
+ ],
+ [
+ "2a80b4bcb77e25b1"
+ ]
+ ],
+ "outputLabels": [
+ "Banned User",
+ "Moderator"
+ ]
+ },
+ {
+ "id": "e7138cd2dc73b8c0",
+ "type": "link in",
+ "z": "bedf5b9469855c83",
+ "g": "c3a384b88e4aae92",
+ "name": "Unban",
+ "links": [
+ "ec063c27cbdff5bc"
+ ],
+ "x": 795,
+ "y": 480,
+ "wires": [
+ [
+ "b7796720760df4ca"
+ ]
+ ]
+ },
+ {
+ "id": "2a80b4bcb77e25b1",
+ "type": "debug",
+ "z": "bedf5b9469855c83",
+ "g": "c3a384b88e4aae92",
+ "name": "",
+ "active": true,
+ "tosidebar": true,
+ "console": false,
+ "tostatus": false,
+ "complete": "false",
+ "statusVal": "",
+ "statusType": "auto",
+ "x": 1100,
+ "y": 480,
+ "wires": []
+ },
+ {
+ "id": "3ee0a398d56ce81b",
+ "type": "function",
+ "z": "bedf5b9469855c83",
+ "g": "c3a384b88e4aae92",
+ "name": "Channel Point",
+ "func": "const username = msg.payload.event.user_name;\nconst message = msg.payload.event.user_input;\nconst title = msg.payload.event.reward.title;\nconst prompt = msg.payload.event.reward.prompt;\nconst cost = msg.payload.event.reward.cost;\n\nreturn [{payload : username}, {payload : message}, {payload : title}, {payload : prompt}, {payload : cost}];",
+ "outputs": 5,
+ "noerr": 0,
+ "initialize": "",
+ "finalize": "",
+ "libs": [],
+ "x": 920,
+ "y": 540,
+ "wires": [
+ [
+ "bb15db95da85594b"
+ ],
+ [
+ "bb15db95da85594b"
+ ],
+ [
+ "bb15db95da85594b"
+ ],
+ [
+ "bb15db95da85594b"
+ ],
+ [
+ "bb15db95da85594b"
+ ]
+ ],
+ "outputLabels": [
+ "Username",
+ "Message",
+ "Title",
+ "Prompt",
+ "Cost"
+ ]
+ },
+ {
+ "id": "2720e13c28d5f2a6",
+ "type": "link in",
+ "z": "bedf5b9469855c83",
+ "g": "c3a384b88e4aae92",
+ "name": "Channel Points",
+ "links": [
+ "b97c23ba88296b1b"
+ ],
+ "x": 795,
+ "y": 540,
+ "wires": [
+ [
+ "3ee0a398d56ce81b"
+ ]
+ ]
+ },
+ {
+ "id": "bb15db95da85594b",
+ "type": "debug",
+ "z": "bedf5b9469855c83",
+ "g": "c3a384b88e4aae92",
+ "name": "",
+ "active": true,
+ "tosidebar": true,
+ "console": false,
+ "tostatus": false,
+ "complete": "false",
+ "statusVal": "",
+ "statusType": "auto",
+ "x": 1100,
+ "y": 540,
+ "wires": []
+ },
+ {
+ "id": "f23b95398eaa0fb5",
+ "type": "function",
+ "z": "bedf5b9469855c83",
+ "g": "c3a384b88e4aae92",
+ "name": "Poll Begin",
+ "func": "const title = msg.payload.event.title;\nconst choices = msg.payload.event.choices;\nconst end = msg.payload.event.ends_at;\n\nreturn [{payload : title}, {payload : choices}, {payload : end}];",
+ "outputs": 3,
+ "noerr": 0,
+ "initialize": "",
+ "finalize": "",
+ "libs": [],
+ "x": 900,
+ "y": 610,
+ "wires": [
+ [
+ "0a6403e990465b45"
+ ],
+ [
+ "0a6403e990465b45"
+ ],
+ [
+ "0a6403e990465b45"
+ ]
+ ],
+ "outputLabels": [
+ "Title",
+ "Choices",
+ "End"
+ ]
+ },
+ {
+ "id": "c977fc48940eaa1f",
+ "type": "link in",
+ "z": "bedf5b9469855c83",
+ "g": "c3a384b88e4aae92",
+ "name": "Poll Begin",
+ "links": [
+ "f71de6f3f45ab546"
+ ],
+ "x": 795,
+ "y": 610,
+ "wires": [
+ [
+ "f23b95398eaa0fb5"
+ ]
+ ]
+ },
+ {
+ "id": "0a6403e990465b45",
+ "type": "debug",
+ "z": "bedf5b9469855c83",
+ "g": "c3a384b88e4aae92",
+ "name": "",
+ "active": true,
+ "tosidebar": true,
+ "console": false,
+ "tostatus": false,
+ "complete": "false",
+ "statusVal": "",
+ "statusType": "auto",
+ "x": 1100,
+ "y": 610,
+ "wires": []
+ },
+ {
+ "id": "e66321b5eebb9e62",
+ "type": "function",
+ "z": "bedf5b9469855c83",
+ "g": "c3a384b88e4aae92",
+ "name": "Poll Progress",
+ "func": "const title = msg.payload.event.title;\nconst choices = msg.payload.event.choices;\nconst end = msg.payload.event.ends_at;\n\nreturn [{payload : title}, {payload : choices}, {payload : end}];",
+ "outputs": 3,
+ "noerr": 0,
+ "initialize": "",
+ "finalize": "",
+ "libs": [],
+ "x": 910,
+ "y": 660,
+ "wires": [
+ [
+ "82982a94bf2f96e5"
+ ],
+ [
+ "82982a94bf2f96e5"
+ ],
+ [
+ "82982a94bf2f96e5"
+ ]
+ ],
+ "outputLabels": [
+ "Title",
+ "Choices",
+ "End"
+ ]
+ },
+ {
+ "id": "013eac261f7f830a",
+ "type": "link in",
+ "z": "bedf5b9469855c83",
+ "g": "c3a384b88e4aae92",
+ "name": "Poll Progress",
+ "links": [
+ "52f26835eeca107c"
+ ],
+ "x": 795,
+ "y": 660,
+ "wires": [
+ [
+ "e66321b5eebb9e62"
+ ]
+ ]
+ },
+ {
+ "id": "82982a94bf2f96e5",
+ "type": "debug",
+ "z": "bedf5b9469855c83",
+ "g": "c3a384b88e4aae92",
+ "name": "",
+ "active": true,
+ "tosidebar": true,
+ "console": false,
+ "tostatus": false,
+ "complete": "false",
+ "statusVal": "",
+ "statusType": "auto",
+ "x": 1100,
+ "y": 660,
+ "wires": []
+ },
+ {
+ "id": "7822bd853ff32202",
+ "type": "function",
+ "z": "bedf5b9469855c83",
+ "g": "c3a384b88e4aae92",
+ "name": "Poll End",
+ "func": "const title = msg.payload.event.title;\nconst choices = msg.payload.event.choices;\n\nreturn [{payload : title}, {payload : choices}];",
+ "outputs": 2,
+ "noerr": 0,
+ "initialize": "",
+ "finalize": "",
+ "libs": [],
+ "x": 900,
+ "y": 710,
+ "wires": [
+ [
+ "e3a2b757bc7b4f00"
+ ],
+ [
+ "e3a2b757bc7b4f00"
+ ]
+ ],
+ "outputLabels": [
+ "Title",
+ "Choices"
+ ]
+ },
+ {
+ "id": "440ca17ff1420dfe",
+ "type": "link in",
+ "z": "bedf5b9469855c83",
+ "g": "c3a384b88e4aae92",
+ "name": "Poll End",
+ "links": [
+ "90d9f9f778dfea84"
+ ],
+ "x": 795,
+ "y": 710,
+ "wires": [
+ [
+ "7822bd853ff32202"
+ ]
+ ]
+ },
+ {
+ "id": "e3a2b757bc7b4f00",
+ "type": "debug",
+ "z": "bedf5b9469855c83",
+ "g": "c3a384b88e4aae92",
+ "name": "",
+ "active": true,
+ "tosidebar": true,
+ "console": false,
+ "tostatus": false,
+ "complete": "false",
+ "statusVal": "",
+ "statusType": "auto",
+ "x": 1100,
+ "y": 710,
+ "wires": []
+ },
+ {
+ "id": "bf777e01107c8dad",
+ "type": "function",
+ "z": "bedf5b9469855c83",
+ "g": "c3a384b88e4aae92",
+ "name": "Prediction Begin",
+ "func": "const title = msg.payload.event.title;\nconst outcomes = msg.payload.event.outcomes;\nconst end = msg.payload.event.locks_at;\n\nreturn [{payload : title}, {payload : outcomes}, {payload : end}];",
+ "outputs": 3,
+ "noerr": 0,
+ "initialize": "",
+ "finalize": "",
+ "libs": [],
+ "x": 920,
+ "y": 760,
+ "wires": [
+ [
+ "cf8eb778297937fe"
+ ],
+ [
+ "cf8eb778297937fe"
+ ],
+ [
+ "cf8eb778297937fe"
+ ]
+ ],
+ "outputLabels": [
+ "Title",
+ "Outcomes",
+ "End"
+ ]
+ },
+ {
+ "id": "02eff79de54243df",
+ "type": "link in",
+ "z": "bedf5b9469855c83",
+ "g": "c3a384b88e4aae92",
+ "name": "Prediction Begin",
+ "links": [
+ "956b7e15e56e3e6e"
+ ],
+ "x": 795,
+ "y": 760,
+ "wires": [
+ [
+ "bf777e01107c8dad"
+ ]
+ ]
+ },
+ {
+ "id": "cf8eb778297937fe",
+ "type": "debug",
+ "z": "bedf5b9469855c83",
+ "g": "c3a384b88e4aae92",
+ "name": "",
+ "active": true,
+ "tosidebar": true,
+ "console": false,
+ "tostatus": false,
+ "complete": "false",
+ "statusVal": "",
+ "statusType": "auto",
+ "x": 1100,
+ "y": 770,
+ "wires": []
+ },
+ {
+ "id": "31b7edc241da122b",
+ "type": "function",
+ "z": "bedf5b9469855c83",
+ "g": "c3a384b88e4aae92",
+ "name": "Prediction Progress",
+ "func": "const title = msg.payload.event.title;\nconst outcomes = msg.payload.event.outcomes;\nconst end = msg.payload.event.locks_at;\n\nreturn [{payload : title}, {payload : outcomes}, {payload : end}];",
+ "outputs": 3,
+ "noerr": 0,
+ "initialize": "",
+ "finalize": "",
+ "libs": [],
+ "x": 930,
+ "y": 820,
+ "wires": [
+ [
+ "d3ae76bd5a99fe61"
+ ],
+ [
+ "d3ae76bd5a99fe61"
+ ],
+ [
+ "d3ae76bd5a99fe61"
+ ]
+ ],
+ "outputLabels": [
+ "Title",
+ "Outcomes",
+ "End"
+ ]
+ },
+ {
+ "id": "58059205d3b59963",
+ "type": "link in",
+ "z": "bedf5b9469855c83",
+ "g": "c3a384b88e4aae92",
+ "name": "Prediction Progress",
+ "links": [
+ "03c5d3303b39046e"
+ ],
+ "x": 795,
+ "y": 820,
+ "wires": [
+ [
+ "31b7edc241da122b"
+ ]
+ ]
+ },
+ {
+ "id": "d3ae76bd5a99fe61",
+ "type": "debug",
+ "z": "bedf5b9469855c83",
+ "g": "c3a384b88e4aae92",
+ "name": "",
+ "active": true,
+ "tosidebar": true,
+ "console": false,
+ "tostatus": false,
+ "complete": "false",
+ "statusVal": "",
+ "statusType": "auto",
+ "x": 1110,
+ "y": 820,
+ "wires": []
+ },
+ {
+ "id": "4ce638dd76c24bdb",
+ "type": "function",
+ "z": "bedf5b9469855c83",
+ "g": "c3a384b88e4aae92",
+ "name": "Prediction End",
+ "func": "const title = msg.payload.event.title;\nconst outcomes = msg.payload.event.outcomes;\n\nreturn [{payload : title}, {payload : outcomes}];",
+ "outputs": 2,
+ "noerr": 0,
+ "initialize": "",
+ "finalize": "",
+ "libs": [],
+ "x": 920,
+ "y": 870,
+ "wires": [
+ [
+ "9438739a0d42032a"
+ ],
+ [
+ "9438739a0d42032a"
+ ]
+ ],
+ "outputLabels": [
+ "Title",
+ "Outcomes"
+ ]
+ },
+ {
+ "id": "d8842a92a68f0e27",
+ "type": "link in",
+ "z": "bedf5b9469855c83",
+ "g": "c3a384b88e4aae92",
+ "name": "Prediction End",
+ "links": [
+ "8b358c8a79eba44f"
+ ],
+ "x": 795,
+ "y": 870,
+ "wires": [
+ [
+ "4ce638dd76c24bdb"
+ ]
+ ]
+ },
+ {
+ "id": "9438739a0d42032a",
+ "type": "debug",
+ "z": "bedf5b9469855c83",
+ "g": "c3a384b88e4aae92",
+ "name": "",
+ "active": true,
+ "tosidebar": true,
+ "console": false,
+ "tostatus": false,
+ "complete": "false",
+ "statusVal": "",
+ "statusType": "auto",
+ "x": 1100,
+ "y": 870,
+ "wires": []
+ },
+ {
+ "id": "ba962cb706960ca3",
+ "type": "function",
+ "z": "bedf5b9469855c83",
+ "g": "c3a384b88e4aae92",
+ "name": "HypeTrain Begin",
+ "func": "const total = msg.payload.event.total;\nconst progress = msg.payload.event.progress;\nconst goal = msg.payload.event.goal;\nconst top_contrib = msg.payload.event.top_contributions;\nconst last_contrib = msg.payload.event.last_contribution;\n\nreturn [{payload : total}, {payload : progress}, {payload : goal}, {payload : top_contrib}, {payload : last_contrib}];",
+ "outputs": 5,
+ "noerr": 0,
+ "initialize": "",
+ "finalize": "",
+ "libs": [],
+ "x": 930,
+ "y": 930,
+ "wires": [
+ [
+ "bcf41039c5488aa0"
+ ],
+ [
+ "bcf41039c5488aa0"
+ ],
+ [
+ "bcf41039c5488aa0"
+ ],
+ [
+ "bcf41039c5488aa0"
+ ],
+ [
+ "bcf41039c5488aa0"
+ ]
+ ],
+ "outputLabels": [
+ "Total",
+ "Progress",
+ "Goal",
+ "Top contrib",
+ "Last contrib"
+ ]
+ },
+ {
+ "id": "3445992ddf31cb4e",
+ "type": "link in",
+ "z": "bedf5b9469855c83",
+ "g": "c3a384b88e4aae92",
+ "name": "HypeTrain Begin",
+ "links": [
+ "aa03c725061760dd"
+ ],
+ "x": 795,
+ "y": 930,
+ "wires": [
+ [
+ "ba962cb706960ca3"
+ ]
+ ]
+ },
+ {
+ "id": "bcf41039c5488aa0",
+ "type": "debug",
+ "z": "bedf5b9469855c83",
+ "g": "c3a384b88e4aae92",
+ "name": "",
+ "active": true,
+ "tosidebar": true,
+ "console": false,
+ "tostatus": false,
+ "complete": "false",
+ "statusVal": "",
+ "statusType": "auto",
+ "x": 1120,
+ "y": 930,
+ "wires": []
+ },
+ {
+ "id": "2082c62be84dcf16",
+ "type": "function",
+ "z": "bedf5b9469855c83",
+ "g": "c3a384b88e4aae92",
+ "name": "HypeTrain Progress",
+ "func": "const level = msg.payload.event.level;\nconst total = msg.payload.event.total;\nconst progress = msg.payload.event.progress;\nconst goal = msg.payload.event.goal;\nconst top_contrib = msg.payload.event.top_contributions;\nconst last_contrib = msg.payload.event.last_contribution;\n\nreturn [{payload : level}, {payload : total}, {payload : progress}, {payload : goal}, {payload : top_contrib}, {payload : last_contrib}];",
+ "outputs": 6,
+ "noerr": 0,
+ "initialize": "",
+ "finalize": "",
+ "libs": [],
+ "x": 940,
+ "y": 1020,
+ "wires": [
+ [
+ "9f32750213a4f0c6"
+ ],
+ [
+ "9f32750213a4f0c6"
+ ],
+ [
+ "9f32750213a4f0c6"
+ ],
+ [
+ "9f32750213a4f0c6"
+ ],
+ [
+ "9f32750213a4f0c6"
+ ],
+ [
+ "9f32750213a4f0c6"
+ ]
+ ],
+ "outputLabels": [
+ "Level",
+ "Total",
+ "Progress",
+ "Goal",
+ "Top contrib",
+ "Last contrib"
+ ]
+ },
+ {
+ "id": "1d7fb21bf35a91b8",
+ "type": "link in",
+ "z": "bedf5b9469855c83",
+ "g": "c3a384b88e4aae92",
+ "name": "HypeTrain Progress",
+ "links": [
+ "a3ee39814135cad2"
+ ],
+ "x": 795,
+ "y": 1020,
+ "wires": [
+ [
+ "2082c62be84dcf16"
+ ]
+ ]
+ },
+ {
+ "id": "9f32750213a4f0c6",
+ "type": "debug",
+ "z": "bedf5b9469855c83",
+ "g": "c3a384b88e4aae92",
+ "name": "",
+ "active": true,
+ "tosidebar": true,
+ "console": false,
+ "tostatus": false,
+ "complete": "false",
+ "statusVal": "",
+ "statusType": "auto",
+ "x": 1150,
+ "y": 1020,
+ "wires": []
+ },
+ {
+ "id": "65537eb9b8bb35b8",
+ "type": "function",
+ "z": "bedf5b9469855c83",
+ "g": "c3a384b88e4aae92",
+ "name": "HyperTrain End",
+ "func": "const level = msg.payload.event.level;\nconst total = msg.payload.event.total;\nconst top_contrib = msg.payload.event.top_contributions;\n\nreturn [{payload : level}, {payload : total}, {payload : top_contrib}];",
+ "outputs": 3,
+ "noerr": 0,
+ "initialize": "",
+ "finalize": "",
+ "libs": [],
+ "x": 920,
+ "y": 1100,
+ "wires": [
+ [
+ "df791e577307e9f7"
+ ],
+ [
+ "df791e577307e9f7"
+ ],
+ [
+ "df791e577307e9f7"
+ ]
+ ],
+ "outputLabels": [
+ "Level",
+ "Total",
+ "Top contrib"
+ ]
+ },
+ {
+ "id": "c22851c0379367b6",
+ "type": "link in",
+ "z": "bedf5b9469855c83",
+ "g": "c3a384b88e4aae92",
+ "name": "HypeTrain End",
+ "links": [
+ "74a51ad373778ee6"
+ ],
+ "x": 795,
+ "y": 1100,
+ "wires": [
+ [
+ "65537eb9b8bb35b8"
+ ]
+ ]
+ },
+ {
+ "id": "df791e577307e9f7",
+ "type": "debug",
+ "z": "bedf5b9469855c83",
+ "g": "c3a384b88e4aae92",
+ "name": "",
+ "active": true,
+ "tosidebar": true,
+ "console": false,
+ "tostatus": false,
+ "complete": "false",
+ "statusVal": "",
+ "statusType": "auto",
+ "x": 1120,
+ "y": 1100,
+ "wires": []
+ },
+ {
+ "id": "44c07fb9fc35c75c",
+ "type": "debug",
+ "z": "bedf5b9469855c83",
+ "g": "c3a384b88e4aae92",
+ "name": "",
+ "active": true,
+ "tosidebar": true,
+ "console": false,
+ "tostatus": false,
+ "complete": "false",
+ "statusVal": "",
+ "statusType": "auto",
+ "x": 1100,
+ "y": 120,
+ "wires": []
+ },
+ {
+ "id": "b30cfc59e8cbe783",
+ "type": "function",
+ "z": "bedf5b9469855c83",
+ "g": "c3a384b88e4aae92",
+ "name": "Stream Online",
+ "func": "const broadcaster = msg.payload.event.broadcaster_user_login;\nconst type = msg.payload.event.type;\n\nreturn [{ payload: broadcaster }, { payload: type }];",
+ "outputs": 2,
+ "noerr": 0,
+ "initialize": "",
+ "finalize": "",
+ "libs": [],
+ "x": 920,
+ "y": 1150,
+ "wires": [
+ [
+ "4f2895be0123f5f4"
+ ],
+ [
+ "4f2895be0123f5f4"
+ ]
+ ]
+ },
+ {
+ "id": "97fecabe81f273fd",
+ "type": "link in",
+ "z": "bedf5b9469855c83",
+ "g": "c3a384b88e4aae92",
+ "name": "Stream Online",
+ "links": [
+ "104b71d90f13b9fa"
+ ],
+ "x": 795,
+ "y": 1150,
+ "wires": [
+ [
+ "b30cfc59e8cbe783"
+ ]
+ ]
+ },
+ {
+ "id": "4f2895be0123f5f4",
+ "type": "debug",
+ "z": "bedf5b9469855c83",
+ "g": "c3a384b88e4aae92",
+ "name": "",
+ "active": true,
+ "tosidebar": true,
+ "console": false,
+ "tostatus": false,
+ "complete": "false",
+ "statusVal": "",
+ "statusType": "auto",
+ "x": 1120,
+ "y": 1150,
+ "wires": []
+ },
+ {
+ "id": "63c02972795b5176",
+ "type": "link in",
+ "z": "bedf5b9469855c83",
+ "g": "c3a384b88e4aae92",
+ "name": "Stream Offline",
+ "links": [
+ "07c0971dd23dd62d"
+ ],
+ "x": 795,
+ "y": 1200,
+ "wires": [
+ [
+ "e3d6d7b46a2d2955"
+ ]
+ ]
+ },
+ {
+ "id": "e3d6d7b46a2d2955",
+ "type": "function",
+ "z": "bedf5b9469855c83",
+ "g": "c3a384b88e4aae92",
+ "name": "Stream Offline",
+ "func": "const broadcaster = msg.payload.event.broadcaster_user_login;\n\nreturn [{ payload: broadcaster }];",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
- "x": 710,
- "y": 760,
+ "x": 920,
+ "y": 1200,
"wires": [
[
- "09e4fce23bf14ad4"
+ "aa6229c18fc2ac6d"
]
]
+ },
+ {
+ "id": "aa6229c18fc2ac6d",
+ "type": "debug",
+ "z": "bedf5b9469855c83",
+ "g": "c3a384b88e4aae92",
+ "name": "",
+ "active": true,
+ "tosidebar": true,
+ "console": false,
+ "tostatus": false,
+ "complete": "false",
+ "statusVal": "",
+ "statusType": "auto",
+ "x": 1120,
+ "y": 1200,
+ "wires": []
}
]