forked from VryptLab/EternityBot
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathip.js
More file actions
21 lines (19 loc) · 645 Bytes
/
Copy pathip.js
File metadata and controls
21 lines (19 loc) · 645 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
export default {
name: "ip",
category: "developer",
command: ["ip", "ipinfo"],
run: async (conn, m) => {
const ip = m.text.trim();
if (!ip) return m.reply("📡 Contoh: .ip 8.8.8.8");
const res = await fetch(`https://ipapi.co/${ip}/json/`);
const data = await res.json();
if (data.error) return m.reply("❌ IP tidak valid.");
const info = `📍 *IP Info*\n
🔢 IP: ${data.ip}
🌏 Negara: ${data.country_name} (${data.country_code})
🏙️ Kota: ${data.city || "-"}
🏢 ISP: ${data.org || "-"}
🧭 Lokasi: ${data.latitude}, ${data.longitude}`;
m.reply(info);
}
}