main
BurnyLlama 2022-06-01 12:44:09 +02:00
parent 274375b3e0
commit 1cff39932c
1 changed files with 2 additions and 2 deletions

View File

@ -8,8 +8,8 @@ if (!fs.existsSync("./ip.cache")) fs.writeFileSync("./ip.cache", "")
const log = getLogger("IP Watcher", settings.checkers["ip-changed"].color)
const getIp = async () => await publicIp.v4({ onlyHttps: true })
const currentIp = await getIp().replace(/\s/g, "")
const cachedOldIp = fs.readFileSync("./ip.cache").toString()
const currentIp = await getIp()
const cachedOldIp = fs.readFileSync("./ip.cache").toString().replace(/\s/g, "")
let oldIp = cachedOldIp ? cachedOldIp : currentIp
async function checkIp(sendMessage) {