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/check_join.js
javascript · 122 lines
1/**#command2name: check_join3answer: 4keyboard: 5parse_mode: markdown6aliases: 7allow_only_group: false8need_reply: false9is_web: 010#command**/11 12// ==========================================================13// GIFT AI — CHECK JOIN CALLBACK14// ==========================================================15 16Api.answerCallbackQuery({17 text: "🔎 Checking your subscriptions..."18});19 20var channel1 = "@Sire_mide";21var channel2 = "@me_himweds";22 23var userId = user.telegramid;24 25var check1 = await Api.call("getChatMember", {26 chat_id: channel1,27 user_id: userId28});29 30var check2 = await Api.call("getChatMember", {31 chat_id: channel2,32 user_id: userId33});34 35function isMember(result) {36 37 if (!result || !result.ok || !result.result) {38 return false;39 }40 41 var member = result.result;42 43 if (44 member.status === "member" ||45 member.status === "administrator" ||46 member.status === "creator"47 ) {48 return true;49 }50 51 if (52 member.status === "restricted" &&53 member.is_member === true54 ) {55 return true;56 }57 58 return false;59}60 61var joined1 = isMember(check1);62var joined2 = isMember(check2);63 64// ----------------------------------------------------------65// STILL NOT JOINED66// ----------------------------------------------------------67 68if (!joined1 || !joined2) {69 70 var missing = "";71 72 if (!joined1) {73 missing += "❌ Channel 1\n";74 }75 76 if (!joined2) {77 missing += "❌ Channel 2\n";78 }79 80 Bot.sendMessage(81 "❌ *You haven't joined both channels yet.*\n\n" +82 missing +83 "\nJoin them and press *✅ I've Joined* again.",84 {85 parse_mode: "Markdown"86 }87 );88 89 return;90}91 92// ----------------------------------------------------------93// BOTH CHANNELS VERIFIED94// ----------------------------------------------------------95 96var users = Bot.getProperty("broadcast_users");97 98if (!users || !Array.isArray(users)) {99 users = [];100}101 102var userIdString = user.telegramid.toString();103 104if (users.indexOf(userIdString) === -1) {105 users.push(userIdString);106 Bot.setProperty("broadcast_users", users, "json");107}108 109// ----------------------------------------------------------110// SUCCESS111// ----------------------------------------------------------112 113Bot.sendMessage(114 "✅ *Verified!*\n\n" +115 "You have joined both channels.\n\n" +116 "Welcome to Gift AI, " +117 user.first_name +118 " ❤️",119 {120 parse_mode: "Markdown"121 }122);