miggor-StreamGraph/classes/deck/nodes/twitch/twitch_join_chat.gd
Lera Elvoé f57374f3e2 add send id system (#75)
addresses https://codeberg.org/StreamGraph/StreamGraph/issues/59#issuecomment-1572604

Reviewed-on: https://codeberg.org/StreamGraph/StreamGraph/pulls/75
Co-authored-by: Lera Elvoé <yagich@poto.cafe>
Co-committed-by: Lera Elvoé <yagich@poto.cafe>
2024-02-22 07:23:25 +00:00

30 lines
686 B
GDScript

# (c) 2023-present Eroax
# (c) 2023-present Yagich
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
extends DeckNode
func _init():
name = "Twitch Join Chat"
node_type = name.to_snake_case()
description = "Joins a Twitch channel."
props_to_serialize = []
# Adds Input port for channel name
add_input_port(DeckType.Types.STRING, "Channel", "field")
# Adds Trigger for leaving the specified channel
add_input_port(DeckType.Types.ANY, "Join Channel", "button")
func _receive(to_input_port, _data: Variant):
if to_input_port != 1:
return
Connections.twitch.join_channel(await resolve_input_port_value_async(0))