MAHAKAL92/DKIDPROBOTPublic · Bot Template

ProfileTelegram

AIThis bot helps users retrieve Telegram IDs for users, groups, channels, and bots. It offers a start command that presents a keyboard to request chat or user information, and a * command that processes shared chats or messages to return the ID with convenient copy and open links. Additional commands provide help, user details, and an inline query that can send the user’s own ID or details directly.

Utilityidchat iduser idgroup idchannel idtelegram
5 commands0 envUpdated 12d agoCreated Oct 18, 2026
Back to folder

commands/_inline_query.js

javascript · 55 lines

Raw
1/**#command2name: /inline_query3answer: 4keyboard: 5parse_mode: 6aliases: 7allow_only_group: false8need_reply: false9is_web: 010#command**/11 12 13let results = []14 15// user info16let fullName = user.first_name + (user.last_name ? " " + user.last_name : "")17let username = user.username ? "@" + user.username : "N/A"18 19let infoText =20  "<b>Your Telegram Details</b>\n\n" +21  "<b>Name:</b> " + fullName + "\n" +22  "<b>Username:</b> " + username + "\n" +23  "<b>User ID:</b> <code>" + user.id + "</code>"24 25//adding results to be sent on inline query26results.push({27  type: "article",28  id: "1",29  title: "Get Your Telegram ID",30  description: "Click to send your Telegram user ID",31  input_message_content: {32    message_text: infoText,33    parse_mode: "HTML"34  }35})36 37/* 38// uncomment it if you want39results.push({40  type: "article",41  id: "2",42  title: "Copy ID Only",43  description: "Send only your ID",44  input_message_content: {45    message_text: "<code>" + user.id + "</code>",46    parse_mode: "HTML"47  }48})49*/50Api.answerInlineQuery({51  inline_query_id: request.id,52  results: results,53  cache_time: 3600, //caching is good for making bot faster (at the same time its has some backlog like if user changed name appear old name for 1 hour )54  is_personal: true55})