millswelbeck148/SireimadeBotPublic · Bot Template
AISireImade appears to be a Telegram automation bot. Commands include /start, /about, /support, /id, /admin, /ban, /unban, /x. Observed in code: messaging, keyboards, games.
Utilityutility
112 commands3 envUpdated 1h agoCreated Aug 27, 2026
commands/_link.js
javascript · 249 lines
1/**#command2name: /link3answer: 4keyboard: 5parse_mode: markdown6aliases: 7allow_only_group: false8need_reply: false9is_web: 010#command**/11 12// ==========================================================13// 🔗 GIFT — /link14// BEAUTIFUL GROUP INVITE LINK15//16// • GROUP / SUPERGROUP ONLY17// • ADMIN ONLY18// • REPLIES DIRECTLY TO /link19// • ATTRACTIVE LINK CARD20// ==========================================================21 22 23// ==========================================================24// 🛡️ SAFETY CHECK25// ==========================================================26 27if (!message || !chat || !user) {28 return;29}30 31 32// ==========================================================33// 🚫 GROUP ONLY34// ==========================================================35 36if (37 chat.type !== "group" &&38 chat.type !== "supergroup"39) {40 41 Api.sendMessage({42 chat_id: chat.id,43 44 text:45 "╭───────────────╮\n" +46 " 🔗 <b>GROUP LINK</b>\n" +47 "╰───────────────╯\n\n" +48 "❌ <b>This command only works inside a group.</b>",49 50 parse_mode: "HTML"51 });52 53 return;54}55 56 57// ==========================================================58// 👑 CHECK ADMIN59// ==========================================================60 61let member;62 63try {64 65 member = await Api.call("getChatMember", {66 chat_id: chat.id,67 user_id: user.id68 });69 70} catch (e) {71 72 Api.sendMessage({73 chat_id: chat.id,74 75 text:76 "❌ <b>Couldn't verify your admin status.</b>\n\n" +77 "Please try again.",78 79 parse_mode: "HTML"80 });81 82 return;83}84 85 86if (87 !member ||88 !member.ok ||89 !member.result90) {91 92 Api.sendMessage({93 chat_id: chat.id,94 95 text:96 "❌ <b>Couldn't verify your admin status.</b>",97 98 parse_mode: "HTML"99 });100 101 return;102}103 104 105// ==========================================================106// 🚫 NOT ADMIN107// ==========================================================108 109if (110 member.result.status !== "administrator" &&111 member.result.status !== "creator"112) {113 114 Api.sendMessage({115 chat_id: chat.id,116 117 text:118 "╭───────────────╮\n" +119 " 🔒 <b>ACCESS DENIED</b>\n" +120 "╰───────────────╯\n\n" +121 "🚫 <b>Only group admins can use /link.</b>",122 123 parse_mode: "HTML",124 125 // 👇 REPLY DIRECTLY TO /link126 reply_to_message_id: message.message_id127 });128 129 return;130}131 132 133// ==========================================================134// 🔗 GET GROUP INVITE LINK135// ==========================================================136 137let invite;138 139try {140 141 invite = await Api.call("exportChatInviteLink", {142 chat_id: chat.id143 });144 145} catch (e) {146 147 Api.sendMessage({148 chat_id: chat.id,149 150 text:151 "╭───────────────╮\n" +152 " 🔗 <b>GROUP LINK</b>\n" +153 "╰───────────────╯\n\n" +154 "❌ <b>I couldn't get the group invite link.</b>\n\n" +155 "Make sure Gift is an administrator and has permission to invite users.",156 157 parse_mode: "HTML",158 159 // 👇 REPLY DIRECTLY TO /link160 reply_to_message_id: message.message_id161 });162 163 return;164}165 166 167// ==========================================================168// 🛡️ VERIFY RESPONSE169// ==========================================================170 171if (172 !invite ||173 !invite.ok ||174 !invite.result175) {176 177 Api.sendMessage({178 chat_id: chat.id,179 180 text:181 "╭───────────────╮\n" +182 " ⚠️ <b>LINK ERROR</b>\n" +183 "╰───────────────╯\n\n" +184 "❌ <b>I couldn't get the group invite link.</b>\n\n" +185 (186 invite && invite.description187 ? "Telegram: <code>" +188 invite.description +189 "</code>"190 : "Please check my administrator permissions."191 ),192 193 parse_mode: "HTML",194 195 // 👇 REPLY DIRECTLY TO /link196 reply_to_message_id: message.message_id197 });198 199 return;200}201 202 203let groupLink = invite.result;204 205 206// ==========================================================207// 🔗 BEAUTIFUL LINK MESSAGE208// ==========================================================209 210let groupName = chat.title || "This Group";211 212 213// ==========================================================214// 📤 SEND LINK — DIRECT REPLY TO /link215// ==========================================================216 217Api.sendMessage({218 219 chat_id: chat.id,220 221 text:222 "╭━━━━━━━━━━━━━━━━━━╮\n" +223 " 🔗 <b>GROUP INVITE LINK</b>\n" +224 "╰━━━━━━━━━━━━━━━━━━╯\n\n" +225 226 "👥 <b>Group</b>\n" +227 "└ <b>" + groupName + "</b>\n\n" +228 229 "✨ <b>Your invite link is ready!</b>\n\n" +230 231 "🔗 <a href=\"" + groupLink + "\">" +232 groupLink +233 "</a>\n\n" +234 235 "━━━━━━━━━━━━━━━━━━\n" +236 "💫 <i>Tap the link above to open the group.</i>\n" +237 "━━━━━━━━━━━━━━━━━━",238 239 parse_mode: "HTML",240 241 disable_web_page_preview: true,242 243 // ========================================================244 // ⭐ THIS IS WHAT MAKES IT REPLY TO /link245 // ========================================================246 247 reply_to_message_id: message.message_id248 249});