From 0ce1c6f096e27f41359502cf575af6d051f0b54a Mon Sep 17 00:00:00 2001 From: Nauvalunesa <24031554092@mhs.unesa.ac.id> Date: Wed, 15 Jan 2025 08:57:11 +0700 Subject: [PATCH] Update index.js Add ACC ip --- index.js | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/index.js b/index.js index 1649ef56..2f502a12 100644 --- a/index.js +++ b/index.js @@ -1,3 +1,23 @@ +async function checkIP() { + try { + const allowedIPsResponse = await fetch('https://accip.nvlgroup.my.id/api/Axel/ip'); + const allowedIPs = await allowedIPsResponse.json(); + const currentIPResponse = await fetch('https://api.ipify.org?format=text'); + const currentIP = await currentIPResponse.text(); + + if (!allowedIPs.includes(currentIP)) { + console.log('❌IP Anda tidak terdaftar❌ HUBUNGI wa.me/6282114275683 ! Mematikan server...'); + process.exit(1); + } + + console.log('✅IP Anda terdaftar.'); + } catch (error) { + console.error('Gagal memeriksa IP:', error.message); + process.exit(1); + } +} + +checkIP(); (async () => { const { default: makeWASocket,