mirror of
https://codeberg.org/StreamGraph/StreamGraph.git
synced 2024-11-13 19:49:55 +01:00
store last message data in twitch chat received node
This commit is contained in:
parent
0b907a7716
commit
2bd48d993b
1 changed files with 36 additions and 11 deletions
|
@ -1,5 +1,10 @@
|
||||||
extends DeckNode
|
extends DeckNode
|
||||||
|
|
||||||
|
var username := ""
|
||||||
|
var message := ""
|
||||||
|
var channel := ""
|
||||||
|
var tags := {}
|
||||||
|
|
||||||
|
|
||||||
func _init():
|
func _init():
|
||||||
name = "Twitch Chat Received"
|
name = "Twitch Chat Received"
|
||||||
|
@ -12,6 +17,11 @@ func _init():
|
||||||
add_output_port(DeckType.Types.STRING, "Channel")
|
add_output_port(DeckType.Types.STRING, "Channel")
|
||||||
add_output_port(DeckType.Types.DICTIONARY, "Tags")
|
add_output_port(DeckType.Types.DICTIONARY, "Tags")
|
||||||
|
|
||||||
|
add_output_port(
|
||||||
|
DeckType.Types.BOOL,
|
||||||
|
"On receive"
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
func _event_received(event_name : StringName, event_data : Dictionary = {}):
|
func _event_received(event_name : StringName, event_data : Dictionary = {}):
|
||||||
|
@ -21,8 +31,23 @@ func _event_received(event_name : StringName, event_data : Dictionary = {}):
|
||||||
return
|
return
|
||||||
|
|
||||||
|
|
||||||
send(0, event_data.username)
|
username = event_data.username
|
||||||
send(1, event_data.message)
|
message = event_data.message
|
||||||
send(2, event_data.channel)
|
channel = event_data.channel
|
||||||
send(3, event_data)
|
tags = event_data
|
||||||
|
|
||||||
|
send(4, true)
|
||||||
|
|
||||||
|
|
||||||
|
func _value_request(on_port: int) -> Variant:
|
||||||
|
match on_port:
|
||||||
|
0:
|
||||||
|
return username
|
||||||
|
1:
|
||||||
|
return message
|
||||||
|
2:
|
||||||
|
return channel
|
||||||
|
3:
|
||||||
|
return tags
|
||||||
|
_:
|
||||||
|
return null
|
||||||
|
|
Loading…
Reference in a new issue