Marketing teams always seem to catch broken social share cards right after pushing a high-profile launch live. Instead of jumping onto a laptop and opening third-party scrapers or debugging tools, we can pipe the live metadata and image renders directly into Telegram. Using zero-import HTTP helpers and native media actions, you can test both the visual thumbnail card and raw server response headers in a couple of seconds.
๐ Filename:
command/preview.js๐จโ๐ป Code:
if (!params) return sendMessage("<b>Usage:</b> <code>/preview https://example.com</code>");
sendChatAction("upload_photo");
const res = await HTTP.get({ url: `https://api.microlink.io?url=${encodeURIComponent(params)}` });
if (!res?.data?.image?.url) return sendMessage("โ Could not extract OpenGraph metadata from that URL.");
const { title, description, image } = res.data;
sendPhoto(image.url, {
caption: `๐ <b>${title || "No title"}</b>\n\n${description || "No description"}\n\n๐ <code>${params}</code>`
});๐ Filename:
command/headers.js๐จโ๐ป Code:
if (!params) return sendMessage("<b>Usage:</b> <code>/headers https://example.com</code>");
sendChatAction("typing");
const res = await HTTP.custom({ url: params, method: "HEAD" });
const cache = res?.headers?.["cache-control"] || "none";
const server = res?.headers?.["server"] || "hidden";
const type = res?.headers?.["content-type"] || "unknown";
sendMessage(`๐ก <b>Response Headers</b>\n\nโข <b>Target:</b> <code>${params}</code>\nโข <b>Content-Type:</b> <code>${type}</code>\nโข <b>Cache-Control:</b> <code>${cache}</code>\nโข <b>Server:</b> <code>${server}</code>`);๐ก Always trigger
sendChatAction right before long-running HTTP fetches so users get visual feedback while external metadata APIs resolve.#FlexGram

