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