mirror of
https://codeberg.org/StreamGraph/StreamGraph.git
synced 2024-11-13 19:49:55 +01:00
29 lines
644 B
GDScript3
29 lines
644 B
GDScript3
|
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)
|
||
|
|