miggor-StreamGraph/classes/deck/nodes/twitch_chat_received.gd
Eroax c071e4d644 TWITCH INTEGRATION (#13)
Implemented a basic Twitch Connection, + Twitch Receive Chat and Twitch Send Chat

Co-authored-by: Eroax <eroaxe.business@gmail.com>
Reviewed-on: https://codeberg.org/Eroax/StreamGraph/pulls/13
2023-12-08 09:53:06 +00:00

28 lines
644 B
GDScript

extends DeckNode
func _init():
name = "Twitch Chat Received"
node_type = "twitch_chat_received"
description = "Receives Twitch Chat Events from a Twitch Connection"
category = "twitch"
add_output_port(DeckType.Types.STRING, "Username")
add_output_port(DeckType.Types.STRING, "Message")
add_output_port(DeckType.Types.STRING, "Channel")
add_output_port(DeckType.Types.DICTIONARY, "Tags")
func _event_received(event_name : StringName, event_data : Dictionary = {}):
if event_name != &"twitch_chat":
return
send(0, event_data.username)
send(1, event_data.message)
send(2, event_data.channel)
send(3, event_data)