Hi im trying to make a game for twitch chat to play from scratch and I cant seem to get it to connect, please help, heres the code:
extends Node
onready var tcpClient = StreamPeerTCP.new()
onready var has_connected = false
const CLIENT_PASS = ‘’
const CLIENT_NICK = ‘sirgladshoes’
Called when the node enters the scene tree for the first time.
func _ready():
set_process(true)
tcpClient
_connect()
func _process(delta):
print(tcpClient.get_available_bytes())
if tcpClient.get_status() == 2 and !has_connected:
_connect_to_channel()
func _connect():
print(“connecting…”)
var err = tcpClient.connect_to_host(“irc.chat.twitch.tv”, 6697)
print(err)
func _connect_to_channel():
print(“sending data”)
has_connected = true