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/_promote_bot_check.js

javascript · 116 lines

Raw
1/**#command2name: /promote_bot_check3answer: 4keyboard: 5parse_mode: markdown6aliases: 7allow_only_group: false8need_reply: false9is_web: 010#command**/11 12// ==========================================================13// 💜 GIFT AI — /promote_bot_check14// CHECK GIFT'S PROMOTION PERMISSION15// ==========================================================16 17var promoterId = user.id;18 19var chatId = Bot.getProperty(20  "PROMOTE_CHAT_" + promoterId21);22 23var targetUserId = Bot.getProperty(24  "PROMOTE_TARGET_" + promoterId25);26 27var commandId = Bot.getProperty(28  "PROMOTE_COMMAND_" + promoterId29);30 31var targetName = Bot.getProperty(32  "PROMOTE_NAME_" + promoterId33);34 35// ----------------------------------------------------------36// SAFETY CHECK37// ----------------------------------------------------------38 39if (!chatId || !targetUserId) {40  return;41}42 43// ----------------------------------------------------------44// CHECK RESULT45// ----------------------------------------------------------46 47if (48  !options ||49  !options.result ||50  !options.result.result51) {52 53  Api.sendMessage({54    chat_id: chatId,55    text:56      "I couldn't check my admin permissions. 😭",57    reply_to_message_id: commandId58  });59 60  return;61}62 63var giftMember = options.result.result;64 65// ----------------------------------------------------------66// GIFT MUST BE ADMIN67// ----------------------------------------------------------68 69if (giftMember.status !== "administrator") {70 71  Api.sendMessage({72    chat_id: chatId,73    text:74      "I'm not an administrator here. 😭\n" +75      "Make me an admin first.",76    reply_to_message_id: commandId77  });78 79  return;80}81 82// ----------------------------------------------------------83// GIFT MUST BE ABLE TO PROMOTE84// ----------------------------------------------------------85 86if (giftMember.can_promote_members !== true) {87 88  Api.sendMessage({89    chat_id: chatId,90    text:91      "I'm an admin, but I don't have permission to add admins. 😭\n\n" +92      "Give me the permission to add new administrators.",93    reply_to_message_id: commandId94  });95 96  return;97}98 99// ----------------------------------------------------------100// PROMOTE USER101// ----------------------------------------------------------102 103Api.call("promoteChatMember", {104  chat_id: chatId,105  user_id: targetUserId,106 107  can_manage_chat: true,108  can_delete_messages: true,109  can_manage_video_chats: true,110  can_restrict_members: true,111  can_promote_members: false,112  can_change_info: true,113  can_invite_users: true,114 115  on_result: "/promote_done"116});