I'm trying to connect to the twitch chat-irc websockets, but when I run my code to test, it returns .temp:7: attempt to call nil. I've heard that it has to do something with functions, but my code has no functions, only strings, and has only 2 other lines that connect to line 7. Anyone have an idea of how to fix this?
local Channel = *my channel*
local Name = *Bot account name*
local Pass = *oauth code*
local cum = "wss://irc-ws.chat.twitch.tv:443"
local ws = http.websocket(cum)
if ws then
print("Connection Established")
websocket.send("PASS " ..Pass .."\r\n")
websocket.send("NICK " ..Name .."\r\n")
websocket.send("Join " ..Channel .."\r\n")