diff --git a/classes/deck/nodes/twitch/twitch_eventsub_event.gd b/classes/deck/nodes/twitch/twitch_eventsub_event.gd index 2b34a0d..671ec65 100644 --- a/classes/deck/nodes/twitch/twitch_eventsub_event.gd +++ b/classes/deck/nodes/twitch/twitch_eventsub_event.gd @@ -3,6 +3,7 @@ # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) extends DeckNode +var cached_event_data : Dictionary func _init(): name = "Twitch EventSub Event" @@ -29,6 +30,7 @@ func _event_received(event_name: StringName, event_data: Dictionary = {}): var port_0 = await resolve_input_port_value_async(0) + print("Event Name ", event_data) if port_0 == null or port_0 != event_data.payload.subscription.type: return @@ -36,6 +38,17 @@ func _event_received(event_name: StringName, event_data: Dictionary = {}): # Sends to indicate that the specified event has happened. send(0, null) -# Sends the data along as well as the fact that the event happened +# Sends the data along as well as the fact that the event happened. While also caching the event data for later access + cached_event_data = event_data send(1, event_data) + +func _value_request(port): + + if port != 1: + + return + + + return cached_event_data +