suvo_/ImglyBotPublic · Bot Template

AIThis bot searches images through a Pinterest-related HTTP API and delivers results in private chats, inline mode, and guest business queries, with a search-more inline button and copy URL action. It tracks referrals from /start links, records referrer counts and lists, and displays referral benefits. The bot also handles business sticker messages by matching emoji and replying with a random sticker from the same set, asks users for feedback after feature usage, and includes an admin-only broadcast system plus a token-based clone-bot request flow.

Utilityimage-searchpinterestinline-modereferralbroadcastclone-bot
ProfileTelegram
27 commands3 envUpdated 3d agoCreated Jul 2, 2026
Back to folder

commands/_inline_query_result.js

javascript · 91 lines

Raw
1/**#command2name: /inline_query_result3answer: 4keyboard: 5parse_mode: markdown6aliases: 7allow_only_group: false8need_reply: false9is_web: 010#command**/11 12let data = JSON.parse(content);13 14let inlineQueryId = request.id;15 16if (!inlineQueryId) return17 18if (!data.items || data.items.length === 0) {19   Api.answerInlineQuery({20  inline_query_id: inlineQueryId,21  cache_time: 0,22  results: JSON.stringify([23    {24      type: "article",25      id: "1",26      title: "❤️ NO RESULTS FOUND",27      description: "Try another keyword",28      input_message_content: {29        message_text: "https://i.ibb.co/mV4YjYz4/file-00000000cd2c7207b2a318a880f86586.png"30      }31    }32  ])33});34  return35}36 37let results = []38 39for (let i = 0; i < data.items.length; i++) {40  let item = data.items[i]41 42  results.push({43    type: "photo",44    id: String(i + 1),45    photo_url: item.image,46    thumbnail_url: item.image,47    caption: ("@ImglyBot " +(item.title || "")),48    reply_markup: {49  inline_keyboard: [50    [51      {52          text: "🔍 Open Search",          switch_inline_query_current_chat: item.title || "",53        style: "primary"54        }55      ],56    [57      {58        text: "⭐ Channel",59        url: "https://t.me/nice_div",60        style: "success"61      },62      {63        text: "➕ Add to Group",64        url: `https://t.me/${bot.name}?startgroup=true`,65        style: "success"66      }67    ],68    [69      {70        text: "Copy URL",71         copy_text: {72           text: item.image73         },74        // style: "primary"75      }76    ]77  ]78}79  })80}81 82Api.answerInlineQuery({83   inline_query_id: inlineQueryId,84  results: JSON.stringify(results),85  cache_time: 1000,86})87 88 89Bot.runCommand("/ref_posd")90 91Bot.runCommand("/askfb " + request.from.id);