soumyadeep/ReactItBotPublic · Bot Template

A Telegram bot that automatically replies to keywords with text or media in groups. Easy to set up and perfect for FAQs, community management, and automated responses.

ProfileTelegram
8 commands0 envUpdated 7h agoCreated Jun 7, 2026
Back to folder

commands/_remove.js

javascript · 54 lines

Raw
1/**#command2name: /remove3answer: 4keyboard: 5parse_mode: 6aliases: 7allow_only_group: false8need_reply: false9is_web: 010#command**/11 12if(chat.type == "private") return;13 14if(!(await isAdmin())){15  Api.sendMessage({16    text: "❌ Admin only",17    reply_to_message_id: msg.message_id18  });19  return;20}21 22let keyword = params23  .toLowerCase()24  .trim()25  .replace(/\s+/g, " ");26 27if(!keyword){28  Api.sendMessage({29    text: "Usage: /remove keyword",30    reply_to_message_id: msg.message_id31  });32  return;33}34 35let prop = "filters_" + chat.id;36 37let filters = Bot.get(prop) || {};38 39if(!filters[keyword]){40  Api.sendMessage({41    text: "❌ Filter not found",42    reply_to_message_id: msg.message_id43  });44  return;45}46 47delete filters[keyword];48 49Bot.set(prop, filters, "json");50 51Api.sendMessage({52  text: "✅ Filter removed: " + keyword,53  reply_to_message_id: msg.message_id54});