CallPlugin functionality added.

master
AardCrowley 2 years ago committed by GitHub
parent 4c49eaac0e
commit 4811b64f00
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -52,7 +52,7 @@ for _,v in ipairs(triggerLines) do
ImportXML(triggerXML) ImportXML(triggerXML)
end end
chatID = <your chat ID> chatID = <your chat id>
apiToken = "<your bot token>" apiToken = "<your bot token>"
@ -69,10 +69,10 @@ function url_encode(str)
return str return str
end end
function pageRequest(req, protocol) function pageRequest(req)
local req = string.format(alertFormat, req) local req = string.format(alertFormat, url.escape(req))
if async_ok then if async_ok then
async.doAsyncRemoteRequest(req, "", protocol) async.doAsyncRemoteRequest(req, "", "HTTPS")
else else
ColourNote("white", "blue", "Async failed to load for some reason.") ColourNote("white", "blue", "Async failed to load for some reason.")
end end
@ -90,7 +90,7 @@ function sendAlert(name, line, wildcards)
else else
msg = "Test notification." msg = "Test notification."
end end
pageRequest(msg, "HTTPS") pageRequest(msg)
end end
function toggleConfig(name, line, wildcards) function toggleConfig(name, line, wildcards)

Loading…
Cancel
Save