Post

CleanForwardBot: Anonymize and Clean Telegram Messages

CleanForwardBot: Anonymize and Clean Telegram Messages

🧹 Clean Forward Bot (Forward Tag Remover Telegram Bot)

This project demonstrates an example application running a Telegram bot on Cloudflare Workers that removes “forwarded” tags from forwarded messages and anonymizes new messages.

🚀 Demo in Telegram: @clean_forward_bot

🌟 Features

  • 🏷️ Remove “Forwarded” Tags: Automatically removes “forwarded” tags from messages.
  • 👮‍♂️ Channel Admin Capability: Requires channel admin permissions with delete permission to function properly.
  • 🕵️‍♂️ Anonymize New Messages: Automatically anonymizes new messages sent to the channel.
  • 🔒 Anonymizes Private Messages: Anonymizes messages sent privately as well.

⚙️ Setup

📦 Requirements

  • 🟢 Node.js should be installed.
  • 📚 Uses the GrammY.js library.
  • 🔑 Requires a Telegram bot token and a log channel ID.

🛠️ Configuration

  1. 🔑 Set your Telegram bot token in the BOT_TOKEN variable.

📥 Installation Steps

  1. ⬇️ Download or clone the project files.
  2. 💻 Navigate to the project directory in your terminal or command prompt.
  3. 📦 Run npm install to install dependencies.
  4. ☁️ Set up your Cloudflare Workers environment and configure tools like wrangler.
  5. 🚀 Deploy your bot to Cloudflare Workers using wrangler publish.

▶️ Running the Bot

  • ✅ Once deployed on Cloudflare Workers, verify that your bot is running on Telegram by using the /start command.
  • 🤖 The bot will automatically handle copying media messages and anonymizing new messages.

📝 Usage

  • ▶️ /start: Verifies the bot is running and lists its features.
  • ℹ️ /help: Provides information about using the bot and its requirements.

📸 Screenshots

Image 1Image 2Image 3Image 4
private_beforeprivate_afterchannel_beforechannel_after

💻 Source Code

Soon…

📄 License

You can use, study, share and improve it at your will. Specifically you can redistribute and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This post is licensed under CC BY 4.0 by the author.