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 2h agoCreated Aug 27, 2026
commands/_gcbroadcast.js
javascript · 208 lines
1/**#command2name: /gcbroadcast3answer: 4keyboard: 5parse_mode: markdown6aliases: 7allow_only_group: false8need_reply: false9is_web: 010#command**/11 12// ==========================================================13// 📢 GIFT — /gcbroadcast14// TELEBOTHOST15//16// USAGE:17//18// Send any message:19//20// Hello everyone 👋21//22// Then REPLY to it:23//24// /gcbroadcast25//26// Gift forwards that message to every registered group.27//28// OWNER ONLY29// ==========================================================30 31 32// ==========================================================33// 👑 OWNER34// ==========================================================35 36var OWNER_ID = "8031061590";37 38 39// ==========================================================40// 🛡️ SAFETY41// ==========================================================42 43if (!update || !update.message) {44 return;45}46 47 48var msg = update.message;49 50 51// ==========================================================52// 👤 USER53// ==========================================================54 55if (!msg.from) {56 return;57}58 59 60if (String(msg.from.id) !== OWNER_ID) {61 62 await Api.sendMessage({63 chat_id: msg.chat.id,64 text: "❌ Access denied."65 });66 67 return;68}69 70 71// ==========================================================72// 🔁 REPLIED MESSAGE73// ==========================================================74 75var replied = msg.reply_to_message;76 77 78if (!replied) {79 80 await Api.sendMessage({81 chat_id: msg.chat.id,82 text:83 "❌ <b>Reply to the message you want Gift to broadcast.</b>\n\n" +84 "Example:\n\n" +85 "1️⃣ Send:\n" +86 "<code>Hello everyone 👋</code>\n\n" +87 "2️⃣ Reply to it with:\n" +88 "<code>/gcbroadcast</code>",89 parse_mode: "HTML"90 });91 92 return;93}94 95 96// ==========================================================97// 🆔 SOURCE MESSAGE98// ==========================================================99 100var sourceChatId =101 String(replied.chat.id);102 103var sourceMessageId =104 replied.message_id;105 106 107// ==========================================================108// 📦 GET REGISTERED GROUPS109// ==========================================================110 111var groups = await db.bot.get(112 "GIFT_GROUPS",113 []114);115 116 117if (!Array.isArray(groups)) {118 groups = [];119}120 121 122// ==========================================================123// 🚫 NO GROUPS124// ==========================================================125 126if (groups.length === 0) {127 128 await Api.sendMessage({129 chat_id: msg.chat.id,130 text:131 "❌ <b>No groups are registered yet.</b>\n\n" +132 "Gift must receive a message in a group before that group can be added.",133 parse_mode: "HTML"134 });135 136 return;137}138 139 140// ==========================================================141// 📢 START142// ==========================================================143 144await Api.sendMessage({145 chat_id: msg.chat.id,146 text:147 "📢 <b>Gift is broadcasting...</b>\n\n" +148 "👥 Groups: <b>" +149 groups.length +150 "</b>",151 parse_mode: "HTML"152});153 154 155// ==========================================================156// 📊 COUNTERS157// ==========================================================158 159var sent = 0;160var failed = 0;161 162 163// ==========================================================164// 📡 BROADCAST165// ==========================================================166 167for (var i = 0; i < groups.length; i++) {168 169 var groupId =170 String(groups[i]);171 172 try {173 174 await Api.forwardMessage({175 chat_id: groupId,176 from_chat_id: sourceChatId,177 message_id: sourceMessageId178 });179 180 sent++;181 182 } catch (error) {183 184 failed++;185 186 }187}188 189 190// ==========================================================191// 📊 FINAL REPORT192// ==========================================================193 194await Api.sendMessage({195 chat_id: msg.chat.id,196 text:197 "📢 <b>GIFT GROUP BROADCAST COMPLETE</b>\n\n" +198 "👥 Total groups: <b>" +199 groups.length +200 "</b>\n" +201 "✅ Sent: <b>" +202 sent +203 "</b>\n" +204 "❌ Failed: <b>" +205 failed +206 "</b>",207 parse_mode: "HTML"208});