mirror of
https://codeberg.org/StreamGraph/StreamGraph.git
synced 2024-11-13 19:49:55 +01:00
30 lines
821 B
GDScript
30 lines
821 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 Leave Chat"
|
|
node_type = name.to_snake_case()
|
|
description = "Simple node to send a premade 'leave' message to Twitch IRC. Allowing you to leave the specified channel and stop receiving from it."
|
|
|
|
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, "Leave Channel", "button")
|
|
|
|
|
|
|
|
func _receive(to_input_port, data: Variant, extra_data: Array = []):
|
|
|
|
if to_input_port != 1:
|
|
|
|
return
|
|
|
|
|
|
Connections.twitch.leave_channel(await resolve_input_port_value_async(0))
|
|
|