tarunpoonia905/OfcDevShopBotPublic · Bot Template

ProfileTelegram

AIDEV SHOP appears to be a Telegram automation bot. Commands include /confirm_delete_stock, /addstock_id, /extkey_menu, /partner_api, /apidelete, /buy_hack_cat, /admin_manage_products, /check_buy. Observed in code: messaging, keyboards, payments, libs, web, http, games.

Utilityutility
228 commands0 envUpdated 12d agoCreated Oct 18, 2026
Back to folder

commands/_set_bot_token.js

javascript · 30 lines

Raw
1/**#command2name: /set_bot_token3answer: 4keyboard: 5parse_mode: markdown6aliases: 7allow_only_group: false8need_reply: false9is_web: 010#command**/11 12// Admin only: BotFather token save karta hai (AI Add Product screenshot download ke liye).13// ENV me BOT_TOKEN na ho to ye use hota hai. Token wala message turant delete kar diya jata hai.14try {15  var adminId = String(Bot.getProperty("owner_id") || "7127818616");16  var me = String(chat.chatid);17  if (me !== adminId && !Bot.getProperty("co_admin_" + me)) { Bot.sendMessage("❌ You are not authorized to use this."); return; }18 19  var tok = String(params || "").trim();20  try { if (request && request.message_id) Api.deleteMessage({ chat_id: me, message_id: request.message_id }); } catch (e) {}21 22  if (!/^\d{6,}:[A-Za-z0-9_-]{30,}$/.test(tok)) {23    Bot.sendMessage("⚠️ Sahi format: /set_bot_token 123456789:AAxxxxxxxx (BotFather wala token)");24    return;25  }26  Bot.setProperty("tg_bot_token", tok, "string");27  Bot.sendMessage("✅ Bot token save ho gaya. Ab /admin → AI Add Product me screenshot bhejo.");28} catch (err) {29  Bot.sendMessage("⚠️ Error: " + String(err.message || err));30}
commands/_set_bot_token.js · tarunpoonia905/OfcDevShopBot · TeleDevs