diff --git a/modules/checkers/ip-changed.js b/modules/checkers/ip-changed.js index 16b052b..26e1c14 100644 --- a/modules/checkers/ip-changed.js +++ b/modules/checkers/ip-changed.js @@ -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) {