Version 1.8

This commit is contained in:
OTCv8
2020-01-10 02:29:15 +01:00
parent 2a10e65ec0
commit 26c347d2bc
38 changed files with 531 additions and 792 deletions

View File

@@ -3,6 +3,7 @@ local context = G.botContext
context.BotServer = {}
context.BotServer.url = "ws://bot.otclient.ovh:8000/"
context.BotServer.timeout = 3
context.BotServer.ping = 0
context.BotServer._callbacks = {}
context.BotServer._lastMessageId = 0
context.BotServer._wasConnected = true -- show first warning
@@ -24,6 +25,7 @@ context.BotServer.init = function(name, channel)
end
context.BotServer._wasConnected = true
if message["type"] == "ping" then
context.BotServer.ping = message["ping"]
return context.BotServer._websocket.send({type="ping"})
end
if message["type"] == "message" then