From 3cc07ed330f131845776e0839fd10cc89c864df5 Mon Sep 17 00:00:00 2001 From: Musammil N Date: Fri, 13 Mar 2026 17:32:37 +0530 Subject: [PATCH 1/2] Enhance help menu with paginated commands and update README --- README.md | 81 ++++++++++++++++++++++++++++++++++++++++++++ Script.py | 75 ++++++++++++++++++++++++++++++++++++++-- plugins/pm_filter.py | 43 ++++++++++++++++++++--- 3 files changed, 192 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 1f2d4e2..3164075 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/Script.py b/Script.py index a0505b2..d6c2d26 100644 --- a/Script.py +++ b/Script.py @@ -3,9 +3,79 @@ class script(object): 𝖨𝗆 𝖺𝗇 π–Ίπ—Žπ—π—ˆ 𝖿𝗂𝗅𝗍𝖾𝗋 π–»π—ˆπ— 𝗐𝗁𝗂𝖼𝗁 𝖼𝖺𝗇 π—‰π—‹π—ˆπ—π—‚π–½π–Ύ π—†π—ˆπ—π—‚π–Ύπ—Œ 𝗂𝗇 π—’π—ˆπ—Žπ—‹ π—€π—‹π—ˆπ—Žπ—‰π—Œ. + 𝖠𝖽𝖽 𝖬𝖾 π–³π—ˆ π–Έπ—ˆπ—Žπ—‹ π–¦π—‹π—ˆπ—Žπ—‰ + 𝖺𝗇𝖽 π—‰π—‹π—ˆπ—†π—ˆπ—π–Ύ 𝗆𝖾 π–Ίπ—Œ 𝖺𝖽𝗆𝗂𝗇 π—π—ˆ 𝗅𝖾𝗍 𝗆𝖾 𝗀𝖾𝗍 𝗂𝗇 π–Ίπ–Όπ—π—‚π—ˆπ—‡.""" HELP_TXT = """ - Hey {} -Currently using free server so please Dont kill Me... +Hey {} πŸ‘‹ + +Use the buttons below to browse all features and commands. +Each help page contains a short list for easy reading. """ + HELP_PAGES = [ +"""πŸ“˜ Help (1/6): Core Features +β€’ 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""", +"""πŸ“˜ Help (2/6): Public Commands +β€’ /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""", +"""πŸ“˜ Help (3/6): Utility Commands +β€’ /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""", +"""πŸ“˜ Help (4/6): Media/Extra Commands +β€’ /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""", +"""πŸ“˜ Help (5/6): Group/Admin Commands +β€’ /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""", +"""πŸ“˜ Help (6/6): Owner/Admin-Only +β€’ /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 = """ β—Ž Cʀᴇᴀᴛᴏʀ: MN - TG β—Ž Lα΄€Ι΄Ι’α΄œα΄€Ι’α΄‡: PΚα΄›Κœα΄Ι΄ 3 @@ -188,4 +258,3 @@ class script(object): """ RESTART_TXT = """ π–‘π—ˆπ— π–±π–Ύπ—Œπ—π–Ίπ—‹π—π–Ύπ–½ βœ…""" - diff --git a/plugins/pm_filter.py b/plugins/pm_filter.py index d73eaa4..13a4f38 100644 --- a/plugins/pm_filter.py +++ b/plugins/pm_filter.py @@ -465,6 +465,10 @@ 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') ], [ @@ -472,13 +476,44 @@ async def cb_handler(client: Client, query: CallbackQuery): 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 ) From 7a91ed1569d0b0ed8774152c6f36f73332011e75 Mon Sep 17 00:00:00 2001 From: Musammil N Date: Fri, 13 Mar 2026 17:33:57 +0530 Subject: [PATCH 2/2] Update Script.py --- Script.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Script.py b/Script.py index d6c2d26..bc8e9b1 100644 --- a/Script.py +++ b/Script.py @@ -77,7 +77,7 @@ class script(object): β€’ /set_template, /setskip, /clear_join_users""" ] ABOUT_TXT = """ -β—Ž Cʀᴇᴀᴛᴏʀ: MN - TG +β—Ž Cʀᴇᴀᴛᴏʀ: MN - TG β—Ž Lα΄€Ι΄Ι’α΄œα΄€Ι’α΄‡: PΚα΄›Κœα΄Ι΄ 3 β—Ž Dα΄€α΄›α΄€ Bα΄€sᴇ: Mᴏɴɒᴏ DB β—Ž Bᴏᴛ Sᴇʀᴠᴇʀ: KoYeb"""