A powerful and versatile Telegram bot designed for filtering, automation, and much more!
- ✅ Auto Filter
- ✅ Manual Filter
- ✅ IMDB Search and Info
- ✅ Admin Commands
- ✅ Broadcast Messages
- ✅ File Indexing
- ✅ Inline Search
- ✅ Random Pics Generator
- ✅ User and Chat Stats
- ✅ Ban, Unban, Enable, Disable Commands
- ✅ File Storage
- ✅ Auto-Approval for Requests
- ✅ Shortener Link Support (
/short) - ✅ Feedback System
- ✅ Font Styling (
/font) - ✅ User Promotion/Demotion
- ✅ Pin/Unpin Messages
- ✅ Image-to-Link Conversion
- ✅ Auto Delete: Automatically removes user messages after processing, so you don't need a separate auto-delete bot
- ✅ Auto Restart
- ✅ Keep Alive Function: Prevents the bot from sleeping or shutting down unexpectedly on platforms like Koyeb, eliminating the need for external uptime services like UptimeRobot.
- ✅ /movies and /series Commands: Instantly fetch and display the most recently added movies or series with these commands.
- ✅ Hyperlink Mode: When enabled, search results are sent as clickable hyperlinks instead of using callback buttons for easier access.
- ✅ Multiple Request FSub support: You can add multiple channels. Easily update the required channels with the /fsub command, e.g., /fsub (channel1 id) (channel2 id) (channel3 id).
- ✅ Delete Files by Query: Use the /deletefiles command to delete all files containing a specific word in their name. For example, /deletefiles predvd removes all files with 'predvd' in their filename.
- ✅ Auto delete for files.
- ✅ Channel file sending mode with multiple channel support.
- ✅ SQL database (postgrasql) support (Optional).
- ✅ 5 MongoDb support (optional).
Core / Search
/start/movies/series/imdb,/mnsearch/search
Filter / Connection
/filter,/add/filters,/viewfilters/del/delall/connect/disconnect/connections/settings
Utilities / Extras
/id/info/bug,/bugs,/feedback/paste,/pasty,/tgpaste/short/tr/font/genpassword,/genpw/tts/carbon/stickerid/json,/js,/showjson/img,/cup,/telegraph/share,/share_text,/sharetext/echo/pin/unpin/unpin_all/promote/demote
Admin / Owner
/stats/invite/ban/unban/users/chats/channel/broadcast/grpbroadcast/logs/delete/deleteall/deletefiles/fsub/set_template/setskip/clear_join_users/leave/disable/enable/ping/usage/restart
- Auto + manual filter responses
- Channel file indexing and searchable DB
- Inline result support and hyperlink result mode
- IMDB cards with metadata and posters
- Spell check suggestions for missing titles
- Multiple force-sub channels and gated access
- PM connection manager for group controls
- File auto-delete and protected media delivery
- Multi DB backend support (MongoDB / PostgreSQL)
- Broadcast tools and moderation controls
BOT_TOKEN: Obtain via @BotFather.API_ID: Get this from Telegram Apps.API_HASH: Also from Telegram Apps.CHANNELS: Telegram channel/group usernames or IDs (space-separated).ADMINS: Admin usernames or IDs (space-separated).DATABASE_URI: Primary MongoDB URI (first priority if set).DATABASE_NAME: Primary MongoDB database name.DATABASE_URI2..DATABASE_URI5: Optional extra MongoDB URIs (up to 5 total) for sharded media indexing/search.DATABASE_NAME2..DATABASE_NAME5: Optional database names for those extra MongoDB URIs (defaults toDATABASE_NAME).POSTGRES_URI: PostgreSQL connection URI used whenDATABASE_URIis not set.LOG_CHANNEL: Telegram channel for activity logs.
DATABASE_URI(MongoDB)POSTGRES_URI(PostgreSQL SQL backend)
PICS: Telegraph links for images in start message (space-separated).FILE_STORE_CHANNEL: Channels for file storage (space-separated).POSTGRES_STORAGE_LIMIT_BYTES: Optional PostgreSQL quota for accurate/statsfree storage in SQL mode (supports formats like1073741824,1024MB,1GB).- Refer to info.py for more details.
This guide supports MongoDB or PostgreSQL:
- MongoDB (
DATABASE_URI) with optional media shards (DATABASE_URI2..DATABASE_URI5) - PostgreSQL (
POSTGRES_URI) when MongoDB is not set.
BOT_TOKEN=123456:ABC...
API_ID=1234567
API_HASH=xxxxxxxxxxxxxxxxxxxxxxxxxx
ADMINS=123456789
CHANNELS=-1001234567890
LOG_CHANNEL=-1001234567890Then choose one DB method below.
- Create account: https://www.mongodb.com/cloud/atlas/register
- Create cluster.
- Database Access → create DB user.
- Network Access → allow your server IP.
- Connect → Drivers → copy URI.
- Set environment values:
DATABASE_URI=mongodb+srv://<username>:<password>@cluster0.xxxxx.mongodb.net/?retryWrites=true&w=majority
DATABASE_NAME=Cluster0
COLLECTION_NAME=mn_filesQuick test:
from pymongo import MongoClient
uri = "mongodb+srv://<username>:<password>@cluster0.xxxxx.mongodb.net/?retryWrites=true&w=majority"
client = MongoClient(uri, serverSelectionTimeoutMS=5000)
print(client.admin.command("ping"))You need:
- host
- port (
5432usually) - database name
- username
- password
URI format:
postgresql+psycopg2://USERNAME:PASSWORD@HOST:5432/DATABASE_NAME
Example env:
POSTGRES_URI=postgresql+psycopg2://bot_user:StrongPass@your-host:5432/shobana_botCreate DB/user manually:
CREATE DATABASE shobana_bot;
CREATE USER bot_user WITH ENCRYPTED PASSWORD 'StrongPass';
GRANT ALL PRIVILEGES ON DATABASE shobana_bot TO bot_user;Quick test:
from sqlalchemy import create_engine, text
engine = create_engine("postgresql+psycopg2://bot_user:StrongPass@your-host:5432/shobana_bot")
with engine.connect() as c:
print(c.execute(text("SELECT 1")).scalar())Important:
- Leave
DATABASE_URIempty if using PostgreSQL. - Set
POSTGRES_STORAGE_LIMIT_BYTESto your provider quota (examples:1GB,1024MB, or raw bytes) if you want/statsfree storage to show DB quota-based remaining space. - Do not set MySQL/SQLite/Turso variables (not used in this repo now).
- Koyeb: easiest for beginners
- Render
- Railway
- VPS (advanced)
For all platforms:
- Fork repo.
- Add env variables.
- Deploy.
- Verify bot with
/start.
DATABASE_URIset but Mongo auth fails → recheck DB username/password and network access.- PostgreSQL connection refused → check host/port/firewall/SSL requirements.
- Invalid PostgreSQL URI → ensure it starts with
postgresql+psycopg2://. - Bot not responding in channels → make bot admin in channels listed in
CHANNELS.
💬 Support
🙏 Credits
- Dan for the Pyrogram Library
- Mahesh for the Media Search Bot
- EvamariaTG for the EvaMaria Bot
- Trojanz for Unlimited Filter Bot
- Goutham for ping feature
- MN TG for editing and modifying this repository(Currently It's Me)
- If your intrested to Collab with us Just fork this repo and create pull request ------ Click Here To Fork Repo
📜 Disclaimer
This project is licensed under the GNU AGPL 3.0. Selling this code for monetary gain is strictly prohibited.