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
ProfileTelegram
112 commands3 envUpdated 1h agoCreated Aug 27, 2026
Back to folder

commands/_goodbye.js

javascript · 230 lines

Raw
1/**#command2name: /goodbye3answer: 4keyboard: 5parse_mode: markdown6aliases: 7allow_only_group: false8need_reply: false9is_web: 010#command**/11 12// ==========================================================13// 💜 GIFT AI — /goodbye14// 🚪 ADMIN-ONLY GOODBYE CONTROL15//16// /goodbye17// /goodbye on18// /goodbye off19//20// ✨ CLEAN • ATTRACTIVE • DIRECT REPLY21// ==========================================================22 23 24// ==========================================================25// 🚫 GROUP-ONLY CHECK26// ==========================================================27 28if (29  !chat ||30  (chat.type !== "group" && chat.type !== "supergroup")31) {32 33  return Api.sendMessage({34    chat_id: chat.id,35    text:36      "💜 <b>GIFT AI</b>\n\n" +37      "🚫 This command only works inside a group chat.",38    parse_mode: "HTML",39    reply_to_message_id: message.message_id40  });41 42}43 44 45// ==========================================================46// 👑 CHECK GROUP ADMIN47// ==========================================================48 49var adminCheck = await Api.call("getChatMember", {50  chat_id: chat.id,51  user_id: user.id52});53 54 55if (56  !adminCheck ||57  !adminCheck.ok ||58  !adminCheck.result ||59  (60    adminCheck.result.status !== "administrator" &&61    adminCheck.result.status !== "creator"62  )63) {64 65  return Api.sendMessage({66    chat_id: chat.id,67    text:68      "💜 <b>GIFT AI</b>\n\n" +69      "🥱 Nice try.\n\n" +70      "👑 Only group admins can control my goodbye messages.\n\n" +71      "💀 Come back with admin powers.",72 73    parse_mode: "HTML",74    reply_to_message_id: message.message_id75  });76 77}78 79 80// ==========================================================81// ⚙️ GET COMMAND ARGUMENT82// ==========================================================83 84var action = String(params || "")85  .trim()86  .toLowerCase();87 88 89// ==========================================================90// 📊 CHECK CURRENT STATUS91// ==========================================================92 93if (!action) {94 95  var current = await db.bot.get(96    "GOODBYE_" + chat.id,97    true98  );99 100 101  if (current) {102 103    return Api.sendMessage({104      chat_id: chat.id,105      text:106        "💜 <b>GIFT AI — GOODBYE</b> 🚪\n\n" +107 108        "🟢 <b>Status:</b> ON\n\n" +109 110        "👋 Members who leave will receive a farewell message.\n\n" +111 112        "━━━━━━━━━━━━━━━━━━\n" +113 114        "💡 Use <code>/goodbye off</code> to disable it.",115 116      parse_mode: "HTML",117      reply_to_message_id: message.message_id118    });119 120  }121 122 123  return Api.sendMessage({124    chat_id: chat.id,125    text:126      "💜 <b>GIFT AI — GOODBYE</b> 🚪\n\n" +127 128      "🔴 <b>Status:</b> OFF\n\n" +129 130      "🤐 Goodbye messages are currently disabled.\n\n" +131 132      "━━━━━━━━━━━━━━━━━━\n" +133 134      "✨ Use <code>/goodbye on</code> to enable them.",135 136    parse_mode: "HTML",137    reply_to_message_id: message.message_id138  });139 140}141 142 143// ==========================================================144// 🟢 TURN GOODBYE ON145// ==========================================================146 147if (action === "on") {148 149  await db.bot.set(150    "GOODBYE_" + chat.id,151    true152  );153 154 155  return Api.sendMessage({156    chat_id: chat.id,157    text:158      "💜 <b>GIFT AI — GOODBYE ENABLED</b> ✨\n\n" +159 160      "🟢 <b>Status:</b> ON\n\n" +161 162      "🚪 Anyone who leaves will now receive a little farewell. 👋\n\n" +163 164      "╭━━━━━━━━━━━━━━━━━━╮\n" +165      "   💜 <b>FAREWELL SYSTEM</b> 💜\n" +166      "╰━━━━━━━━━━━━━━━━━━╯\n\n" +167 168      "🥹 Try not to miss them too much...\n" +169      "💀 Unless they deserved it.",170 171    parse_mode: "HTML",172    reply_to_message_id: message.message_id173  });174 175}176 177 178// ==========================================================179// 🔴 TURN GOODBYE OFF180// ==========================================================181 182if (action === "off") {183 184  await db.bot.set(185    "GOODBYE_" + chat.id,186    false187  );188 189 190  return Api.sendMessage({191    chat_id: chat.id,192    text:193      "💜 <b>GIFT AI — GOODBYE DISABLED</b>\n\n" +194 195      "🔴 <b>Status:</b> OFF\n\n" +196 197      "🤐 I'll let people disappear quietly now.\n\n" +198 199      "━━━━━━━━━━━━━━━━━━\n\n" +200 201      "😭 Fine... no more farewells.\n" +202      "Use <code>/goodbye on</code> whenever you want it back. 💅",203 204    parse_mode: "HTML",205    reply_to_message_id: message.message_id206  });207 208}209 210 211// ==========================================================212// ❌ INVALID OPTION213// ==========================================================214 215return Api.sendMessage({216  chat_id: chat.id,217  text:218    "💜 <b>GIFT AI — INVALID OPTION</b>\n\n" +219 220    "❌ I don't understand that option.\n\n" +221 222    "✨ <b>Available commands:</b>\n\n" +223 224    "🟢 <code>/goodbye on</code> — Enable goodbye\n" +225    "🔴 <code>/goodbye off</code> — Disable goodbye\n" +226    "📊 <code>/goodbye</code> — Check current status",227 228  parse_mode: "HTML",229  reply_to_message_id: message.message_id230});