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).
start - Start the bot
movies - Latest added movies
series - Latest added series
connect - Connect group to PM
disconnect - Disconnect active chat
connections - Show your connections
settings - Open group settings
filter - Create manual filter
add - Create manual filter (alias)
filters - List filters
viewfilters - List filters (alias)
del - Delete filter
delall - Delete all filters
imdb - Search movie/series info
mnsearch - Search movie/series info (alias)
id - Show user / chat ID
info - Show user information
bug - Send bug report / feedback
bugs - Send bug report / feedback (alias)
feedback - Send feedback (alias)
search - Search from external sources
paste - Create paste link
pasty - Create paste link (alias)
tgpaste - Create paste link (alias)
short - Shorten URL
tr - Translate replied text
font - Style your text
genpassword - Generate strong password
genpw - Generate strong password (alias)
tts - Text to speech
carbon - Generate carbon image
stickerid - Get sticker file ID
json - Show message JSON
js - Show message JSON (alias)
showjson - Show message JSON (alias)
img - Upload image and get link
cup - Upload image and get link (alias)
telegraph - Upload image and get link (alias)
share - Share text as link
share_text - Share text as link (alias)
sharetext - Share text as link (alias)
echo - Repeat the text
pin - Pin replied message
unpin - Unpin a message
unpin_all - Unpin all messages
promote - Promote a user in group
demote - Demote a user in group
stats - Show bot database statistics
invite - Generate group invite link
ban - Ban user from using the bot
unban - Unban user
leave - Make bot leave a chat
disable - Disable a chat
enable - Enable a disabled chat
deletefiles - Bulk delete indexed files
deleteall - Delete all indexed files
users - List bot users
chats - List connected chats/groups
channel - List indexed channels
broadcast - Broadcast message to users
grpbroadcast - Broadcast message to groups
logs - Get recent bot logs
delete - Delete one indexed file
fsub - Update force-subscribe channels
restart - Restart the bot
ping - Check bot ping
usage - Show resource usage
set_template - Set custom template
setskip - Set skip settings
clear_join_users - Clear join users data
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.