did stuff
This commit is contained in:
parent
ac1a6a2a91
commit
63c01d8a0e
@ -53,7 +53,7 @@ function ntfy(msg)
|
||||
http.post(getNtfyAddress(), "[" .. os.getComputerLabel() .. "] " .. msg)
|
||||
end
|
||||
|
||||
local function getTutelServer()
|
||||
local function getTutelServerAddress()
|
||||
return readFileOneline("/brulijam/config/tutelServer.txt")
|
||||
end
|
||||
|
||||
@ -64,11 +64,17 @@ end
|
||||
|
||||
--https://seals.social/minecraftapi
|
||||
function telegramNotifier(message)
|
||||
local tutelServer = getTutelServer()
|
||||
local tutelServer = getTutelServerAddress()
|
||||
local telegramInfo = getTelegramInfo()
|
||||
http.post(tutelServer .. "/telegramBot/sendMessage/" .. telegramInfo["telegramUserId"] .. "?accessToken=" .. telegramInfo["telegramUserToken"], message)
|
||||
end
|
||||
|
||||
function addTutelToTutelServer()
|
||||
local tutelServer = getTutelServerAddress()
|
||||
local telegramInfo = getTelegramInfo()
|
||||
http.post(tutelServer .. "/tutel/add?label=" .. os.getComputerLabel .. "&telegramUserId=" .. telegramInfo["telegramUserId"])
|
||||
end
|
||||
|
||||
function splitStringToArray(inputStr)
|
||||
table = {}
|
||||
i = 0
|
||||
|
Loading…
Reference in New Issue
Block a user