simple-helix-api
Advanced tools
Comparing version 3.1.0 to 3.1.1
@@ -70,3 +70,10 @@ "use strict"; | ||
const data = JSON.parse(message.data); | ||
this.events.emit(data.payload.subscription.type, data.payload.event); | ||
switch (data.metadata.message_type) { | ||
case "notification": { | ||
return this.events.emit(data.metadata.subscription_type, data.payload?.event); | ||
} | ||
default: { | ||
return this.events.emit(data.metadata.message_type, data.payload); | ||
} | ||
} | ||
}; | ||
@@ -73,0 +80,0 @@ return this; |
{ | ||
"name": "simple-helix-api", | ||
"version": "3.1.0", | ||
"version": "3.1.1", | ||
"description": "The Simple Helix API allows developers to easily develop applications for Twitch", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
@@ -130,2 +130,3 @@ # About | ||
const HelixAPI = require("simple-helix-api"); // you can use import | ||
const EventSubEvent = require("simple-helix-api/dist/lib/eventsub/event"); | ||
@@ -132,0 +133,0 @@ // Init Helix instance |
83021
1941
164