Oops.
This commit is contained in:
parent
274375b3e0
commit
1cff39932c
|
@ -8,8 +8,8 @@ if (!fs.existsSync("./ip.cache")) fs.writeFileSync("./ip.cache", "")
|
||||||
const log = getLogger("IP Watcher", settings.checkers["ip-changed"].color)
|
const log = getLogger("IP Watcher", settings.checkers["ip-changed"].color)
|
||||||
const getIp = async () => await publicIp.v4({ onlyHttps: true })
|
const getIp = async () => await publicIp.v4({ onlyHttps: true })
|
||||||
|
|
||||||
const currentIp = await getIp().replace(/\s/g, "")
|
const currentIp = await getIp()
|
||||||
const cachedOldIp = fs.readFileSync("./ip.cache").toString()
|
const cachedOldIp = fs.readFileSync("./ip.cache").toString().replace(/\s/g, "")
|
||||||
let oldIp = cachedOldIp ? cachedOldIp : currentIp
|
let oldIp = cachedOldIp ? cachedOldIp : currentIp
|
||||||
|
|
||||||
async function checkIp(sendMessage) {
|
async function checkIp(sendMessage) {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user