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/_protection_handler.js
javascript · 80 lines
1/**#command2name: /protection_handler3answer: 4keyboard: 5parse_mode: markdown6aliases: 7allow_only_group: false8need_reply: false9is_web: 010#command**/11 12// ==========================================================13// 💜 GIFT AI — CHANNEL CHAT PROTECTION14//15// When channel_mode = false:16// • Deletes messages sent as a channel17// • Personal messages remain untouched18// • Group admins are exempt19// ==========================================================20 21if (22 chat &&23 (24 chat.type === "group" ||25 chat.type === "supergroup"26 )27) {28 29 let channelProtection = await db.bot.get(30 "channel_mode:" + chat.id,31 true32 );33 34 // Default = ON / channel chatting allowed35 if (channelProtection === false) {36 37 // Telegram identifies "Send As Channel"38 // messages through sender_chat39 if (40 request.sender_chat &&41 request.sender_chat.type === "channel"42 ) {43 44 // Check the actual user who sent the message45 let senderId = user ? user.id : null;46 47 let isAdmin = false;48 49 if (senderId) {50 51 let check = await Api.call("getChatMember", {52 chat_id: chat.id,53 user_id: senderId54 });55 56 if (57 check.ok &&58 check.result &&59 (60 check.result.status === "administrator" ||61 check.result.status === "creator"62 )63 ) {64 isAdmin = true;65 }66 }67 68 // Admins are exempt69 if (!isAdmin) {70 71 let deleted = await Api.call("deleteMessage", {72 chat_id: chat.id,73 message_id: request.message_id74 });75 76 return;77 }78 }79 }80 }