abirahmad1208/Dev_Helper_X_BotPublic · Bot Template

An essential utility Telegram bot for developers to quickly encode/decode Base64, generate MD5/SHA-256 hashes, format JSON, convert text, and create instant QR codes!

Utilitydeveloper-toolsbase64encoderdecoderjson-formatterpassword-generator
ProfileTelegram
17 commands0 envUpdated 29d agoCreated Jul 20, 2026
Back to folder

commands/_onIpSuccess.js

javascript · 30 lines

Raw
1/**#command2name: *onIpSuccess3answer: 4keyboard: 5parse_mode: markdown6aliases: 7allow_only_group: false8need_reply: false9is_web: 010#command**/11 12if (content) {13  try {14    let data = JSON.parse(content);15    if (data.status === "success") {16      let ipDetails = 17        `🌐 *IP Info Details:*\n\n` +18        `🔹 *IP:* \`${data.query}\`\n` +19        `🔹 *Country:* ${data.country} (${data.countryCode})\n` +20        `🔹 *Region/City:* ${data.regionName}, ${data.city}\n` +21        `🔹 *ISP:* ${data.isp}\n` +22        `🔹 *Org:* ${data.org}`;23      Api.sendMessage({ text: ipDetails, parse_mode: "Markdown" });24    } else {25      Api.sendMessage({ text: "⚠️ *Invalid IP Address!*", parse_mode: "Markdown" });26    }27  } catch(e) {28    Api.sendMessage({ text: "⚠️ IP তথ্য লোড করতে সমস্যা হয়েছে।", parse_mode: "Markdown" });29  }30}