【发布时间】:2021-04-27 04:55:26
【问题描述】:
我正在尝试连接到 twitch chat-irc websockets,但是当我运行我的代码进行测试时,它返回 .temp:7:尝试调用 nil。我听说它必须与函数有关,但我的代码没有函数,只有字符串,并且只有 2 行连接到第 7 行。有人知道如何解决这个问题吗?
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")
【问题讨论】:
标签: lua computercraft