Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
81 changes: 81 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,87 @@
- ✅ SQL database (postgrasql) support (Optional).
- ✅ 5 MongoDb support (optional).


## 🤖 Commands & Bot Features

### Full command list

**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`

### Feature highlights shown in Help
- 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

## 🔧 Variables

### Required
Expand Down
77 changes: 73 additions & 4 deletions Script.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,81 @@ class script(object):
𝖨𝗆 𝖺𝗇 𝖺𝗎𝗍𝗈 𝖿𝗂𝗅𝗍𝖾𝗋 𝖻𝗈𝗍 𝗐𝗁𝗂𝖼𝗁 𝖼𝖺𝗇 𝗉𝗋𝗈𝗏𝗂𝖽𝖾 𝗆𝗈𝗏𝗂𝖾𝗌 𝗂𝗇 𝗒𝗈𝗎𝗋 𝗀𝗋𝗈𝗎𝗉𝗌.
+ 𝖠𝖽𝖽 𝖬𝖾 𝖳𝗈 𝖸𝗈𝗎𝗋 𝖦𝗋𝗈𝗎𝗉 + 𝖺𝗇𝖽 𝗉𝗋𝗈𝗆𝗈𝗍𝖾 𝗆𝖾 𝖺𝗌 𝖺𝖽𝗆𝗂𝗇 𝗍𝗈 𝗅𝖾𝗍 𝗆𝖾 𝗀𝖾𝗍 𝗂𝗇 𝖺𝖼𝗍𝗂𝗈𝗇."""
HELP_TXT = """
Hey {}
Currently using free server so please Dont kill Me...
<b>Hey {} 👋</b>

Use the buttons below to browse all features and commands.
Each help page contains a short list for easy reading.
"""
HELP_PAGES = [
"""<b>📘 Help (1/6): Core Features</b>
• Auto filter and manual filter replies
• IMDB details with poster + metadata
• Spell-check suggestions for wrong queries
• File indexing from linked channels
• Multi-database support (Mongo + SQL)
• Hyperlink result mode support
• Connection manager for PM controls
• File auto-delete and protected delivery
• Multiple force-sub channels support
• Inline search and share support""",
"""<b>📘 Help (2/6): Public Commands</b>
• /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 or /add - Create manual filter
• /filters or /viewfilters - List filters
• /del and /delall - Delete filters""",
"""<b>📘 Help (3/6): Utility Commands</b>
• /imdb and /mnsearch - Search movie info
• /id - Show user/chat id
• /info - Show user information
• /bug /bugs /feedback - Send feedback
• /search - Search from external sources
• /paste /pasty /tgpaste - Create paste link
• /short - Shorten URL
• /tr - Translate replied text
• /font - Style your text
• /genpassword or /genpw - Generate password""",
"""<b>📘 Help (4/6): Media/Extra Commands</b>
• /tts - Text to speech
• /carbon - Generate carbon image
• /stickerid - Get sticker file id
• /json /js /showjson - Message JSON
• /img /cup /telegraph - Image to link
• /share /share_text /sharetext - Share text
• /echo - Repeat text
• /pin - Pin replied message
• /unpin - Unpin a message
• /unpin_all - Unpin all messages""",
"""<b>📘 Help (5/6): Group/Admin Commands</b>
• /promote - Promote user in group
• /demote - Demote user in group
• /stats - Show database bot stats
• /invite - Generate group invite link
• /ban - Ban a user from bot
• /unban - Unban a user
• /leave - Leave a chat
• /disable - Disable a chat
• /enable - Enable a chat
• /deletefiles & /deleteall - Bulk file delete""",
"""<b>📘 Help (6/6): Owner/Admin-Only</b>
• /users - List bot users
• /chats - List connected chats
• /channel - List indexed channels
• /broadcast - Broadcast to users
• /grpbroadcast - Broadcast to groups
• /logs - Get recent logs
• /delete - Delete one indexed file
• /fsub - Update force-sub channels
• /restart, /ping, /usage - System tools
• /set_template, /setskip, /clear_join_users"""
]
ABOUT_TXT = """<b>
◎ Cʀᴇᴀᴛᴏʀ: <a href=https://github.com/mntg4u> MN - TG</a>
◎ Cʀᴇᴀᴛᴏʀ: <a href=https://github.com/mntgxo> MN - TG</a>
◎ Lᴀɴɢᴜᴀɢᴇ: Pʏᴛʜᴏɴ 3
◎ Dᴀᴛᴀ Bᴀsᴇ: Mᴏɴɢᴏ DB
◎ Bᴏᴛ Sᴇʀᴠᴇʀ: KoYeb</b>"""
Expand Down Expand Up @@ -188,4 +258,3 @@ class script(object):
"""
RESTART_TXT = """
<b><u>𝖡𝗈𝗍 𝖱𝖾𝗌𝗍𝖺𝗋𝗍𝖾𝖽 ✅</u></b>"""

43 changes: 39 additions & 4 deletions plugins/pm_filter.py
Original file line number Diff line number Diff line change
Expand Up @@ -465,20 +465,55 @@ async def cb_handler(client: Client, query: CallbackQuery):
await query.answer('Piracy Is Crime')
elif query.data == "help":
buttons = [[
InlineKeyboardButton('◀️ Pʀᴇᴠ', callback_data='help_page_5'),
InlineKeyboardButton('1/6', callback_data='pages'),
InlineKeyboardButton('Nᴇxᴛ ▶️', callback_data='help_page_1')
], [
InlineKeyboardButton('Mᴀɴᴜᴀʟ Fɪʟᴛᴇʀ', callback_data='manuelfilter'),
InlineKeyboardButton('Aᴜᴛᴏ Fɪʟᴛᴇʀ', callback_data='autofilter')
], [
InlineKeyboardButton('Cᴏɴɴᴇᴄᴛɪᴏɴ', callback_data='coct'),
InlineKeyboardButton('Exᴛʀᴀ Tʜɪɴɢs', callback_data='extra')
], [
InlineKeyboardButton('Hᴏᴍᴇ', callback_data='start'),
InlineKeyboardButton('Bᴀᴄᴋ', callback_data='start')
],[
InlineKeyboardButton('ʀᴇᴘᴏ', url='https://github.com/mn-bots/ShobanaFilterBot')
]]
]]
reply_markup = InlineKeyboardMarkup(buttons)
await query.message.edit_text(
text=f"{script.HELP_TXT.format(query.from_user.mention)}\n\n{script.HELP_PAGES[0]}",
reply_markup=reply_markup,
parse_mode=enums.ParseMode.HTML
)
elif query.data.startswith("help_page_"):
try:
page = int(query.data.rsplit("_", 1)[1])
except ValueError:
return await query.answer("Invalid help page", show_alert=True)

total_pages = len(script.HELP_PAGES)
if page < 0 or page >= total_pages:
return await query.answer("Invalid help page", show_alert=True)

prev_page = (page - 1) % total_pages
next_page = (page + 1) % total_pages

buttons = [[
InlineKeyboardButton('◀️ Pʀᴇᴠ', callback_data=f'help_page_{prev_page}'),
InlineKeyboardButton(f'{page + 1}/{total_pages}', callback_data='pages'),
InlineKeyboardButton('Nᴇxᴛ ▶️', callback_data=f'help_page_{next_page}')
], [
InlineKeyboardButton('Mᴀɴᴜᴀʟ Fɪʟᴛᴇʀ', callback_data='manuelfilter'),
InlineKeyboardButton('Aᴜᴛᴏ Fɪʟᴛᴇʀ', callback_data='autofilter')
], [
InlineKeyboardButton('Cᴏɴɴᴇᴄᴛɪᴏɴ', callback_data='coct'),
InlineKeyboardButton('Exᴛʀᴀ Tʜɪɴɢs', callback_data='extra')
], [
InlineKeyboardButton('Hᴏᴍᴇ', callback_data='start'),
InlineKeyboardButton('ʀᴇᴘᴏ', url='https://github.com/mn-bots/ShobanaFilterBot')
]]
reply_markup = InlineKeyboardMarkup(buttons)
await query.message.edit_text(
text=script.HELP_TXT.format(query.from_user.mention),
text=f"{script.HELP_TXT.format(query.from_user.mention)}\n\n{script.HELP_PAGES[page]}",
reply_markup=reply_markup,
parse_mode=enums.ParseMode.HTML
)
Expand Down