diff --git a/README.md b/README.md index 3eb11a9..97d4306 100644 --- a/README.md +++ b/README.md @@ -122,7 +122,7 @@ License -> https://github.com/TharukRenuja/NSTC-Movie-Finder/blob/main/LICENSE - [Mahesh](https://github.com/Mahesh0253) for Media Search Bot. - [TrojanzHex](https://github.com/TroJanzHEX) for Auto Filter Bot. - [Me](https://github.com/TharukRenuja) for NothingšŸ¤£. -- [EvaMaria](https://github.com/EvaMaria) for EvaMaria Bot. +- [EvaMariaTG](https://github.com/EvaMariaTG) for EvaMaria Bot. ## Thanks to - Thanks To Dan For His Awsome [Libary](https://github.com/pyrogram/pyrogram) diff --git a/plugins/pm_filter.py b/plugins/pm_filter.py index 7030ce0..81deb55 100644 --- a/plugins/pm_filter.py +++ b/plugins/pm_filter.py @@ -20,16 +20,17 @@ BUTTONS = {} -@Client.on_message(filters.group & filters.text) +@Client.on_message(filters.group & filters.text & filters.private) async def give_filter(client,message): group_id = message.chat.id name = message.text + user_id = message.chat.id - keywords = await get_filters(group_id) + keywords = await get_filters(group_id, user_id) for keyword in reversed(sorted(keywords, key=len)): pattern = r"( |^|[^\w])" + re.escape(keyword) + r"( |$|[^\w])" if re.search(pattern, name, flags=re.IGNORECASE): - reply_text, btn, alert, fileid = await find_filter(group_id, keyword) + reply_text, btn, alert, fileid = await find_filter(group_id, user_id, keyword) if reply_text: reply_text = reply_text.replace("\\n", "\n").replace("\\t", "\t")