Flex Coder: post #1565 — TG.ME

🌐 Instant DNS record lookup for domain troubleshooting in Telegram Nothing interrupts a product launch quite like hunting down misconfigured DNS records from a mobile device. By hooking FlexGram's built-in HTTP client directly into Google's Public DNS API, you can query live domain records inside any chat without leaving Telegram. Pass the domain directly as a command parameter or let the bot prompt you interactively. 📁 Filename: dns.js 👨‍💻 Code: if (params) { sendChatAction('typing') let res = HTTP.get({ url: 'https://dns.google/resolve?name=' + params + '&type=A' }) let data = JSON.parse(res.body || '{}') let ip = data.Answer ? data.Answer[0].data : 'No A record found' sendMessage('🌐 *DNS Result for ' + params + '*\n\nIP Address: `' + ip + '`') } else { sendMessage('Type the domain name you want to query:') waitForAnswer('get_dns') } 📁 Filename: get_dns.js 👨‍💻 Code: sendChatAction('typing') let domain = message.trim().toLowerCase() let res = HTTP.get({ url: 'https://dns.google/resolve?name=' + domain + '&type=A' }) let data = JSON.parse(res.body || '{}') let ip = data.Answer ? data.Answer[0].data : 'No A record found' sendMessage('🌐 *DNS Result for ' + domain + '*\n\nIP Address: `' + ip + '`') clearWait() 💡 You can expand the query string to request MX, TXT, or CNAME records dynamically based on user needs. ⚠️ Note: Google DNS API requires no authorization keys or external environment configuration. #FlexGram

August 12, 2026 168 4