From 5b5ad3a310edf93deb5538d3d93ebaa27b4757e5 Mon Sep 17 00:00:00 2001 From: soulpc <119080077+soulpc@users.noreply.github.com> Date: Tue, 11 Jul 2023 08:04:37 +0530 Subject: [PATCH 001/237] Update app.json --- app.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app.json b/app.json index f7f3b4d..c1b54a3 100644 --- a/app.json +++ b/app.json @@ -84,7 +84,7 @@ "formation": { "worker": { "quantity": 1, - "size": "free" + "size": "eco" } } } From a866b70fe55d80aea659be9ce69182cbc34ced4b Mon Sep 17 00:00:00 2001 From: soulpc <119080077+soulpc@users.noreply.github.com> Date: Tue, 11 Jul 2023 08:06:53 +0530 Subject: [PATCH 002/237] Update README.md --- README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README.md b/README.md index a9dfb01..f559b0f 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,7 @@ +[](https://heroku.com/deploy?template=https://github.com/soulpc/Elsa) + + +
{}
-⚠️ This file will be deleted from here within 10 minute as it has copyright ... !!!
-
-കോപ്പിറൈറ്റ് ഉള്ളതുകൊണ്ട് ഫയൽ 10 മിനിറ്റിനുള്ളിൽ ഇവിടെനിന്നും ഡിലീറ്റ് ആകുന്നതാണ് അതുകൊണ്ട് ഇവിടെ നിന്നും മറ്റെവിടെക്കെങ്കിലും മാറ്റിയതിന് ശേഷം ഡൗൺലോഡ് ചെയ്യുക!
-
© Powered by {}
"""
SUR_TXT = """
From efd8dc0e47fdfd93b91b8e2d321ea322ee0a9dc6 Mon Sep 17 00:00:00 2001
From: DEVIL BOTZ <110474610+Devil-Botz@users.noreply.github.com>
Date: Wed, 9 Aug 2023 20:44:33 +0530
Subject: [PATCH 023/237] Error fixed
---
plugins/pm_filter.py | 1 +
1 file changed, 1 insertion(+)
diff --git a/plugins/pm_filter.py b/plugins/pm_filter.py
index 6ae922c..5bb4999 100644
--- a/plugins/pm_filter.py
+++ b/plugins/pm_filter.py
@@ -524,6 +524,7 @@ async def cb_handler(client: Client, query: CallbackQuery):
]
]
)
+ )
Joel_tgx = await query.message.reply_text(
script.FILE_MSG.format(query.from_user.mention, title, size),
parse_mode=enums.ParseMode.HTML,
From 3e9ac90309965985e98cb78abb10771ff9fdc0d3 Mon Sep 17 00:00:00 2001
From: DEVIL BOTZ <110474610+Devil-Botz@users.noreply.github.com>
Date: Wed, 9 Aug 2023 20:57:58 +0530
Subject: [PATCH 024/237] =?UTF-8?q?=F0=9F=93=9D?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
Script.py | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/Script.py b/Script.py
index fac731a..93974b8 100644
--- a/Script.py
+++ b/Script.py
@@ -271,7 +271,11 @@ class script(object):
{}
-© Powered by {}
+╔════ ᴊᴏɪɴ ᴡɪᴛʜ ᴜs ════╗
+♻️ 𝙅𝙊𝙄𝙉 :- OTT UPDATES
+♻️ 𝙅𝙊𝙄𝙉 :- CHANNEL
+♻️ 𝙅𝙊𝙄𝙉 :- GROUP
+╚════ ᴊᴏɪɴ ᴡɪᴛʜ ᴜs ════╝
"""
SUR_TXT = """
From 7d0be3d370eb94c8e0643a7f9626c310dec0d8a0 Mon Sep 17 00:00:00 2001
From: Soul pc <119080077+soulpc@users.noreply.github.com>
Date: Wed, 9 Aug 2023 21:15:59 +0530
Subject: [PATCH 025/237] Update Script.py
---
Script.py | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/Script.py b/Script.py
index 93974b8..470abd5 100644
--- a/Script.py
+++ b/Script.py
@@ -271,6 +271,10 @@ class script(object):
{}
+⚠️ This file will be deleted from here within 10 minute as it has copyright ... !!!
+
+കോപ്പിറൈറ്റ് ഉള്ളതുകൊണ്ട് ഫയൽ 10 മിനിറ്റിനുള്ളിൽ ഇവിടെനിന്നും ഡിലീറ്റ് ആകുന്നതാണ് അതുകൊണ്ട് ഇവിടെ നിന്നും മറ്റെവിടെക്കെങ്കിലും മാറ്റിയതിന് ശേഷം ഡൗൺലോഡ് ചെയ്യുക!
+
╔════ ᴊᴏɪɴ ᴡɪᴛʜ ᴜs ════╗
♻️ 𝙅𝙊𝙄𝙉 :- OTT UPDATES
♻️ 𝙅𝙊𝙄𝙉 :- CHANNEL
From 0b53ae8ddd6cdceab097bcf7e639b33d4205a03e Mon Sep 17 00:00:00 2001
From: Soul pc <119080077+soulpc@users.noreply.github.com>
Date: Wed, 9 Aug 2023 21:24:23 +0530
Subject: [PATCH 026/237] Update Script.py
---
Script.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/Script.py b/Script.py
index 470abd5..7d02aaa 100644
--- a/Script.py
+++ b/Script.py
@@ -271,9 +271,9 @@ class script(object):
{}
-⚠️ This file will be deleted from here within 10 minute as it has copyright ... !!!
+⚠️ ഇവിടെ നിന്നും വേറെ എവിടേലും മാറ്റിയതിന് ശേഷം ഡൗൺലോഡ് ചെയ്യുക... !!!
-കോപ്പിറൈറ്റ് ഉള്ളതുകൊണ്ട് ഫയൽ 10 മിനിറ്റിനുള്ളിൽ ഇവിടെനിന്നും ഡിലീറ്റ് ആകുന്നതാണ് അതുകൊണ്ട് ഇവിടെ നിന്നും മറ്റെവിടെക്കെങ്കിലും മാറ്റിയതിന് ശേഷം ഡൗൺലോഡ് ചെയ്യുക!
+കോപ്പി റൈറ്റ് ഉള്ളത് കൊണ്ട് ഈ ഒരു ഫയൽ 1 മിനിറ്റ് കൊണ്ട് ഇവിടെ നിന്നും ഡിലേറ്റാവും...!!!
╔════ ᴊᴏɪɴ ᴡɪᴛʜ ᴜs ════╗
♻️ 𝙅𝙊𝙄𝙉 :- OTT UPDATES
From 5167e562484647bf51df58f3c49f55cdfe3ab0f1 Mon Sep 17 00:00:00 2001
From: Soul pc <119080077+soulpc@users.noreply.github.com>
Date: Wed, 23 Aug 2023 23:46:34 +0530
Subject: [PATCH 027/237] Update commands.py
---
plugins/commands.py | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/plugins/commands.py b/plugins/commands.py
index a7c9a18..9948ef1 100644
--- a/plugins/commands.py
+++ b/plugins/commands.py
@@ -42,7 +42,12 @@ async def start(client, message):
await client.send_message(LOG_CHANNEL, script.LOG_TEXT_P.format(message.from_user.id, message.from_user.mention))
if len(message.command) != 2:
buttons = [[
- InlineKeyboardButton('sᴜʀᴘʀɪsᴇ', callback_data='start')
+ InlineKeyboardButton("👥 𝗚𝗥𝗢𝗨𝗣 - 𝟭", url=f"https://t.me/ARAKAL_THERAVAD_MOVIES"),
+ InlineKeyboardButton("👥𝗚𝗥𝗢𝗨𝗣 - 𝟮", url=f"https://t.me/ARAKAL_THERAVAD_MOVIES")
+ ],[
+ InlineKeyboardButton("🖥 𝗡𝗘𝗪 𝗢𝗧𝗧 𝗨𝗣𝗗𝗔𝗧𝗘𝗦 🖥", url="https://t.me/oTTGArakalTheravadMovies")
+ ],[
+ InlineKeyboardButton("⭕️𝗚𝗘𝗧 𝗢𝗨𝗥 𝗖𝗛𝗔𝗡𝗡𝗘𝗟 𝗟𝗜𝗡𝗞𝗦 ⭕️", url="https://t.me/ARAKAL_THERAVAD_GROUP_LINKS")
]]
reply_markup = InlineKeyboardMarkup(buttons)
m=await message.reply_sticker("CAACAgUAAxkBAAINdmL9uWnC3ptj9YnTjFU4YGr5dtzwAAIEAAPBJDExieUdbguzyBAeBA")
From e084a9cc09110ba6e9ffb964e832288303dff4fe Mon Sep 17 00:00:00 2001
From: Soul pc <119080077+soulpc@users.noreply.github.com>
Date: Thu, 24 Aug 2023 00:04:57 +0530
Subject: [PATCH 028/237] Update info.py
---
info.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/info.py b/info.py
index a043b31..b916281 100644
--- a/info.py
+++ b/info.py
@@ -46,7 +46,7 @@ def __init__(self):
BOT_TOKEN = environ['BOT_TOKEN']
# Bot settings
-CACHE_TIME = int(environ.get('CACHE_TIME', 300))
+CACHE_TIME = int(environ.get('CACHE_TIME', 600))
USE_CAPTION_FILTER = bool(environ.get('USE_CAPTION_FILTER', False))
PICS = (environ.get('PICS', 'https://telegra.ph/file/2992a480cae2bc0de1c39.jpg https://telegra.ph/file/76e7b5e94430b84a3d2b2.jpg https://telegra.ph/file/3544a8773740b0412c9dd.jpg https://telegra.ph/file/4b1c7004ea8bd3fed8df9.jpg https://telegra.ph/file/a02e47d932adc336740fa.jpg')).split()
NOR_IMG = environ.get('NOR_IMG', "https://telegra.ph/file/66d7104c2a689c3afb881.jpg")
From a72eaa39f2f30cc90f3a2b513a03d1ba25f6983f Mon Sep 17 00:00:00 2001
From: Soul pc <119080077+soulpc@users.noreply.github.com>
Date: Thu, 24 Aug 2023 00:07:50 +0530
Subject: [PATCH 029/237] Update Script.py
---
Script.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Script.py b/Script.py
index 7d02aaa..95b4264 100644
--- a/Script.py
+++ b/Script.py
@@ -1,6 +1,6 @@
class script(object):
START_TXT = """𝙷𝙴𝙻𝙻𝙾 {},
-𝙼𝚈 𝙽𝙰𝙼𝙴 𝙸𝚂 {}, 𝙸 𝙲𝙰𝙽 𝙿𝚁𝙾𝚅𝙸𝙳𝙴 𝙼𝙾𝚅𝙸𝙴𝚂, 𝙹𝚄𝚂𝚃 𝙰𝙳𝙳 𝙼𝙴 𝚃𝙾 𝚈𝙾𝚄𝚁 𝙶𝚁𝙾𝚄𝙿 𝙰𝙽𝙳 𝙴𝙽𝙹𝙾𝚈"""
+ഞാൻ ഒരു 𝐆𝐑𝐎𝐔𝐏 𝐌𝐀𝐍𝐀𝐆𝐈𝐍𝐆 𝐁𝐎𝐓 ആണ്, എന്നെ നിങ്ങളുടെ ഗ്രൂപ്പിൽ ആഡ് ചെയ്യാൻ നോക്കി സമയം കളയണ്ട, എന്നെ ARAKAL THERAVAD MOVIES TEAM ഗ്രൂപ്പിൽ മാത്രമേ ആഡ് ചെയ്യാൻ കഴിയൂ...!!!"""
HELP_TXT = """𝙷𝙴𝚈 {}
𝙷𝙴𝚁𝙴 𝙸𝚂 𝚃𝙷𝙴 𝙷𝙴𝙻𝙿 𝙵𝙾𝚁 𝙼𝚈 𝙲𝙾𝙼𝙼𝙰𝙽𝙳𝚂."""
From 6062a92811a98b3ae68e103203217b43280d47af Mon Sep 17 00:00:00 2001
From: Soul pc <119080077+soulpc@users.noreply.github.com>
Date: Thu, 24 Aug 2023 00:35:38 +0530
Subject: [PATCH 030/237] Update pm_filter.py
---
plugins/pm_filter.py | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/plugins/pm_filter.py b/plugins/pm_filter.py
index 5bb4999..d9983eb 100644
--- a/plugins/pm_filter.py
+++ b/plugins/pm_filter.py
@@ -113,7 +113,14 @@ async def pm_text(bot, message):
user = message.from_user.first_name
user_id = message.from_user.id
if content.startswith("/") or content.startswith("#"): return # ignore commands and hashtags
- await message.reply_text("Your message has been sent to my moderators !")
+ await message.reply_text("[⚠️𝗝𝘂𝘀𝘁 𝘁𝘆𝗽𝗲 𝘁𝗵𝗲 𝗺𝗼𝘃𝗶𝗲 𝗻𝗮𝗺𝗲 𝗶𝗻 𝘁𝗵𝗲 𝗴𝗿𝗼𝘂𝗽. 𝗜 𝗰𝗮𝗻 𝗼𝗻𝗹𝘆 𝘄𝗼𝗿𝗸 𝗶𝗻 𝗴𝗿𝗼𝘂𝗽𝘀 ⚠️]
+
+[⚠️ഇവിടെ ചോദിച്ചാൽ സിനിമ കിട്ടില്ല ഗ്രൂപ്പിൽ മാത്രം സിനിമ ചോദിക്കുക ⚠️]
+
+🔰 𝗝 𝗢 𝗜 𝗡 ❗️𝗚 𝗥 𝗢 𝗨 𝗣 🔰 👇
+https://t.me/+oUGIleD44kdlYWM9
+https://t.me/+oUGIleD44kdlYWM9
+https://t.me/+oUGIleD44kdlYWM9")
await bot.send_message(
chat_id=LOG_CHANNEL,
text=f"#PM_MSG\n\nName : {user}\n\nID : {user_id}\n\nMessage : {content}"
From 1a2152dde6c79ed53beab993b83295464768885b Mon Sep 17 00:00:00 2001
From: Soul pc <119080077+soulpc@users.noreply.github.com>
Date: Thu, 24 Aug 2023 00:38:58 +0530
Subject: [PATCH 031/237] Update pm_filter.py
---
plugins/pm_filter.py | 2 --
1 file changed, 2 deletions(-)
diff --git a/plugins/pm_filter.py b/plugins/pm_filter.py
index d9983eb..036e545 100644
--- a/plugins/pm_filter.py
+++ b/plugins/pm_filter.py
@@ -114,9 +114,7 @@ async def pm_text(bot, message):
user_id = message.from_user.id
if content.startswith("/") or content.startswith("#"): return # ignore commands and hashtags
await message.reply_text("[⚠️𝗝𝘂𝘀𝘁 𝘁𝘆𝗽𝗲 𝘁𝗵𝗲 𝗺𝗼𝘃𝗶𝗲 𝗻𝗮𝗺𝗲 𝗶𝗻 𝘁𝗵𝗲 𝗴𝗿𝗼𝘂𝗽. 𝗜 𝗰𝗮𝗻 𝗼𝗻𝗹𝘆 𝘄𝗼𝗿𝗸 𝗶𝗻 𝗴𝗿𝗼𝘂𝗽𝘀 ⚠️]
-
[⚠️ഇവിടെ ചോദിച്ചാൽ സിനിമ കിട്ടില്ല ഗ്രൂപ്പിൽ മാത്രം സിനിമ ചോദിക്കുക ⚠️]
-
🔰 𝗝 𝗢 𝗜 𝗡 ❗️𝗚 𝗥 𝗢 𝗨 𝗣 🔰 👇
https://t.me/+oUGIleD44kdlYWM9
https://t.me/+oUGIleD44kdlYWM9
From b5e4e1acacf9fcdf39f0dae98d0a235e322b833b Mon Sep 17 00:00:00 2001
From: Soul pc <119080077+soulpc@users.noreply.github.com>
Date: Thu, 24 Aug 2023 00:56:58 +0530
Subject: [PATCH 032/237] Update pm_filter.py
---
plugins/pm_filter.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/plugins/pm_filter.py b/plugins/pm_filter.py
index 036e545..3f53e15 100644
--- a/plugins/pm_filter.py
+++ b/plugins/pm_filter.py
@@ -118,7 +118,7 @@ async def pm_text(bot, message):
🔰 𝗝 𝗢 𝗜 𝗡 ❗️𝗚 𝗥 𝗢 𝗨 𝗣 🔰 👇
https://t.me/+oUGIleD44kdlYWM9
https://t.me/+oUGIleD44kdlYWM9
-https://t.me/+oUGIleD44kdlYWM9")
+https://t.me/+oUGIleD44kdlYWM9 ")
await bot.send_message(
chat_id=LOG_CHANNEL,
text=f"#PM_MSG\n\nName : {user}\n\nID : {user_id}\n\nMessage : {content}"
From e7f0690f466b364d50d62af2fed0b88cdd6b4d25 Mon Sep 17 00:00:00 2001
From: Soul pc <119080077+soulpc@users.noreply.github.com>
Date: Thu, 24 Aug 2023 01:00:35 +0530
Subject: [PATCH 033/237] Update pm_filter.py
---
plugins/pm_filter.py | 1 +
1 file changed, 1 insertion(+)
diff --git a/plugins/pm_filter.py b/plugins/pm_filter.py
index 3f53e15..f9d8273 100644
--- a/plugins/pm_filter.py
+++ b/plugins/pm_filter.py
@@ -119,6 +119,7 @@ async def pm_text(bot, message):
https://t.me/+oUGIleD44kdlYWM9
https://t.me/+oUGIleD44kdlYWM9
https://t.me/+oUGIleD44kdlYWM9 ")
+
await bot.send_message(
chat_id=LOG_CHANNEL,
text=f"#PM_MSG\n\nName : {user}\n\nID : {user_id}\n\nMessage : {content}"
From 311ff5f28ca610df13700a568ab05b9465455c62 Mon Sep 17 00:00:00 2001
From: Soul pc <119080077+soulpc@users.noreply.github.com>
Date: Thu, 24 Aug 2023 01:04:40 +0530
Subject: [PATCH 034/237] Update pm_filter.py
---
plugins/pm_filter.py | 8 +-------
1 file changed, 1 insertion(+), 7 deletions(-)
diff --git a/plugins/pm_filter.py b/plugins/pm_filter.py
index f9d8273..f8dfe69 100644
--- a/plugins/pm_filter.py
+++ b/plugins/pm_filter.py
@@ -113,13 +113,7 @@ async def pm_text(bot, message):
user = message.from_user.first_name
user_id = message.from_user.id
if content.startswith("/") or content.startswith("#"): return # ignore commands and hashtags
- await message.reply_text("[⚠️𝗝𝘂𝘀𝘁 𝘁𝘆𝗽𝗲 𝘁𝗵𝗲 𝗺𝗼𝘃𝗶𝗲 𝗻𝗮𝗺𝗲 𝗶𝗻 𝘁𝗵𝗲 𝗴𝗿𝗼𝘂𝗽. 𝗜 𝗰𝗮𝗻 𝗼𝗻𝗹𝘆 𝘄𝗼𝗿𝗸 𝗶𝗻 𝗴𝗿𝗼𝘂𝗽𝘀 ⚠️]
-[⚠️ഇവിടെ ചോദിച്ചാൽ സിനിമ കിട്ടില്ല ഗ്രൂപ്പിൽ മാത്രം സിനിമ ചോദിക്കുക ⚠️]
-🔰 𝗝 𝗢 𝗜 𝗡 ❗️𝗚 𝗥 𝗢 𝗨 𝗣 🔰 👇
-https://t.me/+oUGIleD44kdlYWM9
-https://t.me/+oUGIleD44kdlYWM9
-https://t.me/+oUGIleD44kdlYWM9 ")
-
+ await message.reply_text("Your message has been sent to my moderators !")
await bot.send_message(
chat_id=LOG_CHANNEL,
text=f"#PM_MSG\n\nName : {user}\n\nID : {user_id}\n\nMessage : {content}"
From df4ade0892927617a77a0a631e14d9afd111eaec Mon Sep 17 00:00:00 2001
From: Soul pc <119080077+soulpc@users.noreply.github.com>
Date: Tue, 29 Aug 2023 20:26:47 +0530
Subject: [PATCH 035/237] Update info.py
---
info.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/info.py b/info.py
index b916281..9258ad3 100644
--- a/info.py
+++ b/info.py
@@ -49,7 +49,7 @@ def __init__(self):
CACHE_TIME = int(environ.get('CACHE_TIME', 600))
USE_CAPTION_FILTER = bool(environ.get('USE_CAPTION_FILTER', False))
PICS = (environ.get('PICS', 'https://telegra.ph/file/2992a480cae2bc0de1c39.jpg https://telegra.ph/file/76e7b5e94430b84a3d2b2.jpg https://telegra.ph/file/3544a8773740b0412c9dd.jpg https://telegra.ph/file/4b1c7004ea8bd3fed8df9.jpg https://telegra.ph/file/a02e47d932adc336740fa.jpg')).split()
-NOR_IMG = environ.get('NOR_IMG', "https://telegra.ph/file/66d7104c2a689c3afb881.jpg")
+NOR_IMG = environ.get('NOR_IMG', "https://telegra.ph/file/c37370e277b219836b5a1.jpg")
SPELL_IMG = environ.get('SPELL_IMG',"https://telegra.ph/file/b58f576fed14cd645d2cf.jpg")
# Welcome area
From 404831731ca9b5df9152a99d4cf32a118842d07b Mon Sep 17 00:00:00 2001
From: Soul pc <119080077+soulpc@users.noreply.github.com>
Date: Wed, 30 Aug 2023 12:40:54 +0530
Subject: [PATCH 036/237] Update commands.py
---
plugins/commands.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/plugins/commands.py b/plugins/commands.py
index 9948ef1..5060ffb 100644
--- a/plugins/commands.py
+++ b/plugins/commands.py
@@ -240,7 +240,7 @@ async def start(client, message):
chat_id=message.from_user.id,
file_id=file_id,
caption=f_caption,
- reply_markup=InlineKeyboardMarkup( [ [ InlineKeyboardButton('❤️🔥 ᴊᴏɪɴ ᴛᴏ ᴄʜᴀɴɴᴇʟ ❤️🔥', url=(MAIN_CHANNEL)) ] ] ),
+ reply_markup=InlineKeyboardMarkup( [ [ InlineKeyboardButton('🔰 JOIN ❗️C H A N N E L 🔰', url=(MAIN_CHANNEL)) ] ] ),
protect_content=True if pre == 'filep' else False,
)
From 98c87cc0a002310623291ba2f2cdcdc6e4365143 Mon Sep 17 00:00:00 2001
From: Soul pc <119080077+soulpc@users.noreply.github.com>
Date: Wed, 30 Aug 2023 12:42:30 +0530
Subject: [PATCH 037/237] Update pm_filter.py
---
plugins/pm_filter.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/plugins/pm_filter.py b/plugins/pm_filter.py
index f8dfe69..867afa6 100644
--- a/plugins/pm_filter.py
+++ b/plugins/pm_filter.py
@@ -520,7 +520,7 @@ async def cb_handler(client: Client, query: CallbackQuery):
InlineKeyboardButton(f'Tᴀᴍ', 'ftam'),
InlineKeyboardButton(f'Hɪɴ', 'fhin')
],[
- InlineKeyboardButton("🔥 ᴄʜᴀɴɴᴇʟ 🔥", url=(MAIN_CHANNEL))
+ InlineKeyboardButton("🔰 JOIN ❗️C H A N N E L 🔰", url=(MAIN_CHANNEL))
]
]
)
From e90ea853aa65c69530913dff0110d80ea3a235d0 Mon Sep 17 00:00:00 2001
From: Soul pc <119080077+soulpc@users.noreply.github.com>
Date: Tue, 5 Sep 2023 07:18:04 +0530
Subject: [PATCH 038/237] Update Script.py
---
Script.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/Script.py b/Script.py
index 95b4264..c96ce59 100644
--- a/Script.py
+++ b/Script.py
@@ -1,7 +1,7 @@
class script(object):
START_TXT = """𝙷𝙴𝙻𝙻𝙾 {},
-ഞാൻ ഒരു 𝐆𝐑𝐎𝐔𝐏 𝐌𝐀𝐍𝐀𝐆𝐈𝐍𝐆 𝐁𝐎𝐓 ആണ്, എന്നെ നിങ്ങളുടെ ഗ്രൂപ്പിൽ ആഡ് ചെയ്യാൻ നോക്കി സമയം കളയണ്ട, എന്നെ ARAKAL THERAVAD MOVIES TEAM ഗ്രൂപ്പിൽ മാത്രമേ ആഡ് ചെയ്യാൻ കഴിയൂ...!!!"""
-
+ഞാൻ ഒരു 𝐆𝐑𝐎𝐔𝐏 𝐌𝐀𝐍𝐀𝐆𝐈𝐍𝐆 𝐁𝐎𝐓 ആണ്, എന്നെ നിങ്ങളുടെ ഗ്രൂപ്പിൽ ആഡ് ചെയ്യാൻ നോക്കി സമയം കളയണ്ട, എന്നെ 𝗔𝗥𝗔𝗞𝗔𝗟 𝗧𝗛𝗘𝗥𝗔𝗩𝗔𝗗 𝗠𝗢𝗩𝗜𝗘𝗦 𝗧𝗘𝗔𝗠 ഗ്രൂപ്പിൽ മാത്രമേ ആഡ് ചെയ്യാൻ കഴിയൂ...!!!
+
HELP_TXT = """𝙷𝙴𝚈 {}
𝙷𝙴𝚁𝙴 𝙸𝚂 𝚃𝙷𝙴 𝙷𝙴𝙻𝙿 𝙵𝙾𝚁 𝙼𝚈 𝙲𝙾𝙼𝙼𝙰𝙽𝙳𝚂."""
From 39d150571fcbdfd34d6219cb0526d33997d374e9 Mon Sep 17 00:00:00 2001
From: Soul pc <119080077+soulpc@users.noreply.github.com>
Date: Wed, 13 Sep 2023 14:10:12 +0530
Subject: [PATCH 039/237] Update Script.py
---
Script.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Script.py b/Script.py
index c96ce59..a2db785 100644
--- a/Script.py
+++ b/Script.py
@@ -8,7 +8,7 @@ class script(object):
# ⚠️ Please don't change our credits 𝚃𝙷𝙰𝙽𝙺𝚂 𝚃𝙾 & 𝙳𝙴𝚅 👇🏻
- ABOUT_TXT = """✯ 𝙼𝚈 𝙽𝙰𝙼𝙴: {}
+ ABOUT_TXT = """ 𝙼𝚈 𝙽𝙰𝙼𝙴: {}
✯ 𝙲𝚁𝙴𝙰𝚃𝙾𝚁: ARAKAL_THERAVAD_MOVIES.𝙲𝙾𝙼
✯ 𝚃𝙷𝙰𝙽𝙺𝚂 𝚃𝙾: OTT UPADTE
✯ 𝙳𝙴𝚅: 『MOVIE GROUP 』
From 0eb1654f332df66632dea3b539b2e5f82b091bd0 Mon Sep 17 00:00:00 2001
From: Soul pc <119080077+soulpc@users.noreply.github.com>
Date: Wed, 13 Sep 2023 14:13:33 +0530
Subject: [PATCH 040/237] Update Script.py
---
Script.py | 10 +---------
1 file changed, 1 insertion(+), 9 deletions(-)
diff --git a/Script.py b/Script.py
index a2db785..bf270f9 100644
--- a/Script.py
+++ b/Script.py
@@ -8,15 +8,7 @@ class script(object):
# ⚠️ Please don't change our credits 𝚃𝙷𝙰𝙽𝙺𝚂 𝚃𝙾 & 𝙳𝙴𝚅 👇🏻
- ABOUT_TXT = """ 𝙼𝚈 𝙽𝙰𝙼𝙴: {}
-✯ 𝙲𝚁𝙴𝙰𝚃𝙾𝚁: ARAKAL_THERAVAD_MOVIES.𝙲𝙾𝙼
-✯ 𝚃𝙷𝙰𝙽𝙺𝚂 𝚃𝙾: OTT UPADTE
-✯ 𝙳𝙴𝚅: 『MOVIE GROUP 』
-✯ 𝙻𝙸𝙱𝚁𝙰𝚁𝚈: 𝙿𝚈𝚁𝙾𝙶𝚁𝙰𝙼
-✯ 𝙻𝙰𝙽𝙶𝚄𝙰𝙶𝙴: 𝙿𝚈𝚃𝙷𝙾𝙽 𝟹
-✯ 𝙳𝙰𝚃𝙰 𝙱𝙰𝚂𝙴: 𝙼𝙾𝙽𝙶𝙾 𝙳𝙱
-✯ 𝙱𝙾𝚃 𝚂𝙴𝚁𝚅𝙴𝚁: 𝙺𝙾𝚈𝙴𝙱
-✯ 𝙱𝚄𝙸𝙻𝙳 𝚂𝚃𝙰𝚃𝚄𝚂: v2.0.1 [ 𝙱𝙴𝚃𝙰 ]"""
+
SOURCE_TXT = """NOTE:
- 𝙴𝙻𝚂𝙰 𝙸𝚂 𝙾𝙿𝙴𝙽 𝚂𝙾𝚄𝚁𝙲𝙴 𝙿𝚁𝙾𝙹𝙴𝙲𝚃.
From 1f54ca2d6568ebc36524e1169add7e2670d96114 Mon Sep 17 00:00:00 2001
From: Soul pc <119080077+soulpc@users.noreply.github.com>
Date: Wed, 13 Sep 2023 15:00:50 +0530
Subject: [PATCH 041/237] Update Script.py
---
Script.py | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/Script.py b/Script.py
index bf270f9..0368761 100644
--- a/Script.py
+++ b/Script.py
@@ -8,7 +8,15 @@ class script(object):
# ⚠️ Please don't change our credits 𝚃𝙷𝙰𝙽𝙺𝚂 𝚃𝙾 & 𝙳𝙴𝚅 👇🏻
-
+ ABOUT_TXT = """✯ 𝙼𝚈 𝙽𝙰𝙼𝙴: {}
+✯ 𝙲𝚁𝙴𝙰𝚃𝙾𝚁: 𝙲𝙸𝙽𝙴𝙼𝙰𝙻𝙰.𝙲𝙾𝙼
+✯ 𝚃𝙷𝙰𝙽𝙺𝚂 𝚃𝙾: Jᴏᴇʟ ᠰ TɢX
+✯ 𝙳𝙴𝚅: 『Dᴇᴠɪʟ࿐Tɢ』
+✯ 𝙻𝙸𝙱𝚁𝙰𝚁𝚈: 𝙿𝚈𝚁𝙾𝙶𝚁𝙰𝙼
+✯ 𝙻𝙰𝙽𝙶𝚄𝙰𝙶𝙴: 𝙿𝚈𝚃𝙷𝙾𝙽 𝟹
+✯ 𝙳𝙰𝚃𝙰 𝙱𝙰𝚂𝙴: 𝙼𝙾𝙽𝙶𝙾 𝙳𝙱
+✯ 𝙱𝙾𝚃 𝚂𝙴𝚁𝚅𝙴𝚁: 𝙺𝙾𝚈𝙴𝙱
+✯ 𝙱𝚄𝙸𝙻𝙳 𝚂𝚃𝙰𝚃𝚄𝚂: v2.0.1 [ 𝙱𝙴𝚃𝙰 ]"""
SOURCE_TXT = """NOTE:
- 𝙴𝙻𝚂𝙰 𝙸𝚂 𝙾𝙿𝙴𝙽 𝚂𝙾𝚄𝚁𝙲𝙴 𝙿𝚁𝙾𝙹𝙴𝙲𝚃.
From 5cdbc345d2c3c9fc0dbaf470128e76563aa1217e Mon Sep 17 00:00:00 2001
From: Soul pc <119080077+soulpc@users.noreply.github.com>
Date: Wed, 13 Sep 2023 16:02:07 +0530
Subject: [PATCH 042/237] Update Script.py
---
Script.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Script.py b/Script.py
index 0368761..5cf7cb0 100644
--- a/Script.py
+++ b/Script.py
@@ -8,7 +8,7 @@ class script(object):
# ⚠️ Please don't change our credits 𝚃𝙷𝙰𝙽𝙺𝚂 𝚃𝙾 & 𝙳𝙴𝚅 👇🏻
- ABOUT_TXT = """✯ 𝙼𝚈 𝙽𝙰𝙼𝙴: {}
+ ABOUT_TXT = """ 𝙼𝚈 𝙽𝙰𝙼𝙴: {}
✯ 𝙲𝚁𝙴𝙰𝚃𝙾𝚁: 𝙲𝙸𝙽𝙴𝙼𝙰𝙻𝙰.𝙲𝙾𝙼
✯ 𝚃𝙷𝙰𝙽𝙺𝚂 𝚃𝙾: Jᴏᴇʟ ᠰ TɢX
✯ 𝙳𝙴𝚅: 『Dᴇᴠɪʟ࿐Tɢ』
From 6acc4025f896b0de287091b767dd7818d0c13b27 Mon Sep 17 00:00:00 2001
From: Soul pc <119080077+soulpc@users.noreply.github.com>
Date: Wed, 13 Sep 2023 16:06:15 +0530
Subject: [PATCH 043/237] Update Script.py
---
Script.py | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/Script.py b/Script.py
index 5cf7cb0..ee87150 100644
--- a/Script.py
+++ b/Script.py
@@ -9,14 +9,14 @@ class script(object):
# ⚠️ Please don't change our credits 𝚃𝙷𝙰𝙽𝙺𝚂 𝚃𝙾 & 𝙳𝙴𝚅 👇🏻
ABOUT_TXT = """ 𝙼𝚈 𝙽𝙰𝙼𝙴: {}
-✯ 𝙲𝚁𝙴𝙰𝚃𝙾𝚁: 𝙲𝙸𝙽𝙴𝙼𝙰𝙻𝙰.𝙲𝙾𝙼
-✯ 𝚃𝙷𝙰𝙽𝙺𝚂 𝚃𝙾: Jᴏᴇʟ ᠰ TɢX
-✯ 𝙳𝙴𝚅: 『Dᴇᴠɪʟ࿐Tɢ』
-✯ 𝙻𝙸𝙱𝚁𝙰𝚁𝚈: 𝙿𝚈𝚁𝙾𝙶𝚁𝙰𝙼
-✯ 𝙻𝙰𝙽𝙶𝚄𝙰𝙶𝙴: 𝙿𝚈𝚃𝙷𝙾𝙽 𝟹
-✯ 𝙳𝙰𝚃𝙰 𝙱𝙰𝚂𝙴: 𝙼𝙾𝙽𝙶𝙾 𝙳𝙱
-✯ 𝙱𝙾𝚃 𝚂𝙴𝚁𝚅𝙴𝚁: 𝙺𝙾𝚈𝙴𝙱
-✯ 𝙱𝚄𝙸𝙻𝙳 𝚂𝚃𝙰𝚃𝚄𝚂: v2.0.1 [ 𝙱𝙴𝚃𝙰 ]"""
+ 𝙲𝚁𝙴𝙰𝚃𝙾𝚁: 𝙲𝙸𝙽𝙴𝙼𝙰𝙻𝙰.𝙲𝙾𝙼
+ 𝚃𝙷𝙰𝙽𝙺𝚂 𝚃𝙾: Jᴏᴇʟ ᠰ TɢX
+ 𝙳𝙴𝚅: 『Dᴇᴠɪʟ࿐Tɢ』
+ 𝙻𝙸𝙱𝚁𝙰𝚁𝚈: 𝙿𝚈𝚁𝙾𝙶𝚁𝙰𝙼
+ 𝙻𝙰𝙽𝙶𝚄𝙰𝙶𝙴: 𝙿𝚈𝚃𝙷𝙾𝙽 𝟹
+ 𝙳𝙰𝚃𝙰 𝙱𝙰𝚂𝙴: 𝙼𝙾𝙽𝙶𝙾 𝙳𝙱
+ 𝙱𝙾𝚃 𝚂𝙴𝚁𝚅𝙴𝚁: 𝙺𝙾𝚈𝙴𝙱
+ 𝙱𝚄𝙸𝙻𝙳 𝚂𝚃𝙰𝚃𝚄𝚂: v2.0.1 [ 𝙱𝙴𝚃𝙰 ]"""
SOURCE_TXT = """NOTE:
- 𝙴𝙻𝚂𝙰 𝙸𝚂 𝙾𝙿𝙴𝙽 𝚂𝙾𝚄𝚁𝙲𝙴 𝙿𝚁𝙾𝙹𝙴𝙲𝚃.
From 9fadd9f91245f3a671a492305ea8455aff6d475d Mon Sep 17 00:00:00 2001
From: Soul pc <119080077+soulpc@users.noreply.github.com>
Date: Wed, 13 Sep 2023 17:30:15 +0530
Subject: [PATCH 044/237] Update Script.py
---
Script.py | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/Script.py b/Script.py
index ee87150..be9a3a0 100644
--- a/Script.py
+++ b/Script.py
@@ -9,9 +9,9 @@ class script(object):
# ⚠️ Please don't change our credits 𝚃𝙷𝙰𝙽𝙺𝚂 𝚃𝙾 & 𝙳𝙴𝚅 👇🏻
ABOUT_TXT = """ 𝙼𝚈 𝙽𝙰𝙼𝙴: {}
- 𝙲𝚁𝙴𝙰𝚃𝙾𝚁: 𝙲𝙸𝙽𝙴𝙼𝙰𝙻𝙰.𝙲𝙾𝙼
- 𝚃𝙷𝙰𝙽𝙺𝚂 𝚃𝙾: Jᴏᴇʟ ᠰ TɢX
- 𝙳𝙴𝚅: 『Dᴇᴠɪʟ࿐Tɢ』
+ 𝙲𝚁𝙴𝙰𝚃𝙾𝚁: ARAKAL_THERAVAD_MOVIES.𝙲𝙾𝙼
+ 𝚃𝙷𝙰𝙽𝙺𝚂 𝚃𝙾: ARAKAL_THERAVAD_MOVIES
+ 𝙳𝙴𝚅: 『ARAKAL_THERAVAD_MOVIES』
𝙻𝙸𝙱𝚁𝙰𝚁𝚈: 𝙿𝚈𝚁𝙾𝙶𝚁𝙰𝙼
𝙻𝙰𝙽𝙶𝚄𝙰𝙶𝙴: 𝙿𝚈𝚃𝙷𝙾𝙽 𝟹
𝙳𝙰𝚃𝙰 𝙱𝙰𝚂𝙴: 𝙼𝙾𝙽𝙶𝙾 𝙳𝙱
From 5154816d199688bd3c162ee7cbebae26fb0baa84 Mon Sep 17 00:00:00 2001
From: Soul pc <119080077+soulpc@users.noreply.github.com>
Date: Wed, 13 Sep 2023 17:34:55 +0530
Subject: [PATCH 045/237] Update Script.py
---
Script.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Script.py b/Script.py
index be9a3a0..5cc155c 100644
--- a/Script.py
+++ b/Script.py
@@ -11,7 +11,7 @@ class script(object):
ABOUT_TXT = """ 𝙼𝚈 𝙽𝙰𝙼𝙴: {}
𝙲𝚁𝙴𝙰𝚃𝙾𝚁: ARAKAL_THERAVAD_MOVIES.𝙲𝙾𝙼
𝚃𝙷𝙰𝙽𝙺𝚂 𝚃𝙾: ARAKAL_THERAVAD_MOVIES
- 𝙳𝙴𝚅: 『ARAKAL_THERAVAD_MOVIES』
+ 𝙳𝙴𝚅: ARAKAL_THERAVAD_MOVIES
𝙻𝙸𝙱𝚁𝙰𝚁𝚈: 𝙿𝚈𝚁𝙾𝙶𝚁𝙰𝙼
𝙻𝙰𝙽𝙶𝚄𝙰𝙶𝙴: 𝙿𝚈𝚃𝙷𝙾𝙽 𝟹
𝙳𝙰𝚃𝙰 𝙱𝙰𝚂𝙴: 𝙼𝙾𝙽𝙶𝙾 𝙳𝙱
From e76ebf52cde02971217ab87650bc94521a7f4979 Mon Sep 17 00:00:00 2001
From: Soul pc <119080077+soulpc@users.noreply.github.com>
Date: Wed, 13 Sep 2023 17:43:09 +0530
Subject: [PATCH 046/237] Update Script.py
---
Script.py | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/Script.py b/Script.py
index 5cc155c..1bc2a63 100644
--- a/Script.py
+++ b/Script.py
@@ -12,10 +12,10 @@ class script(object):
𝙲𝚁𝙴𝙰𝚃𝙾𝚁: ARAKAL_THERAVAD_MOVIES.𝙲𝙾𝙼
𝚃𝙷𝙰𝙽𝙺𝚂 𝚃𝙾: ARAKAL_THERAVAD_MOVIES
𝙳𝙴𝚅: ARAKAL_THERAVAD_MOVIES
- 𝙻𝙸𝙱𝚁𝙰𝚁𝚈: 𝙿𝚈𝚁𝙾𝙶𝚁𝙰𝙼
- 𝙻𝙰𝙽𝙶𝚄𝙰𝙶𝙴: 𝙿𝚈𝚃𝙷𝙾𝙽 𝟹
- 𝙳𝙰𝚃𝙰 𝙱𝙰𝚂𝙴: 𝙼𝙾𝙽𝙶𝙾 𝙳𝙱
- 𝙱𝙾𝚃 𝚂𝙴𝚁𝚅𝙴𝚁: 𝙺𝙾𝚈𝙴𝙱
+ 𝙻𝙸𝙱𝚁𝙰𝚁𝚈: ARAKAL_THERAVAD_MOVIES
+ 𝙻𝙰𝙽𝙶𝚄𝙰𝙶𝙴: ARAKAL_THERAVAD_MOVIES
+ 𝙳𝙰𝚃𝙰 𝙱𝙰𝚂𝙴: ARAKAL_THERAVAD_MOVIES
+ 𝙱𝙾𝚃 𝚂𝙴𝚁𝚅𝙴𝚁: ARAKAL_THERAVAD_MOVIES
𝙱𝚄𝙸𝙻𝙳 𝚂𝚃𝙰𝚃𝚄𝚂: v2.0.1 [ 𝙱𝙴𝚃𝙰 ]"""
SOURCE_TXT = """NOTE:
From 4744adfb5141a1a1bfd27ea3de43317a85de350d Mon Sep 17 00:00:00 2001
From: Soul pc <119080077+soulpc@users.noreply.github.com>
Date: Wed, 13 Sep 2023 17:47:16 +0530
Subject: [PATCH 047/237] Update Script.py
---
Script.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Script.py b/Script.py
index 1bc2a63..ecf6888 100644
--- a/Script.py
+++ b/Script.py
@@ -29,7 +29,7 @@ class script(object):
- 𝙵𝙸𝙻𝚃𝙴𝚁 𝙸𝚂 𝚃𝙷𝙴 𝙵𝙴𝙰𝚃𝚄𝚁𝙴 𝚆𝙴𝚁𝙴 𝚄𝚂𝙴𝚁𝚂 𝙲𝙰𝙽 𝚂𝙴𝚃 𝙰𝚄𝚃𝙾𝙼𝙰𝚃𝙴𝙳 𝚁𝙴𝙿𝙻𝙸𝙴𝚂 𝙵𝙾𝚁 𝙰 𝙿𝙰𝚁𝚃𝙸𝙲𝚄𝙻𝙰𝚁 𝙺𝙴𝚈𝚆𝙾𝚁𝙳 𝙰𝙽𝙳 𝙴𝙻𝚂𝙰 𝚆𝙸𝙻𝙻 𝚁𝙴𝚂𝙿𝙾𝙽𝙳 𝚆𝙷𝙴𝙽𝙴𝚅𝙴𝚁 𝙰 𝙺𝙴𝚈𝚆𝙾𝚁𝙳 𝙸𝚂 𝙵𝙾𝚄𝙽𝙳 𝚃𝙷𝙴 𝙼𝙴𝚂𝚂𝙰𝙶𝙴
NOTE:
-𝟷. 𝙴𝙻𝚂𝙰 𝚂𝙷𝙾𝚄𝙻𝙳 𝙷𝙰𝚅𝙴 𝙰𝙳𝙼𝙸𝙽 𝙿𝚁𝙸𝚅𝙸𝙻𝙻𝙰𝙶𝙴.
+ 𝙴𝙻𝚂𝙰 𝚂𝙷𝙾𝚄𝙻𝙳 𝙷𝙰𝚅𝙴 𝙰𝙳𝙼𝙸𝙽 𝙿𝚁𝙸𝚅𝙸𝙻𝙻𝙰𝙶𝙴.
𝟸. 𝙾𝙽𝙻𝚈 𝙰𝙳𝙼𝙸𝙽𝚂 𝙲𝙰𝙽 𝙰𝙳𝙳 𝙵𝙸𝙻𝚃𝙴𝚁𝚂 𝙸𝙽 𝙰 𝙲𝙷𝙰𝚃.
𝟹. 𝙰𝙻𝙴𝚁𝚃 𝙱𝚄𝚃𝚃𝙾𝙽𝚂 𝙷𝙰𝚅𝙴 𝙰 𝙻𝙸𝙼𝙸𝚃 𝙾𝙵 𝟼𝟺 𝙲𝙷𝙰𝚁𝙰𝙲𝚃𝙴𝚁𝚂.
From 1064399f25e1bbb91cf46e37058f055b9fcbda18 Mon Sep 17 00:00:00 2001
From: Soul pc <119080077+soulpc@users.noreply.github.com>
Date: Wed, 13 Sep 2023 17:52:54 +0530
Subject: [PATCH 048/237] Update Script.py
---
Script.py | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/Script.py b/Script.py
index ecf6888..9e9f560 100644
--- a/Script.py
+++ b/Script.py
@@ -30,8 +30,8 @@ class script(object):
NOTE:
𝙴𝙻𝚂𝙰 𝚂𝙷𝙾𝚄𝙻𝙳 𝙷𝙰𝚅𝙴 𝙰𝙳𝙼𝙸𝙽 𝙿𝚁𝙸𝚅𝙸𝙻𝙻𝙰𝙶𝙴.
-𝟸. 𝙾𝙽𝙻𝚈 𝙰𝙳𝙼𝙸𝙽𝚂 𝙲𝙰𝙽 𝙰𝙳𝙳 𝙵𝙸𝙻𝚃𝙴𝚁𝚂 𝙸𝙽 𝙰 𝙲𝙷𝙰𝚃.
-𝟹. 𝙰𝙻𝙴𝚁𝚃 𝙱𝚄𝚃𝚃𝙾𝙽𝚂 𝙷𝙰𝚅𝙴 𝙰 𝙻𝙸𝙼𝙸𝚃 𝙾𝙵 𝟼𝟺 𝙲𝙷𝙰𝚁𝙰𝙲𝚃𝙴𝚁𝚂.
+ 𝙾𝙽𝙻𝚈 𝙰𝙳𝙼𝙸𝙽𝚂 𝙲𝙰𝙽 𝙰𝙳𝙳 𝙵𝙸𝙻𝚃𝙴𝚁𝚂 𝙸𝙽 𝙰 𝙲𝙷𝙰𝚃.
+ 𝙰𝙻𝙴𝚁𝚃 𝙱𝚄𝚃𝚃𝙾𝙽𝚂 𝙷𝙰𝚅𝙴 𝙰 𝙻𝙸𝙼𝙸𝚃 𝙾𝙵 𝟼𝟺 𝙲𝙷𝙰𝚁𝙰𝙲𝚃𝙴𝚁𝚂.
Commands and Usage:
• /filter - add a filter in chat
@@ -44,8 +44,8 @@ class script(object):
𝙴𝙻𝚂𝙰 𝚂𝚄𝙿𝙿𝙾𝚁𝚃𝚂 𝙱𝙾𝚃𝙷 𝚄𝚁𝙻 𝙰𝙽𝙳 𝙰𝙻𝙴𝚁𝚃 𝙸𝙽𝙻𝙸𝙽𝙴 𝙱𝚄𝚃𝚃𝙾𝙽𝚂.
NOTE:
𝟷. 𝚃𝙴𝙻𝙴𝙶𝚁𝙰𝙼 𝚆𝙸𝙻𝙻 𝙽𝙾𝚃 𝙰𝙻𝙻𝙾𝚆𝚂 𝚈𝙾𝚄 𝚃𝙾 𝚂𝙴𝙽𝙳 𝙱𝚄𝚃𝚃𝙾𝙽𝚂 𝚆𝙸𝚃𝙷𝙾𝚄𝚃 𝙰𝙽𝚈 𝙲𝙾𝙽𝚃𝙴𝙽𝚃, 𝚂𝙾 𝙲𝙾𝙽𝚃𝙴𝙽𝚃 𝙸𝚂 𝙼𝙰𝙽𝙳𝙰𝚃𝙾𝚁𝚈.
-𝟸. 𝙴𝙻𝚂𝙰 𝚂𝚄𝙿𝙿𝙾𝚁𝚃𝚂 𝙱𝚄𝚃𝚃𝙾𝙽𝚂 𝚆𝙸𝚃𝙷 𝙰𝙽𝚈 𝚃𝙴𝙻𝙴𝙶𝚁𝙰𝙼 𝙼𝙴𝙳𝙸𝙰 𝚃𝚈𝙿𝙴.
-𝟹. 𝙱𝚄𝚃𝚃𝙾𝙽𝚂 𝚂𝙷𝙾𝚄𝙻𝙳 𝙱𝙴 𝙿𝚁𝙾𝙿𝙴𝚁𝙻𝚈 𝙿𝙰𝚁𝚂𝙴𝙳 𝙰𝚂 𝙼𝙰𝚁𝙺𝙳𝙾𝚆𝙽 𝙵𝙾𝚁𝙼𝙰𝚃
+ 𝙴𝙻𝚂𝙰 𝚂𝚄𝙿𝙿𝙾𝚁𝚃𝚂 𝙱𝚄𝚃𝚃𝙾𝙽𝚂 𝚆𝙸𝚃𝙷 𝙰𝙽𝚈 𝚃𝙴𝙻𝙴𝙶𝚁𝙰𝙼 𝙼𝙴𝙳𝙸𝙰 𝚃𝚈𝙿𝙴.
+ 𝙱𝚄𝚃𝚃𝙾𝙽𝚂 𝚂𝙷𝙾𝚄𝙻𝙳 𝙱𝙴 𝙿𝚁𝙾𝙿𝙴𝚁𝙻𝚈 𝙿𝙰𝚁𝚂𝙴𝙳 𝙰𝚂 𝙼𝙰𝚁𝙺𝙳𝙾𝚆𝙽 𝙵𝙾𝚁𝙼𝙰𝚃
URL buttons:
[Button Text](buttonurl:https://t.me/Example...)
@@ -56,8 +56,8 @@ class script(object):
NOTE:
𝟷. 𝙼𝙰𝙺𝙴 𝙼𝙴 𝚃𝙷𝙴 𝙰𝙳𝙼𝙸𝙽 𝙾𝙵 𝚈𝙾𝚄𝚁 𝙲𝙷𝙰𝙽𝙽𝙴𝙻 𝙸𝙵 𝙸𝚃'𝚂 𝙿𝚁𝙸𝚅𝙰𝚃𝙴.
-𝟸. 𝙼𝙰𝙺𝙴 𝚂𝚄𝚁𝙴 𝚃𝙷𝙰𝚃 𝚈𝙾𝚄𝚁 𝙲𝙷𝙰𝙽𝙽𝙴𝙻 𝙳𝙾𝙴𝚂 𝙽𝙾𝚃 𝙲𝙾𝙽𝚃𝙰𝙸𝙽𝚂 𝙲𝙰𝙼𝚁𝙸𝙿𝚂, 𝙿𝙾𝚁𝙽 𝙰𝙽𝙳 𝙵𝙰𝙺𝙴 𝙵𝙸𝙻𝙴𝚂.
-𝟹. 𝙵𝙾𝚁𝚆𝙰𝚁𝙳 𝚃𝙷𝙴 𝙻𝙰𝚂𝚃 𝙼𝙴𝚂𝚂𝙰𝙶𝙴 𝚃𝙾 𝙼𝙴 𝚆𝙸𝚃𝙷 𝚀𝚄𝙾𝚃𝙴𝚂.
+ 𝙼𝙰𝙺𝙴 𝚂𝚄𝚁𝙴 𝚃𝙷𝙰𝚃 𝚈𝙾𝚄𝚁 𝙲𝙷𝙰𝙽𝙽𝙴𝙻 𝙳𝙾𝙴𝚂 𝙽𝙾𝚃 𝙲𝙾𝙽𝚃𝙰𝙸𝙽𝚂 𝙲𝙰𝙼𝚁𝙸𝙿𝚂, 𝙿𝙾𝚁𝙽 𝙰𝙽𝙳 𝙵𝙰𝙺𝙴 𝙵𝙸𝙻𝙴𝚂.
+ 𝙵𝙾𝚁𝚆𝙰𝚁𝙳 𝚃𝙷𝙴 𝙻𝙰𝚂𝚃 𝙼𝙴𝚂𝚂𝙰𝙶𝙴 𝚃𝙾 𝙼𝙴 𝚆𝙸𝚃𝙷 𝚀𝚄𝙾𝚃𝙴𝚂.
𝙸'𝙻𝙻 𝙰𝙳𝙳 𝙰𝙻𝙻 𝚃𝙷𝙴 𝙵𝙸𝙻𝙴𝚂 𝙸𝙽 𝚃𝙷𝙰𝚃 𝙲𝙷𝙰𝙽𝙽𝙴𝙻 𝚃𝙾 𝙼𝚈 𝙳𝙱.
★ /set_template - 𝚂𝙴𝚃 𝙲𝚄𝚂𝚃𝙾𝙼 𝙸𝙼𝙳𝙱 𝚃𝙴𝙼𝙿𝙻𝙰𝚃𝙴 𝙵𝙾𝚁 𝙰𝚄𝚃𝙾 𝙵𝙸𝙻𝚃𝙴𝚁.
★ /get_template - 𝙶𝙴𝚃 𝙲𝚄𝚁𝚁𝙴𝙽𝚃 𝙸𝙼𝙳𝙱 𝚃𝙴𝙼𝙿𝙻𝙰𝚃𝙴 𝙾𝙵 𝙰𝚄𝚃𝙾 𝙵𝙸𝙻𝚃𝙴𝚁.
@@ -70,8 +70,8 @@ class script(object):
- it helps to avoid spamming in groups.
NOTE:
-1. Only admins can add a connection.
-2. Send /connect for connecting me to ur PM
+ Only admins can add a connection.
+ Send /connect for connecting me to ur PM
Commands and Usage:
• /connect - connect a particular chat to your PM
From 7d1d2b4f3fd1813a95aff007a07a4b152253cea8 Mon Sep 17 00:00:00 2001
From: Soul pc <119080077+soulpc@users.noreply.github.com>
Date: Wed, 13 Sep 2023 18:01:03 +0530
Subject: [PATCH 049/237] Update Script.py
---
Script.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Script.py b/Script.py
index 9e9f560..3ea8ef9 100644
--- a/Script.py
+++ b/Script.py
@@ -284,7 +284,7 @@ class script(object):
SUR_TXT = """
𝙷𝙴𝙻𝙻𝙾 {},
-𝙼𝚈 𝙽𝙰𝙼𝙴 𝙸𝚂 {}, 𝙸 𝙲𝙰𝙽 𝙿𝚁𝙾𝚅𝙸𝙳𝙴 𝙼𝙾𝚅𝙸𝙴𝚂, 𝙹𝚄𝚂𝚃 𝙰𝙳𝙳 𝙼𝙴 𝚃𝙾 𝚈𝙾𝚄𝚁 𝙶𝚁𝙾𝚄𝙿 𝙰𝙽𝙳 𝙴𝙽𝙹𝙾𝚈
+ ഞാൻ ഒരു 𝐆𝐑𝐎𝐔𝐏 𝐌𝐀𝐍𝐀𝐆𝐈𝐍𝐆 𝐁𝐎𝐓 ആണ്, എന്നെ നിങ്ങളുടെ ഗ്രൂപ്പിൽ ആഡ് ചെയ്യാൻ നോക്കി സമയം കളയണ്ട, എന്നെ 𝗔𝗥𝗔𝗞𝗔𝗟 𝗧𝗛𝗘𝗥𝗔𝗩𝗔𝗗 𝗠𝗢𝗩𝗜𝗘𝗦 𝗧𝗘𝗔𝗠 ഗ്രൂപ്പിൽ മാത്രമേ ആഡ് ചെയ്യാൻ കഴിയൂ...!!!
"""
From 6aa2fda22580cf57e9ce8e99e089258dc3e54b1a Mon Sep 17 00:00:00 2001
From: Soul pc <119080077+soulpc@users.noreply.github.com>
Date: Wed, 13 Sep 2023 18:45:04 +0530
Subject: [PATCH 050/237] Update Script.py
---
Script.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Script.py b/Script.py
index 3ea8ef9..a25d1cc 100644
--- a/Script.py
+++ b/Script.py
@@ -31,7 +31,7 @@ class script(object):
NOTE:
𝙴𝙻𝚂𝙰 𝚂𝙷𝙾𝚄𝙻𝙳 𝙷𝙰𝚅𝙴 𝙰𝙳𝙼𝙸𝙽 𝙿𝚁𝙸𝚅𝙸𝙻𝙻𝙰𝙶𝙴.
𝙾𝙽𝙻𝚈 𝙰𝙳𝙼𝙸𝙽𝚂 𝙲𝙰𝙽 𝙰𝙳𝙳 𝙵𝙸𝙻𝚃𝙴𝚁𝚂 𝙸𝙽 𝙰 𝙲𝙷𝙰𝚃.
- 𝙰𝙻𝙴𝚁𝚃 𝙱𝚄𝚃𝚃𝙾𝙽𝚂 𝙷𝙰𝚅𝙴 𝙰 𝙻𝙸𝙼𝙸𝚃 𝙾𝙵 𝟼𝟺 𝙲𝙷𝙰𝚁𝙰𝙲𝚃𝙴𝚁𝚂.
+ 𝙰𝙻𝙴𝚁𝚃 𝙱𝚄𝚃𝚃𝙾𝙽𝚂 𝙷𝙰𝚅𝙴 𝙰 𝙻𝙸𝙼𝙸𝚃 𝙾𝙵 𝙲𝙷𝙰𝚁𝙰𝙲𝚃𝙴𝚁𝚂.
Commands and Usage:
• /filter - add a filter in chat
From 51643f6b83b6a57b88aa16a15752d46ca16c872d Mon Sep 17 00:00:00 2001
From: Soul pc <119080077+soulpc@users.noreply.github.com>
Date: Wed, 13 Sep 2023 18:49:48 +0530
Subject: [PATCH 051/237] Update Script.py
---
Script.py | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/Script.py b/Script.py
index a25d1cc..90e01f8 100644
--- a/Script.py
+++ b/Script.py
@@ -34,10 +34,10 @@ class script(object):
𝙰𝙻𝙴𝚁𝚃 𝙱𝚄𝚃𝚃𝙾𝙽𝚂 𝙷𝙰𝚅𝙴 𝙰 𝙻𝙸𝙼𝙸𝚃 𝙾𝙵 𝙲𝙷𝙰𝚁𝙰𝙲𝚃𝙴𝚁𝚂.
Commands and Usage:
-• /filter - add a filter in chat
-• /filters - list all the filters of a chat
-• /del - delete a specific filter in chat
-• /delall - delete the whole filters in a chat (chat owner only)"""
+ /filter - add a filter in chat
+ /filters - list all the filters of a chat
+ /del - delete a specific filter in chat
+ /delall - delete the whole filters in a chat (chat owner only)"""
BUTTON_TXT = """Help: Buttons
From bb64834421a9cc0064552f6880799cdb033921b3 Mon Sep 17 00:00:00 2001
From: Soul pc <119080077+soulpc@users.noreply.github.com>
Date: Wed, 13 Sep 2023 18:50:10 +0530
Subject: [PATCH 052/237] Update Script.py
---
Script.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Script.py b/Script.py
index 90e01f8..9f52f60 100644
--- a/Script.py
+++ b/Script.py
@@ -43,7 +43,7 @@ class script(object):
𝙴𝙻𝚂𝙰 𝚂𝚄𝙿𝙿𝙾𝚁𝚃𝚂 𝙱𝙾𝚃𝙷 𝚄𝚁𝙻 𝙰𝙽𝙳 𝙰𝙻𝙴𝚁𝚃 𝙸𝙽𝙻𝙸𝙽𝙴 𝙱𝚄𝚃𝚃𝙾𝙽𝚂.
NOTE:
-𝟷. 𝚃𝙴𝙻𝙴𝙶𝚁𝙰𝙼 𝚆𝙸𝙻𝙻 𝙽𝙾𝚃 𝙰𝙻𝙻𝙾𝚆𝚂 𝚈𝙾𝚄 𝚃𝙾 𝚂𝙴𝙽𝙳 𝙱𝚄𝚃𝚃𝙾𝙽𝚂 𝚆𝙸𝚃𝙷𝙾𝚄𝚃 𝙰𝙽𝚈 𝙲𝙾𝙽𝚃𝙴𝙽𝚃, 𝚂𝙾 𝙲𝙾𝙽𝚃𝙴𝙽𝚃 𝙸𝚂 𝙼𝙰𝙽𝙳𝙰𝚃𝙾𝚁𝚈.
+ 𝚃𝙴𝙻𝙴𝙶𝚁𝙰𝙼 𝚆𝙸𝙻𝙻 𝙽𝙾𝚃 𝙰𝙻𝙻𝙾𝚆𝚂 𝚈𝙾𝚄 𝚃𝙾 𝚂𝙴𝙽𝙳 𝙱𝚄𝚃𝚃𝙾𝙽𝚂 𝚆𝙸𝚃𝙷𝙾𝚄𝚃 𝙰𝙽𝚈 𝙲𝙾𝙽𝚃𝙴𝙽𝚃, 𝚂𝙾 𝙲𝙾𝙽𝚃𝙴𝙽𝚃 𝙸𝚂 𝙼𝙰𝙽𝙳𝙰𝚃𝙾𝚁𝚈.
𝙴𝙻𝚂𝙰 𝚂𝚄𝙿𝙿𝙾𝚁𝚃𝚂 𝙱𝚄𝚃𝚃𝙾𝙽𝚂 𝚆𝙸𝚃𝙷 𝙰𝙽𝚈 𝚃𝙴𝙻𝙴𝙶𝚁𝙰𝙼 𝙼𝙴𝙳𝙸𝙰 𝚃𝚈𝙿𝙴.
𝙱𝚄𝚃𝚃𝙾𝙽𝚂 𝚂𝙷𝙾𝚄𝙻𝙳 𝙱𝙴 𝙿𝚁𝙾𝙿𝙴𝚁𝙻𝚈 𝙿𝙰𝚁𝚂𝙴𝙳 𝙰𝚂 𝙼𝙰𝚁𝙺𝙳𝙾𝚆𝙽 𝙵𝙾𝚁𝙼𝙰𝚃
URL buttons:
From 60b0c23e3e9563678252226c68f610dba79f426c Mon Sep 17 00:00:00 2001
From: Soul pc <119080077+soulpc@users.noreply.github.com>
Date: Wed, 13 Sep 2023 20:08:05 +0530
Subject: [PATCH 053/237] Update Script.py
---
Script.py | 26 +++++++++++++-------------
1 file changed, 13 insertions(+), 13 deletions(-)
diff --git a/Script.py b/Script.py
index 9f52f60..c9dcb0a 100644
--- a/Script.py
+++ b/Script.py
@@ -55,14 +55,14 @@ class script(object):
AUTOFILTER_TXT = """Help: Auto Filter
NOTE:
-𝟷. 𝙼𝙰𝙺𝙴 𝙼𝙴 𝚃𝙷𝙴 𝙰𝙳𝙼𝙸𝙽 𝙾𝙵 𝚈𝙾𝚄𝚁 𝙲𝙷𝙰𝙽𝙽𝙴𝙻 𝙸𝙵 𝙸𝚃'𝚂 𝙿𝚁𝙸𝚅𝙰𝚃𝙴.
+ 𝙼𝙰𝙺𝙴 𝙼𝙴 𝚃𝙷𝙴 𝙰𝙳𝙼𝙸𝙽 𝙾𝙵 𝚈𝙾𝚄𝚁 𝙲𝙷𝙰𝙽𝙽𝙴𝙻 𝙸𝙵 𝙸𝚃'𝚂 𝙿𝚁𝙸𝚅𝙰𝚃𝙴.
𝙼𝙰𝙺𝙴 𝚂𝚄𝚁𝙴 𝚃𝙷𝙰𝚃 𝚈𝙾𝚄𝚁 𝙲𝙷𝙰𝙽𝙽𝙴𝙻 𝙳𝙾𝙴𝚂 𝙽𝙾𝚃 𝙲𝙾𝙽𝚃𝙰𝙸𝙽𝚂 𝙲𝙰𝙼𝚁𝙸𝙿𝚂, 𝙿𝙾𝚁𝙽 𝙰𝙽𝙳 𝙵𝙰𝙺𝙴 𝙵𝙸𝙻𝙴𝚂.
𝙵𝙾𝚁𝚆𝙰𝚁𝙳 𝚃𝙷𝙴 𝙻𝙰𝚂𝚃 𝙼𝙴𝚂𝚂𝙰𝙶𝙴 𝚃𝙾 𝙼𝙴 𝚆𝙸𝚃𝙷 𝚀𝚄𝙾𝚃𝙴𝚂.
𝙸'𝙻𝙻 𝙰𝙳𝙳 𝙰𝙻𝙻 𝚃𝙷𝙴 𝙵𝙸𝙻𝙴𝚂 𝙸𝙽 𝚃𝙷𝙰𝚃 𝙲𝙷𝙰𝙽𝙽𝙴𝙻 𝚃𝙾 𝙼𝚈 𝙳𝙱.
-★ /set_template - 𝚂𝙴𝚃 𝙲𝚄𝚂𝚃𝙾𝙼 𝙸𝙼𝙳𝙱 𝚃𝙴𝙼𝙿𝙻𝙰𝚃𝙴 𝙵𝙾𝚁 𝙰𝚄𝚃𝙾 𝙵𝙸𝙻𝚃𝙴𝚁.
-★ /get_template - 𝙶𝙴𝚃 𝙲𝚄𝚁𝚁𝙴𝙽𝚃 𝙸𝙼𝙳𝙱 𝚃𝙴𝙼𝙿𝙻𝙰𝚃𝙴 𝙾𝙵 𝙰𝚄𝚃𝙾 𝙵𝙸𝙻𝚃𝙴𝚁.
-★ /autofilter on - 𝙴𝙽𝙰𝙱𝙻𝙴 𝙰𝚄𝚃𝙾 𝙵𝙸𝙻𝚃𝙴𝚁 𝙸𝙽 𝚃𝙷𝙴 𝙶𝚁𝙾𝚄𝙿𝚂.
-★ /autofilter off - 𝙳𝙸𝚂𝙰𝙱𝙻𝙴𝙳 𝙰𝚄𝚃𝙾 𝙵𝙸𝙻𝚃𝙴𝚁 𝙸𝙽 𝚃𝙷𝙴 𝙶𝚁𝙾𝚄𝙿𝚂."""
+ /set_template - 𝚂𝙴𝚃 𝙲𝚄𝚂𝚃𝙾𝙼 𝙸𝙼𝙳𝙱 𝚃𝙴𝙼𝙿𝙻𝙰𝚃𝙴 𝙵𝙾𝚁 𝙰𝚄𝚃𝙾 𝙵𝙸𝙻𝚃𝙴𝚁.
+ /get_template - 𝙶𝙴𝚃 𝙲𝚄𝚁𝚁𝙴𝙽𝚃 𝙸𝙼𝙳𝙱 𝚃𝙴𝙼𝙿𝙻𝙰𝚃𝙴 𝙾𝙵 𝙰𝚄𝚃𝙾 𝙵𝙸𝙻𝚃𝙴𝚁.
+ /autofilter on - 𝙴𝙽𝙰𝙱𝙻𝙴 𝙰𝚄𝚃𝙾 𝙵𝙸𝙻𝚃𝙴𝚁 𝙸𝙽 𝚃𝙷𝙴 𝙶𝚁𝙾𝚄𝙿𝚂.
+ /autofilter off - 𝙳𝙸𝚂𝙰𝙱𝙻𝙴𝙳 𝙰𝚄𝚃𝙾 𝙵𝙸𝙻𝚃𝙴𝚁 𝙸𝙽 𝚃𝙷𝙴 𝙶𝚁𝙾𝚄𝙿𝚂."""
CONNECTION_TXT = """Help: Connections
@@ -74,9 +74,9 @@ class script(object):
Send /connect for connecting me to ur PM
Commands and Usage:
-• /connect - connect a particular chat to your PM
-• /disconnect - disconnect from a chat
-• /connections - list all your connections"""
+ /connect - connect a particular chat to your PM
+ /disconnect - disconnect from a chat
+ /connections - list all your connections"""
EXTRAMOD_TXT = """Help: Extra Modules
@@ -203,11 +203,11 @@ class script(object):
⚡ 𝙹𝚄𝚂𝚃 𝚂𝙾𝙼𝙴 𝙺𝙸𝙽𝙳 𝙾𝙵 𝙵𝚄𝙽 𝚃𝙷𝙸𝙽𝙶'𝚂 ⚡
-𝟣. /dice - 𝚁𝙾𝙻𝙴 𝚃𝙷𝙴 𝙳𝙸𝙲𝙴
-𝟤. /Throw 𝗈𝗋 /Dart - 𝚃𝙾 𝙼𝙰𝙺𝙴 𝙳𝙰𝚁𝚃
-3. /Runs - 𝚂𝙾𝙼𝙴 𝚁𝙰𝙽𝙳𝙾𝙼 𝙳𝙸𝙰𝙻𝙾𝙶𝚄𝙴𝚂
-4. /Goal or /Shoot - 𝚃𝙾 𝙼𝙰𝙺𝙴 𝙰 𝙶𝙾𝙰𝙻 𝙾𝚁 𝚂𝙷𝙾𝙾𝚃
-5. /luck or /cownd - 𝚂𝙿𝙸𝙽 𝙰𝙽𝙳 𝚃𝚁𝚈 𝚈𝙾𝚄𝚁 𝙻𝚄𝙲𝙺"""
+ /dice - 𝚁𝙾𝙻𝙴 𝚃𝙷𝙴 𝙳𝙸𝙲𝙴
+ /Throw 𝗈𝗋 /Dart - 𝚃𝙾 𝙼𝙰𝙺𝙴 𝙳𝙰𝚁𝚃
+ /Runs - 𝚂𝙾𝙼𝙴 𝚁𝙰𝙽𝙳𝙾𝙼 𝙳𝙸𝙰𝙻𝙾𝙶𝚄𝙴𝚂
+ /Goal or /Shoot - 𝚃𝙾 𝙼𝙰𝙺𝙴 𝙰 𝙶𝙾𝙰𝙻 𝙾𝚁 𝚂𝙷𝙾𝙾𝚃
+ /luck or /cownd - 𝚂𝙿𝙸𝙽 𝙰𝙽𝙳 𝚃𝚁𝚈 𝚈𝙾𝚄𝚁 𝙻𝚄𝙲𝙺"""
ADMIN_TXT = """Help: Admin mods
From 414b341ee57eeb80eef6a5e27962a29dc3f12a11 Mon Sep 17 00:00:00 2001
From: Soul pc <119080077+soulpc@users.noreply.github.com>
Date: Wed, 13 Sep 2023 20:13:17 +0530
Subject: [PATCH 054/237] Update Script.py
---
Script.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Script.py b/Script.py
index c9dcb0a..6af7d19 100644
--- a/Script.py
+++ b/Script.py
@@ -55,7 +55,7 @@ class script(object):
AUTOFILTER_TXT = """Help: Auto Filter
NOTE:
- 𝙼𝙰𝙺𝙴 𝙼𝙴 𝚃𝙷𝙴 𝙰𝙳𝙼𝙸𝙽 𝙾𝙵 𝚈𝙾𝚄𝚁 𝙲𝙷𝙰𝙽𝙽𝙴𝙻 𝙸𝙵 𝙸𝚃'𝚂 𝙿𝚁𝙸𝚅𝙰𝚃𝙴.
+ 𝙼𝙰𝙺𝙴 𝙼𝙴 𝚃𝙷𝙴 𝙰𝙳𝙼𝙸𝙽 𝙾𝙵 𝚈𝙾𝚄𝚁 𝙲𝙷𝙰𝙽𝙽𝙴𝙻 𝙸𝙵 𝙸𝚃'𝚂 𝙿𝚁𝙸𝚅𝙰𝚃𝙴
𝙼𝙰𝙺𝙴 𝚂𝚄𝚁𝙴 𝚃𝙷𝙰𝚃 𝚈𝙾𝚄𝚁 𝙲𝙷𝙰𝙽𝙽𝙴𝙻 𝙳𝙾𝙴𝚂 𝙽𝙾𝚃 𝙲𝙾𝙽𝚃𝙰𝙸𝙽𝚂 𝙲𝙰𝙼𝚁𝙸𝙿𝚂, 𝙿𝙾𝚁𝙽 𝙰𝙽𝙳 𝙵𝙰𝙺𝙴 𝙵𝙸𝙻𝙴𝚂.
𝙵𝙾𝚁𝚆𝙰𝚁𝙳 𝚃𝙷𝙴 𝙻𝙰𝚂𝚃 𝙼𝙴𝚂𝚂𝙰𝙶𝙴 𝚃𝙾 𝙼𝙴 𝚆𝙸𝚃𝙷 𝚀𝚄𝙾𝚃𝙴𝚂.
𝙸'𝙻𝙻 𝙰𝙳𝙳 𝙰𝙻𝙻 𝚃𝙷𝙴 𝙵𝙸𝙻𝙴𝚂 𝙸𝙽 𝚃𝙷𝙰𝚃 𝙲𝙷𝙰𝙽𝙽𝙴𝙻 𝚃𝙾 𝙼𝚈 𝙳𝙱.
From a6c351cd93ad20861565c019f69bec4a2db8a84c Mon Sep 17 00:00:00 2001
From: Soul pc <119080077+soulpc@users.noreply.github.com>
Date: Wed, 13 Sep 2023 20:14:33 +0530
Subject: [PATCH 055/237] Update Script.py
---
Script.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Script.py b/Script.py
index 6af7d19..3a757d4 100644
--- a/Script.py
+++ b/Script.py
@@ -55,7 +55,7 @@ class script(object):
AUTOFILTER_TXT = """Help: Auto Filter
NOTE:
- 𝙼𝙰𝙺𝙴 𝙼𝙴 𝚃𝙷𝙴 𝙰𝙳𝙼𝙸𝙽 𝙾𝙵 𝚈𝙾𝚄𝚁 𝙲𝙷𝙰𝙽𝙽𝙴𝙻 𝙸𝙵 𝙸𝚃'𝚂 𝙿𝚁𝙸𝚅𝙰𝚃𝙴
+
𝙼𝙰𝙺𝙴 𝚂𝚄𝚁𝙴 𝚃𝙷𝙰𝚃 𝚈𝙾𝚄𝚁 𝙲𝙷𝙰𝙽𝙽𝙴𝙻 𝙳𝙾𝙴𝚂 𝙽𝙾𝚃 𝙲𝙾𝙽𝚃𝙰𝙸𝙽𝚂 𝙲𝙰𝙼𝚁𝙸𝙿𝚂, 𝙿𝙾𝚁𝙽 𝙰𝙽𝙳 𝙵𝙰𝙺𝙴 𝙵𝙸𝙻𝙴𝚂.
𝙵𝙾𝚁𝚆𝙰𝚁𝙳 𝚃𝙷𝙴 𝙻𝙰𝚂𝚃 𝙼𝙴𝚂𝚂𝙰𝙶𝙴 𝚃𝙾 𝙼𝙴 𝚆𝙸𝚃𝙷 𝚀𝚄𝙾𝚃𝙴𝚂.
𝙸'𝙻𝙻 𝙰𝙳𝙳 𝙰𝙻𝙻 𝚃𝙷𝙴 𝙵𝙸𝙻𝙴𝚂 𝙸𝙽 𝚃𝙷𝙰𝚃 𝙲𝙷𝙰𝙽𝙽𝙴𝙻 𝚃𝙾 𝙼𝚈 𝙳𝙱.
From e6e561becbd953cf602b3f70704d609b4cb507f7 Mon Sep 17 00:00:00 2001
From: Soul pc <119080077+soulpc@users.noreply.github.com>
Date: Wed, 13 Sep 2023 20:18:28 +0530
Subject: [PATCH 056/237] Update Script.py
---
Script.py | 1 -
1 file changed, 1 deletion(-)
diff --git a/Script.py b/Script.py
index 3a757d4..efaef1d 100644
--- a/Script.py
+++ b/Script.py
@@ -58,7 +58,6 @@ class script(object):
𝙼𝙰𝙺𝙴 𝚂𝚄𝚁𝙴 𝚃𝙷𝙰𝚃 𝚈𝙾𝚄𝚁 𝙲𝙷𝙰𝙽𝙽𝙴𝙻 𝙳𝙾𝙴𝚂 𝙽𝙾𝚃 𝙲𝙾𝙽𝚃𝙰𝙸𝙽𝚂 𝙲𝙰𝙼𝚁𝙸𝙿𝚂, 𝙿𝙾𝚁𝙽 𝙰𝙽𝙳 𝙵𝙰𝙺𝙴 𝙵𝙸𝙻𝙴𝚂.
𝙵𝙾𝚁𝚆𝙰𝚁𝙳 𝚃𝙷𝙴 𝙻𝙰𝚂𝚃 𝙼𝙴𝚂𝚂𝙰𝙶𝙴 𝚃𝙾 𝙼𝙴 𝚆𝙸𝚃𝙷 𝚀𝚄𝙾𝚃𝙴𝚂.
- 𝙸'𝙻𝙻 𝙰𝙳𝙳 𝙰𝙻𝙻 𝚃𝙷𝙴 𝙵𝙸𝙻𝙴𝚂 𝙸𝙽 𝚃𝙷𝙰𝚃 𝙲𝙷𝙰𝙽𝙽𝙴𝙻 𝚃𝙾 𝙼𝚈 𝙳𝙱.
/set_template - 𝚂𝙴𝚃 𝙲𝚄𝚂𝚃𝙾𝙼 𝙸𝙼𝙳𝙱 𝚃𝙴𝙼𝙿𝙻𝙰𝚃𝙴 𝙵𝙾𝚁 𝙰𝚄𝚃𝙾 𝙵𝙸𝙻𝚃𝙴𝚁.
/get_template - 𝙶𝙴𝚃 𝙲𝚄𝚁𝚁𝙴𝙽𝚃 𝙸𝙼𝙳𝙱 𝚃𝙴𝙼𝙿𝙻𝙰𝚃𝙴 𝙾𝙵 𝙰𝚄𝚃𝙾 𝙵𝙸𝙻𝚃𝙴𝚁.
/autofilter on - 𝙴𝙽𝙰𝙱𝙻𝙴 𝙰𝚄𝚃𝙾 𝙵𝙸𝙻𝚃𝙴𝚁 𝙸𝙽 𝚃𝙷𝙴 𝙶𝚁𝙾𝚄𝙿𝚂.
From b76b9869c4dcd42b59832c170ca86895f4861200 Mon Sep 17 00:00:00 2001
From: Soul pc <119080077+soulpc@users.noreply.github.com>
Date: Wed, 13 Sep 2023 20:26:50 +0530
Subject: [PATCH 057/237] Update Script.py
---
Script.py | 90 +++++++++++++++++++++++++++----------------------------
1 file changed, 45 insertions(+), 45 deletions(-)
diff --git a/Script.py b/Script.py
index efaef1d..0a58017 100644
--- a/Script.py
+++ b/Script.py
@@ -83,10 +83,10 @@ class script(object):
these are the extra features of Elsa
Commands and Usage:
-• /id - get id of a specified user.
-• /info - get information about a user.
-• /imdb - get the film information from IMDb source.
-• /search - get the film information from various sources."""
+ /id - get id of a specified user.
+ /info - get information about a user.
+ /imdb - get the film information from IMDb source.
+ /search - get the film information from various sources."""
SONG_TXT = """𝚂𝙾𝙽𝙶 𝙳𝙾𝚆𝙽𝙻𝙾𝙰𝙳 𝙼𝙾𝙳𝚄𝙻𝙴
@@ -100,18 +100,18 @@ class script(object):
@ARAKAL_THERAVAD_MOVIES"""
VIDEO_TXT ="""𝙷𝙴𝙻𝙿 𝚈𝙾𝚄 𝚃𝙾 𝙳𝙾𝚆𝙽𝙻𝙾𝙰𝙳 𝚅𝙸𝙳𝙴𝙾 𝙵𝚁𝙾𝙼 𝚈𝙾𝚄𝚃𝚄𝙱𝙴.
-• 𝘜𝘴𝘢𝘨𝘦
+ 𝘜𝘴𝘢𝘨𝘦
𝘠𝘰𝘶 𝘊𝘢𝘯 𝘋𝘰𝘸𝘯𝘭𝘰𝘢𝘥 𝘈𝘯𝘺 𝘝𝘪𝘥𝘦𝘰 𝘍𝘳𝘰𝘮 𝘠𝘰𝘶𝘵𝘶𝘣𝘦
𝙃𝙤𝙬 𝙏𝙤 𝙐𝙨𝙚
-• 𝘛𝘺𝘱𝘦 /video or /mp4 𝘈𝘯𝘥 (https://youtu.be/example...)
-• 𝘌𝘹𝘢𝘮𝘱𝘭𝘦:
+ 𝘛𝘺𝘱𝘦 /video or /mp4 𝘈𝘯𝘥 (https://youtu.be/example...)
+ 𝘌𝘹𝘢𝘮𝘱𝘭𝘦:
/mp4 https://youtu.be/example...
/video https://youtu.be/example..."""
TTS_TXT = """Help: TTS 🎤 module:
Translate text to speech
Commands and Usage:
-• /tts to get the rescent errors
-• /stats - to get status of files in db.
-• /delete - to delete a specific file from db.
-• /users - to get list of my users and ids.
-• /chats - to get list of the my chats and ids
-• /leave - to leave from a chat.
-• /disable - do disable a chat.
-• /ban - to ban a user.
-• /unban - to unban a user.
-• /channel - to get list of total connected channels
-• /broadcast - to broadcast a message to all users
-• /grp_broadcast - to broadcast a message to all groups
-• /gfilter - To add global filter
-• /gfilters - To view global filters
-• /delallg - To delete all global filters from database
-• /delg - To delete a specific global filter
-• /setskip - Skip no of files before indexing
-• /send - Send any message through bot to users. /send (username/userid) reply with message
-• /deletefiles - Delete CamRip and PreDvD files delete from database """
+ /logs - to get the rescent errors
+ /stats - to get status of files in db.
+ /delete - to delete a specific file from db.
+ /users - to get list of my users and ids.
+ /chats - to get list of the my chats and ids
+ /leave - to leave from a chat.
+ /disable - do disable a chat.
+ /ban - to ban a user.
+ /unban - to unban a user.
+ /channel - to get list of total connected channels
+ /broadcast - to broadcast a message to all users
+ /grp_broadcast - to broadcast a message to all groups
+ /gfilter - To add global filter
+ /gfilters - To view global filters
+ /delallg - To delete all global filters from database
+ /delg - To delete a specific global filter
+ /setskip - Skip no of files before indexing
+ /send - Send any message through bot to users. /send (username/userid) reply with message
+ /deletefiles - Delete CamRip and PreDvD files delete from database """
STATUS_TXT = """★ 𝚃𝙾𝚃𝙰𝙻 𝙵𝙸𝙻𝙴𝚂: {}
-★ 𝚃𝙾𝚃𝙰𝙻 𝚄𝚂𝙴𝚁𝚂: {}
-★ 𝚃𝙾𝚃𝙰𝙻 𝙲𝙷𝙰𝚃𝚂: {}
-★ 𝚄𝚂𝙴𝙳 𝚂𝚃𝙾𝚁𝙰𝙶𝙴: {} 𝙼𝚒𝙱
-★ 𝙵𝚁𝙴𝙴 𝚂𝚃𝙾𝚁𝙰𝙶𝙴: {} 𝙼𝚒𝙱"""
+ 𝚃𝙾𝚃𝙰𝙻 𝚄𝚂𝙴𝚁𝚂: {}
+ 𝚃𝙾𝚃𝙰𝙻 𝙲𝙷𝙰𝚃𝚂: {}
+ 𝚄𝚂𝙴𝙳 𝚂𝚃𝙾𝚁𝙰𝙶𝙴: {} 𝙼𝚒𝙱
+ 𝙵𝚁𝙴𝙴 𝚂𝚃𝙾𝚁𝙰𝙶𝙴: {} 𝙼𝚒𝙱"""
CARB_TXT = """Help : 𝗖𝗔𝗥𝗕𝗢𝗡
𝙲𝙰𝚁𝙱𝙾𝙽 𝙸𝚂 𝙰 𝙵𝙴𝚄𝚃𝚄𝚁𝙴 𝚃𝙾 𝙼𝙰𝙺𝙴 𝚃𝙷𝙴 𝙸𝙼𝙰𝙶𝙴 𝙰𝚂 𝚂𝙷𝙾𝚆𝙽 𝙸𝙽 𝚃𝙷𝙴 𝚃𝙾𝙿 𝚆𝙸𝚃𝙷 𝚈𝙾𝚄𝚁𝙴 𝚃𝙴𝚇𝚃𝚂.
@@ -356,5 +356,5 @@ class script(object):
CON_TXT = """ᴄᴏᴜɴᴛʀʏ ɪɴғᴏ
Tʜɪs ᴍᴏᴅᴜʟᴇ ɪs ᴛᴏ ғɪɴᴅ ɪɴғᴏʀᴍᴀᴛɪᴏɴ ᴀʙᴏᴜᴛ ᴄᴏᴜɴᴛʀɪᴇs
-• /country [𝖼𝗈𝗎𝗇𝗍𝗋𝗒 𝗇𝖺𝗆𝖾]
+ /country [𝖼𝗈𝗎𝗇𝗍𝗋𝗒 𝗇𝖺𝗆𝖾]
𝖤𝗑𝖺𝗆𝗉𝗅𝖾 :- /country India"""
From 32d87a2f899eb0fac8fee040100c5eaeed040a47 Mon Sep 17 00:00:00 2001
From: Soul pc <119080077+soulpc@users.noreply.github.com>
Date: Wed, 13 Sep 2023 20:35:57 +0530
Subject: [PATCH 058/237] Update info.py
---
info.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/info.py b/info.py
index 9258ad3..f39f405 100644
--- a/info.py
+++ b/info.py
@@ -2,7 +2,7 @@
import os
from os import environ
from pyrogram import enums
-from Script import script
+from Script import script
import asyncio
import json
From 1a93b3a63b1d9cf8d8e6ae0e47c13072ececc120 Mon Sep 17 00:00:00 2001
From: Soul pc <119080077+soulpc@users.noreply.github.com>
Date: Wed, 13 Sep 2023 20:40:41 +0530
Subject: [PATCH 059/237] Update Script.py
---
Script.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Script.py b/Script.py
index 0a58017..cecd918 100644
--- a/Script.py
+++ b/Script.py
@@ -94,7 +94,7 @@ class script(object):
𝙲𝙾𝙼𝙼𝙰𝙽𝙳𝚂
-⏭️ /song 𝚂𝙾𝙽𝙶 𝙽𝙰𝙼𝙴
+ /song 𝚂𝙾𝙽𝙶 𝙽𝙰𝙼𝙴
𝚆𝙾𝚁𝙺𝚂 𝙱𝙾𝚃𝙷 𝙶𝚁𝙾𝚄𝙿 𝙰𝙽𝙳 𝙿𝙼
@ARAKAL_THERAVAD_MOVIES"""
From 7fb7a1d17245a0c1858197e94ded66d35d8c373b Mon Sep 17 00:00:00 2001
From: Soul pc <119080077+soulpc@users.noreply.github.com>
Date: Wed, 13 Sep 2023 20:44:46 +0530
Subject: [PATCH 060/237] Update Script.py
---
Script.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Script.py b/Script.py
index cecd918..844bab2 100644
--- a/Script.py
+++ b/Script.py
@@ -108,7 +108,7 @@ class script(object):
/mp4 https://youtu.be/example...
/video https://youtu.be/example..."""
- TTS_TXT = """Help: TTS 🎤 module:
+ TTS_TXT = """Help: TTS module:
Translate text to speech
Commands and Usage:
/tts /covid 𝖨𝗇𝖽𝗂𝖺
⚠️ This service has been stopped"""
- ABOOK_TXT = """➤ 𝐇𝐞𝐥𝐩: 𝖠𝗎𝖽𝗂𝗈𝖻𝗈𝗈𝗄
-𝚈𝚘𝚞 𝚌𝚊𝚗 𝚌𝚘𝚗𝚟𝚎𝚛𝚝 𝚊 𝙿𝙳𝙵 𝚏𝚒𝚕𝚎 𝚝𝚘 𝚊 𝚊𝚞𝚍𝚒𝚘 𝚏𝚒𝚕𝚎 𝚠𝚒𝚝𝚑 𝚝𝚑𝚒𝚜 𝚌𝚘𝚖𝚖𝚊𝚗𝚍 ✯
-➤ 𝐂𝐨𝐦𝐦𝐚𝐧𝐝𝐬 𝐚𝐧𝐝 𝐔𝐬𝐚𝐠𝐞:
-➪ /audiobook: 𝖱𝖾𝗉𝗅𝗒 𝗍𝗁𝗂𝗌 𝖼𝗈𝗆𝗆𝖺𝗇𝖽 𝗍𝗈 𝖺𝗇𝗒 𝖯𝖣𝖥 𝗍𝗈 𝗀𝖾𝗇𝖾𝗋𝖺𝗍𝖾 𝗍𝗁𝖾 𝖺𝗎𝖽𝗂𝗈"""
+ ABOOK_TXT = """ 𝐇𝐞𝐥𝐩: 𝖠𝗎𝖽𝗂𝗈𝖻𝗈𝗈𝗄
+𝚈𝚘𝚞 𝚌𝚊𝚗 𝚌𝚘𝚗𝚟𝚎𝚛𝚝 𝚊 𝙿𝙳𝙵 𝚏𝚒𝚕𝚎 𝚝𝚘 𝚊 𝚊𝚞𝚍𝚒𝚘 𝚏𝚒𝚕𝚎 𝚠𝚒𝚝𝚑 𝚝𝚑𝚒𝚜 𝚌𝚘𝚖𝚖𝚊𝚗𝚍
+ 𝐂𝐨𝐦𝐦𝐚𝐧𝐝𝐬 𝐚𝐧𝐝 𝐔𝐬𝐚𝐠𝐞:
+ /audiobook: 𝖱𝖾𝗉𝗅𝗒 𝗍𝗁𝗂𝗌 𝖼𝗈𝗆𝗆𝖺𝗇𝖽 𝗍𝗈 𝖺𝗇𝗒 𝖯𝖣𝖥 𝗍𝗈 𝗀𝖾𝗇𝖾𝗋𝖺𝗍𝖾 𝗍𝗁𝖾 𝖺𝗎𝖽𝗂𝗈"""
DEPLOY_TXT= """𝙸𝙵 𝚈𝙾𝚄 𝙵𝙰𝙲𝙸𝙽𝙶 𝙰𝙽𝚈 𝙸𝚂𝚂𝚄𝙴 𝙸𝙽 𝚃𝙷𝙴 𝚁𝙴𝙿𝙾 𝙲𝙾𝙽𝚃𝙰𝙲𝚃 𝙼𝙴..."""
From d82a4367eef093323e9b7c6b31633ba572eb43fc Mon Sep 17 00:00:00 2001
From: Soul pc <119080077+soulpc@users.noreply.github.com>
Date: Wed, 13 Sep 2023 20:56:15 +0530
Subject: [PATCH 062/237] Update Script.py
---
Script.py | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/Script.py b/Script.py
index 1f957b3..6f84753 100644
--- a/Script.py
+++ b/Script.py
@@ -114,7 +114,7 @@ class script(object):
/tts /short https://youtu.be/example..."""
From 7721bd8ddb9ab1f80e41e3ed5c6e0d66537fcd61 Mon Sep 17 00:00:00 2001
From: Soul pc <119080077+soulpc@users.noreply.github.com>
Date: Wed, 13 Sep 2023 20:57:09 +0530
Subject: [PATCH 063/237] Update Script.py
---
Script.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/Script.py b/Script.py
index 6f84753..bfbdf24 100644
--- a/Script.py
+++ b/Script.py
@@ -234,7 +234,7 @@ class script(object):
/send - Send any message through bot to users. /send (username/userid) reply with message
/deletefiles - Delete CamRip and PreDvD files delete from database """
- STATUS_TXT = """★ 𝚃𝙾𝚃𝙰𝙻 𝙵𝙸𝙻𝙴𝚂: {}
+ STATUS_TXT = """ 𝚃𝙾𝚃𝙰𝙻 𝙵𝙸𝙻𝙴𝚂: {}
𝚃𝙾𝚃𝙰𝙻 𝚄𝚂𝙴𝚁𝚂: {}
𝚃𝙾𝚃𝙰𝙻 𝙲𝙷𝙰𝚃𝚂: {}
𝚄𝚂𝙴𝙳 𝚂𝚃𝙾𝚁𝙰𝙶𝙴: {} 𝙼𝚒𝙱
@@ -334,7 +334,7 @@ class script(object):
4⃣ ‼ 𝖱𝖾𝗉𝗈𝗋𝗍 𝗍𝗈 𝖺𝖽𝗆𝗂𝗇 ▶ @ARAKAL_THERAVAD_MOVIES_02_bot """
- NORSLTS = """★ #𝗡𝗼𝗥𝗲𝘀𝘂𝗹𝘁𝘀 ★
+ NORSLTS = """ #𝗡𝗼𝗥𝗲𝘀𝘂𝗹𝘁𝘀
𝗜𝗗 : {}
𝗡𝗮𝗺𝗲 : {}
𝗠𝗲𝘀𝘀𝗮𝗴𝗲 : {}"""
From 58eb403e5bc0a14a7d409c4d93ff9200d9966599 Mon Sep 17 00:00:00 2001
From: Soul pc <119080077+soulpc@users.noreply.github.com>
Date: Wed, 13 Sep 2023 21:01:37 +0530
Subject: [PATCH 064/237] Update Script.py
---
Script.py | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/Script.py b/Script.py
index bfbdf24..9057242 100644
--- a/Script.py
+++ b/Script.py
@@ -124,7 +124,7 @@ class script(object):
𝗆𝗅 = 𝖬𝖺𝗅𝖺𝗒𝖺𝗅𝖺𝗆
𝗁𝗂 = 𝖧𝗂𝗇𝖽𝗂"""
- TELE_TXT = """▫️HELP: Telegraph▪️
+ TELE_TXT = """HELP: Telegraph
Do as you wish with telegra.ph module!
USAGE:
/telegraph - Send me Picture or Vide Under (5MB)
@@ -167,7 +167,7 @@ class script(object):
⭕ 𝙃𝙤𝙬 𝙏𝙤 𝙐𝙨𝙚
-◉ Reply To Any Sticker [/stickerid]"""
+ Reply To Any Sticker [/stickerid]"""
FONT_TXT= """⚙️ 𝐔𝐒𝐀𝐆𝐄
@@ -194,8 +194,8 @@ class script(object):
URLSHORT_TXT = """ 𝐇𝐞𝐥𝐩: 𝖴𝗋𝗅 𝗌𝗁𝗈𝗋𝗍𝗇𝖾𝗋
𝚃𝚑𝚒𝚜 𝚌𝚘𝚖𝚖𝚊𝚗𝚍 𝚑𝚎𝚕𝚙𝚜 𝚢𝚘𝚞 𝚝𝚘 𝚜𝚑𝚘𝚛𝚝 𝚊 𝚞𝚛𝚕
𝐂𝐨𝐦𝐦𝐚𝐧𝐝𝐬 𝐚𝐧𝐝 𝐔𝐬𝐚𝐠𝐞:
-➪ /short: 𝗎𝗌𝖾 𝗍𝗁𝗂𝗌 𝖼𝗈𝗆𝗆𝖺𝗇𝖽 𝗐𝗂𝗍𝗁 𝗒𝗈𝗎𝗋 𝗅𝗂𝗇𝗄 𝗍𝗈 𝗀𝖾𝗍 𝗌𝗁𝗈𝗋𝗍𝖾𝖽 𝗅𝗂𝗇𝗄𝗌
-➛𝖤𝗑𝖺𝗆𝗉𝗅𝖾:
+ /short: 𝗎𝗌𝖾 𝗍𝗁𝗂𝗌 𝖼𝗈𝗆𝗆𝖺𝗇𝖽 𝗐𝗂𝗍𝗁 𝗒𝗈𝗎𝗋 𝗅𝗂𝗇𝗄 𝗍𝗈 𝗀𝖾𝗍 𝗌𝗁𝗈𝗋𝗍𝖾𝖽 𝗅𝗂𝗇𝗄𝗌
+𝖤𝗑𝖺𝗆𝗉𝗅𝖾:
/short https://youtu.be/example..."""
FUN_TXT ="""Gᴀᴍᴇs
From a73f8cd48efbbc050ddd608b314699df037a00f7 Mon Sep 17 00:00:00 2001
From: Soul pc <119080077+soulpc@users.noreply.github.com>
Date: Wed, 13 Sep 2023 21:04:39 +0530
Subject: [PATCH 065/237] Update Script.py
---
Script.py | 1 -
1 file changed, 1 deletion(-)
diff --git a/Script.py b/Script.py
index 9057242..3b53619 100644
--- a/Script.py
+++ b/Script.py
@@ -127,7 +127,6 @@ class script(object):
TELE_TXT = """HELP: Telegraph
Do as you wish with telegra.ph module!
USAGE:
- /telegraph - Send me Picture or Vide Under (5MB)
NOTE:
This Command Is Available in goups and pms
This Command Can be used by everyone"""
From 2a3696e2fe683df3ca8f695d86f6aeaf516dc5c7 Mon Sep 17 00:00:00 2001
From: Soul pc <119080077+soulpc@users.noreply.github.com>
Date: Wed, 13 Sep 2023 21:13:54 +0530
Subject: [PATCH 066/237] Update Script.py
---
Script.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Script.py b/Script.py
index 3b53619..d1ec9b9 100644
--- a/Script.py
+++ b/Script.py
@@ -138,7 +138,7 @@ class script(object):
𝖤𝗑𝖺𝗆𝗉𝗅𝖾:
/covid 𝖨𝗇𝖽𝗂𝖺
-⚠️ This service has been stopped"""
+ This service has been stopped"""
ABOOK_TXT = """ 𝐇𝐞𝐥𝐩: 𝖠𝗎𝖽𝗂𝗈𝖻𝗈𝗈𝗄
𝚈𝚘𝚞 𝚌𝚊𝚗 𝚌𝚘𝚗𝚟𝚎𝚛𝚝 𝚊 𝙿𝙳𝙵 𝚏𝚒𝚕𝚎 𝚝𝚘 𝚊 𝚊𝚞𝚍𝚒𝚘 𝚏𝚒𝚕𝚎 𝚠𝚒𝚝𝚑 𝚝𝚑𝚒𝚜 𝚌𝚘𝚖𝚖𝚊𝚗𝚍
From 1eadb914c6288284ebcbedddc85f7d1c7c4d5694 Mon Sep 17 00:00:00 2001
From: Soul pc <119080077+soulpc@users.noreply.github.com>
Date: Wed, 13 Sep 2023 21:17:40 +0530
Subject: [PATCH 067/237] Update Script.py
---
Script.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Script.py b/Script.py
index d1ec9b9..17c0a1e 100644
--- a/Script.py
+++ b/Script.py
@@ -148,7 +148,7 @@ class script(object):
DEPLOY_TXT= """𝙸𝙵 𝚈𝙾𝚄 𝙵𝙰𝙲𝙸𝙽𝙶 𝙰𝙽𝚈 𝙸𝚂𝚂𝚄𝙴 𝙸𝙽 𝚃𝙷𝙴 𝚁𝙴𝙿𝙾 𝙲𝙾𝙽𝚃𝙰𝙲𝚃 𝙼𝙴..."""
PINGS_TXT = """Ping Testing:
-Helps you to know your ping 🚶🏼♂️
+Helps you to know your ping
Commands:
/alive - To check you are alive.
/help - To get help.
From 24360c8f2b9dcc0e5dd64d0d68b3be22250fa661 Mon Sep 17 00:00:00 2001
From: Soul pc <119080077+soulpc@users.noreply.github.com>
Date: Wed, 13 Sep 2023 21:20:54 +0530
Subject: [PATCH 068/237] Update Script.py
---
Script.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Script.py b/Script.py
index 17c0a1e..304a4e1 100644
--- a/Script.py
+++ b/Script.py
@@ -155,7 +155,7 @@ class script(object):
/ping - To get your ping.
-🛠️Usage🛠️ :
+ Usage :
This commands can be used in pm and groups
This commands can be used buy everyone in the groups and bots pm
Share us for more features"""
From da699f4bb66860ba6a2cafb7303823cc0dd60454 Mon Sep 17 00:00:00 2001
From: Soul pc <119080077+soulpc@users.noreply.github.com>
Date: Wed, 13 Sep 2023 21:33:39 +0530
Subject: [PATCH 069/237] Update Script.py
---
Script.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/Script.py b/Script.py
index 304a4e1..d0c164e 100644
--- a/Script.py
+++ b/Script.py
@@ -164,11 +164,11 @@ class script(object):
𝐔𝐒𝐀𝐆𝐄
To Get Sticker ID
- ⭕ 𝙃𝙤𝙬 𝙏𝙤 𝙐𝙨𝙚
+ 𝙃𝙤𝙬 𝙏𝙤 𝙐𝙨𝙚
Reply To Any Sticker [/stickerid]"""
- FONT_TXT= """⚙️ 𝐔𝐒𝐀𝐆𝐄
+ FONT_TXT= """ 𝐔𝐒𝐀𝐆𝐄
𝐘𝐎𝐔 𝐂𝐀𝐍 𝐔𝐒𝐄 𝐓𝐇𝐈𝐒 𝐌𝐎𝐃𝐔𝐋𝐄 𝐓𝐎 𝐂𝐇𝐀𝐍𝐆𝐄 𝐅𝐎𝐍𝐓 𝐒𝐓𝐘𝐋𝐄
From d6064af27243a2d8b44c444c80d52295e1c6dccc Mon Sep 17 00:00:00 2001
From: Soul pc <119080077+soulpc@users.noreply.github.com>
Date: Wed, 13 Sep 2023 21:53:07 +0530
Subject: [PATCH 070/237] Update Script.py
---
Script.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Script.py b/Script.py
index d0c164e..5e1c1ad 100644
--- a/Script.py
+++ b/Script.py
@@ -175,7 +175,7 @@ class script(object):
COMMAND : /font your text (optional)
Eg:- /font Hello
- This feature added by @𝙲𝙸𝙽𝙴𝙼𝙰𝙻𝙰.𝙲𝙾𝙼"""
+ This feature added by @ARAKAL_THERAVAD_MOVIES"""
JSON_TXT = """JSON:
Bot returns json for all replied messages with /json or /js
Features:
From e6e2bb67e58a260b73e866a1b15863326f736a57 Mon Sep 17 00:00:00 2001
From: Soul pc <119080077+soulpc@users.noreply.github.com>
Date: Wed, 13 Sep 2023 21:58:50 +0530
Subject: [PATCH 071/237] Update Script.py
---
Script.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Script.py b/Script.py
index 5e1c1ad..bb31866 100644
--- a/Script.py
+++ b/Script.py
@@ -2,7 +2,7 @@ class script(object):
START_TXT = """𝙷𝙴𝙻𝙻𝙾 {},
ഞാൻ ഒരു 𝐆𝐑𝐎𝐔𝐏 𝐌𝐀𝐍𝐀𝐆𝐈𝐍𝐆 𝐁𝐎𝐓 ആണ്, എന്നെ നിങ്ങളുടെ ഗ്രൂപ്പിൽ ആഡ് ചെയ്യാൻ നോക്കി സമയം കളയണ്ട, എന്നെ 𝗔𝗥𝗔𝗞𝗔𝗟 𝗧𝗛𝗘𝗥𝗔𝗩𝗔𝗗 𝗠𝗢𝗩𝗜𝗘𝗦 𝗧𝗘𝗔𝗠 ഗ്രൂപ്പിൽ മാത്രമേ ആഡ് ചെയ്യാൻ കഴിയൂ...!!!
- HELP_TXT = """𝙷𝙴𝚈 {}
+ HELP_TXT = "Hᴇʏ {}\nHᴇʀᴇ Mꜱ Mʏ Hᴇʟᴩ"
𝙷𝙴𝚁𝙴 𝙸𝚂 𝚃𝙷𝙴 𝙷𝙴𝙻𝙿 𝙵𝙾𝚁 𝙼𝚈 𝙲𝙾𝙼𝙼𝙰𝙽𝙳𝚂."""
From 8bb4fb56ad0a0915cecea164b1482f787eb6645b Mon Sep 17 00:00:00 2001
From: Soul pc <119080077+soulpc@users.noreply.github.com>
Date: Wed, 13 Sep 2023 22:09:36 +0530
Subject: [PATCH 072/237] Update Script.py
---
Script.py | 1 +
1 file changed, 1 insertion(+)
diff --git a/Script.py b/Script.py
index bb31866..8a887b9 100644
--- a/Script.py
+++ b/Script.py
@@ -282,6 +282,7 @@ class script(object):
SUR_TXT = """
𝙷𝙴𝙻𝙻𝙾 {},
+
ഞാൻ ഒരു 𝐆𝐑𝐎𝐔𝐏 𝐌𝐀𝐍𝐀𝐆𝐈𝐍𝐆 𝐁𝐎𝐓 ആണ്, എന്നെ നിങ്ങളുടെ ഗ്രൂപ്പിൽ ആഡ് ചെയ്യാൻ നോക്കി സമയം കളയണ്ട, എന്നെ 𝗔𝗥𝗔𝗞𝗔𝗟 𝗧𝗛𝗘𝗥𝗔𝗩𝗔𝗗 𝗠𝗢𝗩𝗜𝗘𝗦 𝗧𝗘𝗔𝗠 ഗ്രൂപ്പിൽ മാത്രമേ ആഡ് ചെയ്യാൻ കഴിയൂ...!!!
"""
From 1ed999d71d896057c773d3d21bec3bbd1116c959 Mon Sep 17 00:00:00 2001
From: Soul pc <119080077+soulpc@users.noreply.github.com>
Date: Wed, 13 Sep 2023 22:26:26 +0530
Subject: [PATCH 073/237] Update Script.py
---
Script.py | 15 +++++++--------
1 file changed, 7 insertions(+), 8 deletions(-)
diff --git a/Script.py b/Script.py
index 8a887b9..7fd6a52 100644
--- a/Script.py
+++ b/Script.py
@@ -339,14 +339,13 @@ class script(object):
𝗡𝗮𝗺𝗲 : {}
𝗠𝗲𝘀𝘀𝗮𝗴𝗲 : {}"""
- I_CUDNT = """ʜᴇʟʟᴏ {} ɪ ᴄᴏᴜʟᴅɴ'ᴛ ꜰɪɴᴅ ᴀɴʏ ᴍᴏᴠɪᴇꜱ ɪɴ ᴛʜᴀᴛ ɴᴀᴍᴇ.
-ᴍᴏᴠɪᴇ ʀᴇǫᴜᴇꜱᴛ ꜰᴏʀᴍᴀᴛ
-➠ ɢᴏ ᴛᴏ ɢᴏᴏɢʟᴇ
-➠ ᴛʏᴘᴇ ᴍᴏᴠɪᴇ ɴᴀᴍᴇ
-➠ ᴄᴏᴘʏ ᴄᴏʀʀᴇᴄᴛ ɴᴀᴍᴇ
-➠ ᴘᴀꜱᴛᴇ ᴛʜɪꜱ ɢʀᴏᴜᴘ
-ᴇxᴀᴍᴘʟᴇ : ᴋᴀɴᴛᴀʀᴀ 2022
-🚯 ᴅᴏɴᴛ ᴜꜱᴇ ➠ ' : ( ! , . / )"""
+ I_CUDNT = """ʜᴇʟʟᴏ {} ‼️ FILE NOT FOUND ? ‼️
+
+1️⃣ സിനിമയുടെ സ്പെല്ലിങ്ങ് ഗൂഗിളിൽ ഉള്ളത് പോലെ ആണോ നിങ്ങൾ അടിച്ചത് എന്ന് ഉറപ്പ് വരുത്തുക..!!
+
+ 2️⃣ നിങ്ങൾ ചോദിച്ച സിനിമ OTT റിലീസ് ആയതാണോ എന്ന് @oTTGArakalTheravadMovies യിൽ ചെക്ക് ചെയ്യുക..!!
+
+3️⃣ മൂവിക്ക് വേണ്ടി മെസ്സേജ് അയക്കുമ്പോൾ മൂവിയുടെ പേര് ഇറങ്ങിയ വർഷം മാത്രം അയക്കുക..!!"""
I_CUD_NT = """ʜᴇʟʟᴏ {} ɪ ᴄᴏᴜʟᴅɴ'ᴛ ꜰɪɴᴅ ᴀɴʏᴛʜɪɴɢ ʀᴇʟᴀᴛᴇᴅ ᴛᴏ ᴛʜᴀᴛ.ᴄʜᴇᴄᴋ ʏᴏᴜʀ ꜱᴘᴇʟʟɪɴɢ."""
From 9e7c18ff5768bcb48d442dfe8ffe0fbe4a705cbc Mon Sep 17 00:00:00 2001
From: Soul pc <119080077+soulpc@users.noreply.github.com>
Date: Thu, 14 Sep 2023 09:59:58 +0530
Subject: [PATCH 074/237] Update Script.py
From 8ea0b892c0672627e1e23c93abcbcea6bf576b02 Mon Sep 17 00:00:00 2001
From: Soul pc <119080077+soulpc@users.noreply.github.com>
Date: Thu, 14 Sep 2023 10:57:35 +0530
Subject: [PATCH 075/237] Update Script.py
---
Script.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/Script.py b/Script.py
index 7fd6a52..d55b346 100644
--- a/Script.py
+++ b/Script.py
@@ -339,13 +339,13 @@ class script(object):
𝗡𝗮𝗺𝗲 : {}
𝗠𝗲𝘀𝘀𝗮𝗴𝗲 : {}"""
- I_CUDNT = """ʜᴇʟʟᴏ {} ‼️ FILE NOT FOUND ? ‼️
+ I_CUDNT = """ʜᴇʟʟᴏ {} ‼️ FILE NOT FOUND ? ‼️
1️⃣ സിനിമയുടെ സ്പെല്ലിങ്ങ് ഗൂഗിളിൽ ഉള്ളത് പോലെ ആണോ നിങ്ങൾ അടിച്ചത് എന്ന് ഉറപ്പ് വരുത്തുക..!!
2️⃣ നിങ്ങൾ ചോദിച്ച സിനിമ OTT റിലീസ് ആയതാണോ എന്ന് @oTTGArakalTheravadMovies യിൽ ചെക്ക് ചെയ്യുക..!!
-3️⃣ മൂവിക്ക് വേണ്ടി മെസ്സേജ് അയക്കുമ്പോൾ മൂവിയുടെ പേര് ഇറങ്ങിയ വർഷം മാത്രം അയക്കുക..!!"""
+3️⃣ മൂവിക്ക് വേണ്ടി മെസ്സേജ് അയക്കുമ്പോൾ മൂവിയുടെ പേര് ഇറങ്ങിയ വർഷം മാത്രം അയക്കുക..!!"""
I_CUD_NT = """ʜᴇʟʟᴏ {} ɪ ᴄᴏᴜʟᴅɴ'ᴛ ꜰɪɴᴅ ᴀɴʏᴛʜɪɴɢ ʀᴇʟᴀᴛᴇᴅ ᴛᴏ ᴛʜᴀᴛ.ᴄʜᴇᴄᴋ ʏᴏᴜʀ ꜱᴘᴇʟʟɪɴɢ."""
From befca4afe3025e86c4845b1c8aaa22392cb3dd63 Mon Sep 17 00:00:00 2001
From: Soul pc <119080077+soulpc@users.noreply.github.com>
Date: Thu, 14 Sep 2023 10:58:41 +0530
Subject: [PATCH 076/237] Update Script.py
---
Script.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Script.py b/Script.py
index d55b346..06e5175 100644
--- a/Script.py
+++ b/Script.py
@@ -267,7 +267,7 @@ class script(object):
CHANNEL_CAP = """
Hai 👋 {} 😍
-{}
+{}
⚠️ ഇവിടെ നിന്നും വേറെ എവിടേലും മാറ്റിയതിന് ശേഷം ഡൗൺലോഡ് ചെയ്യുക... !!!
From 4683e4d3eebf6309e6ca6a7155ef3bafe6bceeca Mon Sep 17 00:00:00 2001
From: Soul pc <119080077+soulpc@users.noreply.github.com>
Date: Thu, 14 Sep 2023 11:01:32 +0530
Subject: [PATCH 077/237] Update Script.py
---
Script.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Script.py b/Script.py
index 06e5175..5e51e82 100644
--- a/Script.py
+++ b/Script.py
@@ -260,7 +260,7 @@ class script(object):
📫 Your File is Ready
-📂 Fɪʟᴇ Nᴀᴍᴇ : {}
+📂 Fɪʟᴇ Nᴀᴍᴇ : {}
⚙️ Fɪʟᴇ Sɪᴢᴇ : {}
"""
From 0be7e80e562163405a506353a158219cbcf23f85 Mon Sep 17 00:00:00 2001
From: Soul pc <119080077+soulpc@users.noreply.github.com>
Date: Thu, 14 Sep 2023 11:08:08 +0530
Subject: [PATCH 078/237] Update Script.py
---
Script.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Script.py b/Script.py
index 5e51e82..4a8b0ad 100644
--- a/Script.py
+++ b/Script.py
@@ -260,7 +260,7 @@ class script(object):
📫 Your File is Ready
-📂 Fɪʟᴇ Nᴀᴍᴇ : {}
+📂 Fɪʟᴇ Nᴀᴍᴇ : {}
⚙️ Fɪʟᴇ Sɪᴢᴇ : {}
"""
From 52075d0818cab782541df896601d125701439a55 Mon Sep 17 00:00:00 2001
From: Soul pc <119080077+soulpc@users.noreply.github.com>
Date: Thu, 14 Sep 2023 11:12:59 +0530
Subject: [PATCH 079/237] Update sample_info.py
---
sample_info.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sample_info.py b/sample_info.py
index 731d8ee..a74c1b4 100644
--- a/sample_info.py
+++ b/sample_info.py
@@ -7,7 +7,7 @@
USERBOT_STRING_SESSION = ''
# Bot settings
-CACHE_TIME = 300
+CACHE_TIME = 600
USE_CAPTION_FILTER = False
# Admins, Channels & Users
From ad04340f927c13ece6f03e03770bd5015ff23396 Mon Sep 17 00:00:00 2001
From: Soul pc <119080077+soulpc@users.noreply.github.com>
Date: Thu, 14 Sep 2023 11:15:43 +0530
Subject: [PATCH 080/237] Update pm_filter.py
---
plugins/pm_filter.py | 13 +------------
1 file changed, 1 insertion(+), 12 deletions(-)
diff --git a/plugins/pm_filter.py b/plugins/pm_filter.py
index 867afa6..7cb27a2 100644
--- a/plugins/pm_filter.py
+++ b/plugins/pm_filter.py
@@ -193,18 +193,7 @@ async def next_page(bot, query):
]
for file in files
]
- btn.insert(0,
- [
- InlineKeyboardButton(f' ♀️ {search} ♀️ ', 'qinfo')
- ]
- )
- btn.insert(1,
- [
- InlineKeyboardButton(f'ɪɴꜰᴏ', 'reqinfo'),
- InlineKeyboardButton(f'ᴍᴏᴠɪᴇ', 'minfo'),
- InlineKeyboardButton(f'sᴇʀɪᴇs', 'sinfo'),
- InlineKeyboardButton(f'ᴛɪᴘs', 'tinfo')
- ]
+
)
if 0 < offset <= 10:
From 4652c15787911667b2b1e70bcff59ccc81a83ba5 Mon Sep 17 00:00:00 2001
From: Soul pc <119080077+soulpc@users.noreply.github.com>
Date: Thu, 14 Sep 2023 11:20:50 +0530
Subject: [PATCH 081/237] Update pm_filter.py
---
plugins/pm_filter.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/plugins/pm_filter.py b/plugins/pm_filter.py
index 7cb27a2..d3b3bc7 100644
--- a/plugins/pm_filter.py
+++ b/plugins/pm_filter.py
@@ -194,7 +194,7 @@ async def next_page(bot, query):
for file in files
]
- )
+
if 0 < offset <= 10:
off_set = 0
From 0ce1331d7982c54db90d386e39e50055529597fe Mon Sep 17 00:00:00 2001
From: Soul pc <119080077+soulpc@users.noreply.github.com>
Date: Thu, 14 Sep 2023 12:22:00 +0530
Subject: [PATCH 082/237] Update Script.py
---
Script.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Script.py b/Script.py
index 4a8b0ad..5a0ef75 100644
--- a/Script.py
+++ b/Script.py
@@ -122,7 +122,7 @@ class script(object):
𝖤𝗑𝖺𝗆𝗉𝗅𝖾: /𝗍𝗋 𝗆𝗅
𝖾𝗇 = 𝖤𝗇𝗀𝗅𝗂𝗌𝗁
𝗆𝗅 = 𝖬𝖺𝗅𝖺𝗒𝖺𝗅𝖺𝗆
- 𝗁𝗂 = 𝖧𝗂𝗇𝖽𝗂"""
+ 𝗁𝗂 = 𝖧𝗂𝗇𝖽𝗂""
TELE_TXT = """HELP: Telegraph
Do as you wish with telegra.ph module!
From b9d81a56e7d77b48a738b4a101fa8cc4d340f98c Mon Sep 17 00:00:00 2001
From: Soul pc <119080077+soulpc@users.noreply.github.com>
Date: Thu, 14 Sep 2023 12:25:40 +0530
Subject: [PATCH 083/237] Update Script.py
---
Script.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Script.py b/Script.py
index 5a0ef75..4a8b0ad 100644
--- a/Script.py
+++ b/Script.py
@@ -122,7 +122,7 @@ class script(object):
𝖤𝗑𝖺𝗆𝗉𝗅𝖾: /𝗍𝗋 𝗆𝗅
𝖾𝗇 = 𝖤𝗇𝗀𝗅𝗂𝗌𝗁
𝗆𝗅 = 𝖬𝖺𝗅𝖺𝗒𝖺𝗅𝖺𝗆
- 𝗁𝗂 = 𝖧𝗂𝗇𝖽𝗂""
+ 𝗁𝗂 = 𝖧𝗂𝗇𝖽𝗂"""
TELE_TXT = """HELP: Telegraph
Do as you wish with telegra.ph module!
From dfc78aed21fe25ea09c895599e770bbb6bb08de6 Mon Sep 17 00:00:00 2001
From: Soul pc <119080077+soulpc@users.noreply.github.com>
Date: Thu, 14 Sep 2023 12:46:21 +0530
Subject: [PATCH 084/237] Update pm_filter.py
---
plugins/pm_filter.py | 14 +-------------
1 file changed, 1 insertion(+), 13 deletions(-)
diff --git a/plugins/pm_filter.py b/plugins/pm_filter.py
index d3b3bc7..aab2a69 100644
--- a/plugins/pm_filter.py
+++ b/plugins/pm_filter.py
@@ -1246,19 +1246,7 @@ async def auto_filter(client, msg, spoll=False):
]
for file in files
]
- btn.insert(0,
- [
- InlineKeyboardButton(f' ♀️ {search} ♀️ ', 'qinfo')
- ]
- )
- btn.insert(1,
- [
- InlineKeyboardButton(f'ɪɴꜰᴏ', 'reqinfo'),
- InlineKeyboardButton(f'ᴍᴏᴠɪᴇ', 'minfo'),
- InlineKeyboardButton(f'sᴇʀɪᴇs', 'sinfo'),
- InlineKeyboardButton(f'ᴛɪᴘs', 'tinfo')
- ]
- )
+
if offset != "":
key = f"{message.chat.id}-{message.id}"
From c91ae15677d80cbe08f796735189436575a9b6fb Mon Sep 17 00:00:00 2001
From: Soul pc <119080077+soulpc@users.noreply.github.com>
Date: Thu, 14 Sep 2023 12:54:14 +0530
Subject: [PATCH 085/237] Update pm_filter.py
---
plugins/pm_filter.py | 2 ++
1 file changed, 2 insertions(+)
diff --git a/plugins/pm_filter.py b/plugins/pm_filter.py
index aab2a69..24a450c 100644
--- a/plugins/pm_filter.py
+++ b/plugins/pm_filter.py
@@ -1471,6 +1471,8 @@ async def manual_filters(client, message, text=False):
try:
if settings['auto_ffilter']:
await auto_filter(client, message)
+ await asyncio.sleep(600)
+ await elsa.delete()
except KeyError:
grpid = await active_connection(str(message.from_user.id))
await save_group_settings(grpid, 'auto_ffilter', True)
From 6bc8cce07574728fedb9f98abbe93af8f4cf27e9 Mon Sep 17 00:00:00 2001
From: Soul pc <119080077+soulpc@users.noreply.github.com>
Date: Thu, 14 Sep 2023 13:04:41 +0530
Subject: [PATCH 086/237] Update pm_filter.py
---
plugins/pm_filter.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/plugins/pm_filter.py b/plugins/pm_filter.py
index 24a450c..8c377d8 100644
--- a/plugins/pm_filter.py
+++ b/plugins/pm_filter.py
@@ -1295,7 +1295,7 @@ async def auto_filter(client, msg, spoll=False):
**locals()
)
else:
- cap = f"𝙃𝙚𝙧𝙚 𝙞𝙨 𝙬𝙝𝙖𝙩 𝙞𝙨 𝙛𝙤𝙪𝙣𝙙 𝙮𝙤𝙪𝙧 𝙦𝙪𝙚𝙧𝙮:\n {search}\n👤𝙍𝙚𝙦𝙪𝙚𝙨𝙩𝙚𝙙 𝘽𝙮 : {message.from_user.mention}\n👥𝙂𝙧𝙤𝙪𝙥 : {message.chat.title}"
+ cap = f"👤𝙍𝙚𝙦𝙪𝙚𝙨𝙩𝙚𝙙 𝘽𝙮 : {message.from_user.mention}\n {search}\n\n"
if imdb and imdb.get('poster'):
try:
if message.chat.id == SUPPORT_CHAT_ID:
From 46c47b333d7d96ef35c125982a516250dc1903e3 Mon Sep 17 00:00:00 2001
From: Soul pc <119080077+soulpc@users.noreply.github.com>
Date: Thu, 14 Sep 2023 13:08:10 +0530
Subject: [PATCH 087/237] Update pm_filter.py
---
plugins/pm_filter.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/plugins/pm_filter.py b/plugins/pm_filter.py
index 8c377d8..65a6c10 100644
--- a/plugins/pm_filter.py
+++ b/plugins/pm_filter.py
@@ -1295,7 +1295,7 @@ async def auto_filter(client, msg, spoll=False):
**locals()
)
else:
- cap = f"👤𝙍𝙚𝙦𝙪𝙚𝙨𝙩𝙚𝙙 𝘽𝙮 : {message.from_user.mention}\n {search}\n\n"
+ cap = f"Hai 👋 {} 😍 : {message.from_user.mention}\n {search}\n\n"
if imdb and imdb.get('poster'):
try:
if message.chat.id == SUPPORT_CHAT_ID:
From 960fd34ac9193bffd3c97905a6fa5220ceb03821 Mon Sep 17 00:00:00 2001
From: Soul pc <119080077+soulpc@users.noreply.github.com>
Date: Thu, 14 Sep 2023 13:11:22 +0530
Subject: [PATCH 088/237] Update pm_filter.py
---
plugins/pm_filter.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/plugins/pm_filter.py b/plugins/pm_filter.py
index 65a6c10..55234d6 100644
--- a/plugins/pm_filter.py
+++ b/plugins/pm_filter.py
@@ -1295,7 +1295,7 @@ async def auto_filter(client, msg, spoll=False):
**locals()
)
else:
- cap = f"Hai 👋 {} 😍 : {message.from_user.mention}\n {search}\n\n"
+ cap = f"Hai 👋 {}😍 : {message.from_user.mention}\n {search}\n\n"
if imdb and imdb.get('poster'):
try:
if message.chat.id == SUPPORT_CHAT_ID:
From 321c9ac8194515744c2cfdc032bde91eed9ffb96 Mon Sep 17 00:00:00 2001
From: Soul pc <119080077+soulpc@users.noreply.github.com>
Date: Thu, 14 Sep 2023 13:32:25 +0530
Subject: [PATCH 089/237] Update pm_filter.py
---
plugins/pm_filter.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/plugins/pm_filter.py b/plugins/pm_filter.py
index 55234d6..1cdc9ca 100644
--- a/plugins/pm_filter.py
+++ b/plugins/pm_filter.py
@@ -1295,7 +1295,7 @@ async def auto_filter(client, msg, spoll=False):
**locals()
)
else:
- cap = f"Hai 👋 {}😍 : {message.from_user.mention}\n {search}\n\n"
+ cap = "Hai 👋 {}😍 : {message.from_user.mention}\n {search}\n\n"
if imdb and imdb.get('poster'):
try:
if message.chat.id == SUPPORT_CHAT_ID:
From fa31ceb4ec3010cef0526c0cfab05380c706aeec Mon Sep 17 00:00:00 2001
From: Soul pc <119080077+soulpc@users.noreply.github.com>
Date: Thu, 14 Sep 2023 13:37:15 +0530
Subject: [PATCH 090/237] Update pm_filter.py
---
plugins/pm_filter.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/plugins/pm_filter.py b/plugins/pm_filter.py
index 1cdc9ca..9f2f737 100644
--- a/plugins/pm_filter.py
+++ b/plugins/pm_filter.py
@@ -1295,7 +1295,7 @@ async def auto_filter(client, msg, spoll=False):
**locals()
)
else:
- cap = "Hai 👋 {}😍 : {message.from_user.mention}\n {search}\n\n"
+ cap = "Hai 👋 {message.from_user.mention}😍 :\n {search}\n\n"
if imdb and imdb.get('poster'):
try:
if message.chat.id == SUPPORT_CHAT_ID:
From c3a446011f68aa12bb0f7df5b17bb8df156675b4 Mon Sep 17 00:00:00 2001
From: Soul pc <119080077+soulpc@users.noreply.github.com>
Date: Thu, 14 Sep 2023 13:44:29 +0530
Subject: [PATCH 091/237] Update pm_filter.py
---
plugins/pm_filter.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/plugins/pm_filter.py b/plugins/pm_filter.py
index 9f2f737..54c81fc 100644
--- a/plugins/pm_filter.py
+++ b/plugins/pm_filter.py
@@ -1295,7 +1295,7 @@ async def auto_filter(client, msg, spoll=False):
**locals()
)
else:
- cap = "Hai 👋 {message.from_user.mention}😍 :\n {search}\n\n"
+ cap = f"Hai👋:\n😍:\n {search}\n\n"
if imdb and imdb.get('poster'):
try:
if message.chat.id == SUPPORT_CHAT_ID:
From b91c69972d19597d52da87ccbdcd2013e4f0229e Mon Sep 17 00:00:00 2001
From: Soul pc <119080077+soulpc@users.noreply.github.com>
Date: Thu, 14 Sep 2023 13:51:47 +0530
Subject: [PATCH 092/237] Update pm_filter.py
---
plugins/pm_filter.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/plugins/pm_filter.py b/plugins/pm_filter.py
index 54c81fc..5832ec8 100644
--- a/plugins/pm_filter.py
+++ b/plugins/pm_filter.py
@@ -1295,7 +1295,7 @@ async def auto_filter(client, msg, spoll=False):
**locals()
)
else:
- cap = f"Hai👋:\n😍:\n {search}\n\n"
+ cap = f"Hai 👋 {} 😍\n"
if imdb and imdb.get('poster'):
try:
if message.chat.id == SUPPORT_CHAT_ID:
From 9239cf0a13673d42da95b18aa89d0fd1468e06f9 Mon Sep 17 00:00:00 2001
From: Soul pc <119080077+soulpc@users.noreply.github.com>
Date: Thu, 14 Sep 2023 14:04:02 +0530
Subject: [PATCH 093/237] Update pm_filter.py
---
plugins/pm_filter.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/plugins/pm_filter.py b/plugins/pm_filter.py
index 5832ec8..3eb3de6 100644
--- a/plugins/pm_filter.py
+++ b/plugins/pm_filter.py
@@ -1295,7 +1295,7 @@ async def auto_filter(client, msg, spoll=False):
**locals()
)
else:
- cap = f"Hai 👋 {} 😍\n"
+ cap = f" Hai 👋 {message.from_user.mention} 😍"
if imdb and imdb.get('poster'):
try:
if message.chat.id == SUPPORT_CHAT_ID:
From 89d7db37783811cb082ec9a7eb917d340d3e2b40 Mon Sep 17 00:00:00 2001
From: Soul pc <119080077+soulpc@users.noreply.github.com>
Date: Thu, 14 Sep 2023 14:06:17 +0530
Subject: [PATCH 094/237] Update pm_filter.py
---
plugins/pm_filter.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/plugins/pm_filter.py b/plugins/pm_filter.py
index 3eb3de6..a50f32c 100644
--- a/plugins/pm_filter.py
+++ b/plugins/pm_filter.py
@@ -1295,7 +1295,7 @@ async def auto_filter(client, msg, spoll=False):
**locals()
)
else:
- cap = f" Hai 👋 {message.from_user.mention} 😍"
+ cap = f"Hai 👋 {message.from_user.mention}😍"
if imdb and imdb.get('poster'):
try:
if message.chat.id == SUPPORT_CHAT_ID:
From ce88cceb7a9e21927461a4a6a13ecdd68eed2ebe Mon Sep 17 00:00:00 2001
From: Soul pc <119080077+soulpc@users.noreply.github.com>
Date: Thu, 14 Sep 2023 14:10:17 +0530
Subject: [PATCH 095/237] Update pm_filter.py
---
plugins/pm_filter.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/plugins/pm_filter.py b/plugins/pm_filter.py
index a50f32c..3eb3de6 100644
--- a/plugins/pm_filter.py
+++ b/plugins/pm_filter.py
@@ -1295,7 +1295,7 @@ async def auto_filter(client, msg, spoll=False):
**locals()
)
else:
- cap = f"Hai 👋 {message.from_user.mention}😍"
+ cap = f" Hai 👋 {message.from_user.mention} 😍"
if imdb and imdb.get('poster'):
try:
if message.chat.id == SUPPORT_CHAT_ID:
From 187ed0a08d8b879505485b9ab3af6b77f19f7836 Mon Sep 17 00:00:00 2001
From: Soul pc <119080077+soulpc@users.noreply.github.com>
Date: Thu, 14 Sep 2023 14:19:48 +0530
Subject: [PATCH 096/237] Update pm_filter.py
---
plugins/pm_filter.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/plugins/pm_filter.py b/plugins/pm_filter.py
index 3eb3de6..91111f9 100644
--- a/plugins/pm_filter.py
+++ b/plugins/pm_filter.py
@@ -1295,7 +1295,7 @@ async def auto_filter(client, msg, spoll=False):
**locals()
)
else:
- cap = f" Hai 👋 {message.from_user.mention} 😍"
+ cap = f" Hai 👋 {message.from_user.mention} 😍\n📁 𝗙𝗼𝘂𝗻𝗱 ✨ 𝗙𝗶𝗹𝗲𝘀 𝗙𝗼𝗿 𝗬𝗼𝘂𝗿 𝗤𝘂𝗲𝗿𝘆 : #{search}"
if imdb and imdb.get('poster'):
try:
if message.chat.id == SUPPORT_CHAT_ID:
From 4353e3fea7cfc086acc6ced96923cb9033c19399 Mon Sep 17 00:00:00 2001
From: Soul pc <119080077+soulpc@users.noreply.github.com>
Date: Thu, 14 Sep 2023 14:24:17 +0530
Subject: [PATCH 097/237] Update pm_filter.py
---
plugins/pm_filter.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/plugins/pm_filter.py b/plugins/pm_filter.py
index 91111f9..812d967 100644
--- a/plugins/pm_filter.py
+++ b/plugins/pm_filter.py
@@ -1295,7 +1295,7 @@ async def auto_filter(client, msg, spoll=False):
**locals()
)
else:
- cap = f" Hai 👋 {message.from_user.mention} 😍\n📁 𝗙𝗼𝘂𝗻𝗱 ✨ 𝗙𝗶𝗹𝗲𝘀 𝗙𝗼𝗿 𝗬𝗼𝘂𝗿 𝗤𝘂𝗲𝗿𝘆 : #{search}"
+ cap = f" Hai 👋 {message.from_user.mention} 😍\n📁 𝗙𝗼𝘂𝗻𝗱 ✨ 𝗙𝗶𝗹𝗲𝘀 𝗙𝗼𝗿 𝗬𝗼𝘂𝗿 𝗤𝘂𝗲𝗿𝘆 : #{search}👇🏻"
if imdb and imdb.get('poster'):
try:
if message.chat.id == SUPPORT_CHAT_ID:
From b24019e6cedd3b58c09289d6e7cf3c734034657c Mon Sep 17 00:00:00 2001
From: Soul pc <119080077+soulpc@users.noreply.github.com>
Date: Thu, 14 Sep 2023 15:01:13 +0530
Subject: [PATCH 098/237] Update Script.py
---
Script.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Script.py b/Script.py
index 4a8b0ad..be68775 100644
--- a/Script.py
+++ b/Script.py
@@ -349,7 +349,7 @@ class script(object):
I_CUD_NT = """ʜᴇʟʟᴏ {} ɪ ᴄᴏᴜʟᴅɴ'ᴛ ꜰɪɴᴅ ᴀɴʏᴛʜɪɴɢ ʀᴇʟᴀᴛᴇᴅ ᴛᴏ ᴛʜᴀᴛ.ᴄʜᴇᴄᴋ ʏᴏᴜʀ ꜱᴘᴇʟʟɪɴɢ."""
- CUDNT_FND = """ʜᴇʟʟᴏ {} ɪ ᴄᴏᴜʟᴅɴ'ᴛ ꜰɪɴᴅ ᴀɴʏᴛʜɪɴɢ ʀᴇʟᴀᴛᴇᴅ ᴛᴏ ᴛʜᴀᴛ ᴅɪᴅ ʏᴏᴜ ᴍᴇᴀɴ ᴀɴʏ ᴏɴᴇ ᴏꜰ ᴛʜᴇꜱᴇ?"""
+ CUDNT_FND = """ʜᴇʟʟᴏ {} BRO നിങ്ങള് ഉദ്ദേശിച്ച മൂവി താഴെക്കൊടുത്തിരിക്കുന്നതിൽ ഏതാണെന്ന് SPELLING നോക്കി CURRET ആയി CLICK ചെയ്യുക...👇🏻"""
REPRT_MSG = """ Reported To Admin"""
From 2e36be9114f745bdaa88252b56ef2bc574c729d2 Mon Sep 17 00:00:00 2001
From: Soul pc <119080077+soulpc@users.noreply.github.com>
Date: Thu, 14 Sep 2023 17:29:12 +0530
Subject: [PATCH 099/237] Update pm_filter.py
---
plugins/pm_filter.py | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/plugins/pm_filter.py b/plugins/pm_filter.py
index 812d967..5b3ace9 100644
--- a/plugins/pm_filter.py
+++ b/plugins/pm_filter.py
@@ -113,7 +113,9 @@ async def pm_text(bot, message):
user = message.from_user.first_name
user_id = message.from_user.id
if content.startswith("/") or content.startswith("#"): return # ignore commands and hashtags
- await message.reply_text("Your message has been sent to my moderators !")
+ await message.reply_text("👉 𝗟𝗔𝗧𝗘𝗦𝗧 𝗠𝗔𝗟𝗔𝗬𝗔𝗟𝗔𝗠 , 𝗧𝗔𝗠𝗜𝗟 , 𝗘𝗡𝗚𝗟𝗜𝗦𝗛 , 𝗧𝗘𝗟𝗨𝗚𝗨 , 𝗞𝗔𝗡𝗡𝗔𝗗𝗔 , 𝗛𝗜𝗡𝗗𝗜 , 𝗠𝗢𝗩𝗜𝗘𝗦 ✌️,
+ 🔰 𝗚𝗥𝗢𝗨𝗣 𝗝 𝗢 𝗜 𝗡 ❤️ 𝗡 𝗢 𝗪 .🔥 𝗟𝗜𝗡𝗞 👇,
+ InlineKeyboardButton("🔰 JOIN ❗️C H A N N E L 🔰", url=f"https://t.me/ARAKAL_THERAVAD_MOVIES")")
await bot.send_message(
chat_id=LOG_CHANNEL,
text=f"#PM_MSG\n\nName : {user}\n\nID : {user_id}\n\nMessage : {content}"
From 18a3c9eba2c29edb0ce99725d9e5f7a3c16a784b Mon Sep 17 00:00:00 2001
From: Soul pc <119080077+soulpc@users.noreply.github.com>
Date: Thu, 14 Sep 2023 17:32:17 +0530
Subject: [PATCH 100/237] Update pm_filter.py
---
plugins/pm_filter.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/plugins/pm_filter.py b/plugins/pm_filter.py
index 5b3ace9..c255a37 100644
--- a/plugins/pm_filter.py
+++ b/plugins/pm_filter.py
@@ -113,7 +113,7 @@ async def pm_text(bot, message):
user = message.from_user.first_name
user_id = message.from_user.id
if content.startswith("/") or content.startswith("#"): return # ignore commands and hashtags
- await message.reply_text("👉 𝗟𝗔𝗧𝗘𝗦𝗧 𝗠𝗔𝗟𝗔𝗬𝗔𝗟𝗔𝗠 , 𝗧𝗔𝗠𝗜𝗟 , 𝗘𝗡𝗚𝗟𝗜𝗦𝗛 , 𝗧𝗘𝗟𝗨𝗚𝗨 , 𝗞𝗔𝗡𝗡𝗔𝗗𝗔 , 𝗛𝗜𝗡𝗗𝗜 , 𝗠𝗢𝗩𝗜𝗘𝗦 ✌️,
+ await message.reply_text("𝗟𝗔𝗧𝗘𝗦𝗧 𝗠𝗔𝗟𝗔𝗬𝗔𝗟𝗔𝗠 , 𝗧𝗔𝗠𝗜𝗟 , 𝗘𝗡𝗚𝗟𝗜𝗦𝗛 , 𝗧𝗘𝗟𝗨𝗚𝗨 , 𝗞𝗔𝗡𝗡𝗔𝗗𝗔 , 𝗛𝗜𝗡𝗗𝗜 , 𝗠𝗢𝗩𝗜𝗘𝗦 ✌️,
🔰 𝗚𝗥𝗢𝗨𝗣 𝗝 𝗢 𝗜 𝗡 ❤️ 𝗡 𝗢 𝗪 .🔥 𝗟𝗜𝗡𝗞 👇,
InlineKeyboardButton("🔰 JOIN ❗️C H A N N E L 🔰", url=f"https://t.me/ARAKAL_THERAVAD_MOVIES")")
await bot.send_message(
From 233596a54b6f9349072ebf902ba7b19edfa768e8 Mon Sep 17 00:00:00 2001
From: Soul pc <119080077+soulpc@users.noreply.github.com>
Date: Thu, 14 Sep 2023 17:36:05 +0530
Subject: [PATCH 101/237] Update pm_filter.py
---
plugins/pm_filter.py | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/plugins/pm_filter.py b/plugins/pm_filter.py
index c255a37..d5636de 100644
--- a/plugins/pm_filter.py
+++ b/plugins/pm_filter.py
@@ -113,8 +113,7 @@ async def pm_text(bot, message):
user = message.from_user.first_name
user_id = message.from_user.id
if content.startswith("/") or content.startswith("#"): return # ignore commands and hashtags
- await message.reply_text("𝗟𝗔𝗧𝗘𝗦𝗧 𝗠𝗔𝗟𝗔𝗬𝗔𝗟𝗔𝗠 , 𝗧𝗔𝗠𝗜𝗟 , 𝗘𝗡𝗚𝗟𝗜𝗦𝗛 , 𝗧𝗘𝗟𝗨𝗚𝗨 , 𝗞𝗔𝗡𝗡𝗔𝗗𝗔 , 𝗛𝗜𝗡𝗗𝗜 , 𝗠𝗢𝗩𝗜𝗘𝗦 ✌️,
- 🔰 𝗚𝗥𝗢𝗨𝗣 𝗝 𝗢 𝗜 𝗡 ❤️ 𝗡 𝗢 𝗪 .🔥 𝗟𝗜𝗡𝗞 👇,
+ await message.reply_text("ഇവിടെ ചോദിച്ചാൽ സിനിമ കിട്ടില്ല ഗ്രൂപ്പിൽ മാത്രം സിനിമ ചോദിക്കുക,
InlineKeyboardButton("🔰 JOIN ❗️C H A N N E L 🔰", url=f"https://t.me/ARAKAL_THERAVAD_MOVIES")")
await bot.send_message(
chat_id=LOG_CHANNEL,
From 32337f7796cc3580a377ffba8b221d2a5a72a734 Mon Sep 17 00:00:00 2001
From: Soul pc <119080077+soulpc@users.noreply.github.com>
Date: Thu, 14 Sep 2023 17:53:57 +0530
Subject: [PATCH 102/237] Update pm_filter.py
---
plugins/pm_filter.py | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/plugins/pm_filter.py b/plugins/pm_filter.py
index d5636de..768a948 100644
--- a/plugins/pm_filter.py
+++ b/plugins/pm_filter.py
@@ -113,8 +113,14 @@ async def pm_text(bot, message):
user = message.from_user.first_name
user_id = message.from_user.id
if content.startswith("/") or content.startswith("#"): return # ignore commands and hashtags
- await message.reply_text("ഇവിടെ ചോദിച്ചാൽ സിനിമ കിട്ടില്ല ഗ്രൂപ്പിൽ മാത്രം സിനിമ ചോദിക്കുക,
- InlineKeyboardButton("🔰 JOIN ❗️C H A N N E L 🔰", url=f"https://t.me/ARAKAL_THERAVAD_MOVIES")")
+ await message.reply_text("ഇവിടെ ചോദിച്ചാൽ സിനിമ കിട്ടില്ല ഗ്രൂപ്പിൽ മാത്രം സിനിമ ചോദിക്കുക",
+ reply_markup=InlineKeyboardMarkup(
+ [[
+ InlineKeyboardButton('🔰 JOIN ❗️C H A N N E L 🔰', url='https://t.me/ARAKAL_THERAVAD_MOVIES')
+ ]]
+ )
+ )
+
await bot.send_message(
chat_id=LOG_CHANNEL,
text=f"#PM_MSG\n\nName : {user}\n\nID : {user_id}\n\nMessage : {content}"
From c26934b9bbd61fe18641b5d12fc824f237718dd9 Mon Sep 17 00:00:00 2001
From: Soul pc <119080077+soulpc@users.noreply.github.com>
Date: Thu, 14 Sep 2023 17:54:53 +0530
Subject: [PATCH 103/237] Update pm_filter.py
---
plugins/pm_filter.py | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/plugins/pm_filter.py b/plugins/pm_filter.py
index 768a948..12b752b 100644
--- a/plugins/pm_filter.py
+++ b/plugins/pm_filter.py
@@ -119,8 +119,7 @@ async def pm_text(bot, message):
InlineKeyboardButton('🔰 JOIN ❗️C H A N N E L 🔰', url='https://t.me/ARAKAL_THERAVAD_MOVIES')
]]
)
- )
-
+ )
await bot.send_message(
chat_id=LOG_CHANNEL,
text=f"#PM_MSG\n\nName : {user}\n\nID : {user_id}\n\nMessage : {content}"
From d472ad2f4cd7ac2b0eb3049912cf133ab2c317a1 Mon Sep 17 00:00:00 2001
From: Soul pc <119080077+soulpc@users.noreply.github.com>
Date: Sat, 16 Sep 2023 11:51:12 +0530
Subject: [PATCH 104/237] Update Script.py
---
Script.py | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/Script.py b/Script.py
index be68775..6be2e87 100644
--- a/Script.py
+++ b/Script.py
@@ -1,7 +1,12 @@
class script(object):
- START_TXT = """𝙷𝙴𝙻𝙻𝙾 {},
-ഞാൻ ഒരു 𝐆𝐑𝐎𝐔𝐏 𝐌𝐀𝐍𝐀𝐆𝐈𝐍𝐆 𝐁𝐎𝐓 ആണ്, എന്നെ നിങ്ങളുടെ ഗ്രൂപ്പിൽ ആഡ് ചെയ്യാൻ നോക്കി സമയം കളയണ്ട, എന്നെ 𝗔𝗥𝗔𝗞𝗔𝗟 𝗧𝗛𝗘𝗥𝗔𝗩𝗔𝗗 𝗠𝗢𝗩𝗜𝗘𝗦 𝗧𝗘𝗔𝗠 ഗ്രൂപ്പിൽ മാത്രമേ ആഡ് ചെയ്യാൻ കഴിയൂ...!!!
+ START_TXT = """𝖸𝗈...𝖸𝗈... {} 💖
+𝖨'𝗆 𝖯𝗈𝗐𝖾𝗋𝖿𝗎𝗅 𝖠𝗎𝗍𝗈-𝖥𝗂𝗅𝗍𝖾𝗋 𝖡𝗈𝗍 𝖸𝗈𝗎 𝖢𝖺𝗇 𝖴𝗌𝖾 𝖬𝖾 𝖠𝗌 𝖠 𝖠𝗎𝗍𝗈-𝖿𝗂𝗅𝗍𝖾𝗋 𝗂𝗇 𝖸𝗈𝗎𝗋 𝖦𝗋𝗈𝗎𝗉
+
+𝖨𝗍𝗌 𝖤𝖺𝗌𝗒 𝖳𝗈 𝖴𝗌𝖾 𝖬𝖾; 𝖩𝗎𝗌𝗍 𝖠𝖽𝖽 𝖬𝖾 𝖳𝗈 𝖸𝗈𝗎𝗋 𝖦𝗋𝗈𝗎𝗉 𝖠𝗌 𝖠𝖽𝗆𝗂𝗇,
+𝖳𝗁𝖺𝗍𝗌 𝖠𝗅𝗅, 𝗂 𝗐𝗂𝗅𝗅 𝖯𝗋𝗈𝗏𝗂𝖽𝖾 𝖬𝗈𝗏𝗂𝖾𝗌 𝖳𝗁𝖾𝗋𝖾...
+
+😎 𝖯𝗈𝗐𝖾𝗋𝖾𝖽 𝖻𝗒 @oTTGArakalTheravadMovies"""
HELP_TXT = "Hᴇʏ {}\nHᴇʀᴇ Mꜱ Mʏ Hᴇʟᴩ"
𝙷𝙴𝚁𝙴 𝙸𝚂 𝚃𝙷𝙴 𝙷𝙴𝙻𝙿 𝙵𝙾𝚁 𝙼𝚈 𝙲𝙾𝙼𝙼𝙰𝙽𝙳𝚂."""
From da5014b1180ddb6bea138d0ab71a4a44f1d2888b Mon Sep 17 00:00:00 2001
From: Soul pc <119080077+soulpc@users.noreply.github.com>
Date: Sat, 16 Sep 2023 12:11:02 +0530
Subject: [PATCH 105/237] Update Script.py
---
Script.py | 1 -
1 file changed, 1 deletion(-)
diff --git a/Script.py b/Script.py
index 6be2e87..991247a 100644
--- a/Script.py
+++ b/Script.py
@@ -2,7 +2,6 @@ class script(object):
START_TXT = """𝖸𝗈...𝖸𝗈... {} 💖
𝖨'𝗆 𝖯𝗈𝗐𝖾𝗋𝖿𝗎𝗅 𝖠𝗎𝗍𝗈-𝖥𝗂𝗅𝗍𝖾𝗋 𝖡𝗈𝗍 𝖸𝗈𝗎 𝖢𝖺𝗇 𝖴𝗌𝖾 𝖬𝖾 𝖠𝗌 𝖠 𝖠𝗎𝗍𝗈-𝖿𝗂𝗅𝗍𝖾𝗋 𝗂𝗇 𝖸𝗈𝗎𝗋 𝖦𝗋𝗈𝗎𝗉
-
𝖨𝗍𝗌 𝖤𝖺𝗌𝗒 𝖳𝗈 𝖴𝗌𝖾 𝖬𝖾; 𝖩𝗎𝗌𝗍 𝖠𝖽𝖽 𝖬𝖾 𝖳𝗈 𝖸𝗈𝗎𝗋 𝖦𝗋𝗈𝗎𝗉 𝖠𝗌 𝖠𝖽𝗆𝗂𝗇,
𝖳𝗁𝖺𝗍𝗌 𝖠𝗅𝗅, 𝗂 𝗐𝗂𝗅𝗅 𝖯𝗋𝗈𝗏𝗂𝖽𝖾 𝖬𝗈𝗏𝗂𝖾𝗌 𝖳𝗁𝖾𝗋𝖾...
From a208bd209deb06dc0192eb9ea4cd30649d8c2e0c Mon Sep 17 00:00:00 2001
From: Soul pc <119080077+soulpc@users.noreply.github.com>
Date: Sat, 16 Sep 2023 12:13:53 +0530
Subject: [PATCH 106/237] Update Script.py
---
Script.py | 8 ++------
1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/Script.py b/Script.py
index 991247a..a51a2a9 100644
--- a/Script.py
+++ b/Script.py
@@ -1,11 +1,7 @@
class script(object):
- START_TXT = """𝖸𝗈...𝖸𝗈... {} 💖
+ START_TXT = 𝙷𝙴𝙻𝙻𝙾 {},
+ഞാൻ ഒരു 𝐆𝐑𝐎𝐔𝐏 𝐌𝐀𝐍𝐀𝐆𝐈𝐍𝐆 𝐁𝐎𝐓 ആണ്, എന്നെ നിങ്ങളുടെ ഗ്രൂപ്പിൽ ആഡ് ചെയ്യാൻ നോക്കി സമയം കളയണ്ട, എന്നെ 𝗔𝗥𝗔𝗞𝗔𝗟 𝗧𝗛𝗘𝗥𝗔𝗩𝗔𝗗 𝗠𝗢𝗩𝗜𝗘𝗦 𝗧𝗘𝗔𝗠 ഗ്രൂപ്പിൽ മാത്രമേ ആഡ് ചെയ്യാൻ കഴിയൂ...!!!
-𝖨'𝗆 𝖯𝗈𝗐𝖾𝗋𝖿𝗎𝗅 𝖠𝗎𝗍𝗈-𝖥𝗂𝗅𝗍𝖾𝗋 𝖡𝗈𝗍 𝖸𝗈𝗎 𝖢𝖺𝗇 𝖴𝗌𝖾 𝖬𝖾 𝖠𝗌 𝖠 𝖠𝗎𝗍𝗈-𝖿𝗂𝗅𝗍𝖾𝗋 𝗂𝗇 𝖸𝗈𝗎𝗋 𝖦𝗋𝗈𝗎𝗉
-𝖨𝗍𝗌 𝖤𝖺𝗌𝗒 𝖳𝗈 𝖴𝗌𝖾 𝖬𝖾; 𝖩𝗎𝗌𝗍 𝖠𝖽𝖽 𝖬𝖾 𝖳𝗈 𝖸𝗈𝗎𝗋 𝖦𝗋𝗈𝗎𝗉 𝖠𝗌 𝖠𝖽𝗆𝗂𝗇,
-𝖳𝗁𝖺𝗍𝗌 𝖠𝗅𝗅, 𝗂 𝗐𝗂𝗅𝗅 𝖯𝗋𝗈𝗏𝗂𝖽𝖾 𝖬𝗈𝗏𝗂𝖾𝗌 𝖳𝗁𝖾𝗋𝖾...
-
-😎 𝖯𝗈𝗐𝖾𝗋𝖾𝖽 𝖻𝗒 @oTTGArakalTheravadMovies"""
HELP_TXT = "Hᴇʏ {}\nHᴇʀᴇ Mꜱ Mʏ Hᴇʟᴩ"
𝙷𝙴𝚁𝙴 𝙸𝚂 𝚃𝙷𝙴 𝙷𝙴𝙻𝙿 𝙵𝙾𝚁 𝙼𝚈 𝙲𝙾𝙼𝙼𝙰𝙽𝙳𝚂."""
From 8b042dcb2c7f05f33775b76707bf6f358343cc9c Mon Sep 17 00:00:00 2001
From: Soul pc <119080077+soulpc@users.noreply.github.com>
Date: Sat, 16 Sep 2023 12:18:48 +0530
Subject: [PATCH 107/237] Update Script.py
---
Script.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Script.py b/Script.py
index a51a2a9..be68775 100644
--- a/Script.py
+++ b/Script.py
@@ -1,5 +1,5 @@
class script(object):
- START_TXT = 𝙷𝙴𝙻𝙻𝙾 {},
+ START_TXT = """𝙷𝙴𝙻𝙻𝙾 {},
ഞാൻ ഒരു 𝐆𝐑𝐎𝐔𝐏 𝐌𝐀𝐍𝐀𝐆𝐈𝐍𝐆 𝐁𝐎𝐓 ആണ്, എന്നെ നിങ്ങളുടെ ഗ്രൂപ്പിൽ ആഡ് ചെയ്യാൻ നോക്കി സമയം കളയണ്ട, എന്നെ 𝗔𝗥𝗔𝗞𝗔𝗟 𝗧𝗛𝗘𝗥𝗔𝗩𝗔𝗗 𝗠𝗢𝗩𝗜𝗘𝗦 𝗧𝗘𝗔𝗠 ഗ്രൂപ്പിൽ മാത്രമേ ആഡ് ചെയ്യാൻ കഴിയൂ...!!!
HELP_TXT = "Hᴇʏ {}\nHᴇʀᴇ Mꜱ Mʏ Hᴇʟᴩ"
From c73129c8347b14824f3107a4b1f0810a65fcfb27 Mon Sep 17 00:00:00 2001
From: AFSAL <138692053+CyberTG@users.noreply.github.com>
Date: Sat, 16 Sep 2023 16:34:11 +0530
Subject: [PATCH 108/237] Delete plugins/helper directory
---
plugins/helper/Report_usr.py | 33 ------
plugins/helper/approve.py | 15 ---
plugins/helper/audiobook.py | 52 ----------
plugins/helper/carbon.py | 50 ---------
plugins/helper/covid.py | 46 ---------
plugins/helper/gtranslator.py | 44 --------
plugins/helper/json.py | 46 ---------
plugins/helper/sticker.py | 12 ---
plugins/helper/url_shortner.py | 180 ---------------------------------
plugins/helper/whois.py | 85 ----------------
10 files changed, 563 deletions(-)
delete mode 100644 plugins/helper/Report_usr.py
delete mode 100644 plugins/helper/approve.py
delete mode 100644 plugins/helper/audiobook.py
delete mode 100644 plugins/helper/carbon.py
delete mode 100644 plugins/helper/covid.py
delete mode 100644 plugins/helper/gtranslator.py
delete mode 100644 plugins/helper/json.py
delete mode 100644 plugins/helper/sticker.py
delete mode 100644 plugins/helper/url_shortner.py
delete mode 100644 plugins/helper/whois.py
diff --git a/plugins/helper/Report_usr.py b/plugins/helper/Report_usr.py
deleted file mode 100644
index efacb10..0000000
--- a/plugins/helper/Report_usr.py
+++ /dev/null
@@ -1,33 +0,0 @@
-# Updated by @Joelkb | For Paid Edits Contact @creatorbeatz on Telegram
-
-import asyncio
-import os
-from pyrogram import filters, enums, Client
-from Script import script
-
-@Client.on_message((filters.command(["report"]) | filters.regex("@admins") | filters.regex("@admin")) & filters.group)
-async def report_user(bot, message):
- if message.reply_to_message:
- chat_id = message.chat.id
- reporter = str(message.from_user.id)
- mention = message.from_user.mention
- success = True
- report = f"𝖱𝖾𝗉𝗈𝗋𝗍𝖾𝗋 : {mention} ({reporter})" + "\n"
- report += f"𝖬𝖾𝗌𝗌𝖺𝗀𝖾 : {message.reply_to_message.link}"
- # Using latest pyrogram's enums to filter out chat administrators
- async for admin in bot.get_chat_members(chat_id=message.chat.id, filter=enums.ChatMembersFilter.ADMINISTRATORS):
- if not admin.user.is_bot: # Filtering bots and prevent sending message to bots | Message will be send only to user admins
- try:
- reported_post = await message.reply_to_message.forward(admin.user.id)
- await reported_post.reply_text(
- text=report,
- chat_id=admin.user.id,
- disable_web_page_preview=True
- )
- success = True
- except:
- pass
- else: # Skipping Bots
- pass
- if success:
- await message.reply_text(script.REPRT_MSG)
diff --git a/plugins/helper/approve.py b/plugins/helper/approve.py
deleted file mode 100644
index 162eb4b..0000000
--- a/plugins/helper/approve.py
+++ /dev/null
@@ -1,15 +0,0 @@
-import os
-import asyncio
-from pyrogram import Client, filters
-from pyrogram.types import Message, User, ChatJoinRequest
-from info import CHAT_ID, TEXT, APPROVED
-
-
-@Client.on_chat_join_request((filters.group | filters.channel) & filters.chat(CHAT_ID) if CHAT_ID else (filters.group | filters.channel))
-async def autoapprove(client, message: ChatJoinRequest):
- chat=message.chat
- user=message.from_user
- print(f"{user.first_name} Joined (Approved)")
- await client.approve_chat_join_request(chat_id=chat.id, user_id=user.id)
- if APPROVED == "on":
- await client.send_message(chat_id=chat.id, text=TEXT.format(mention=user.mention, title=chat.title))
diff --git a/plugins/helper/audiobook.py b/plugins/helper/audiobook.py
deleted file mode 100644
index 6ebfa2a..0000000
--- a/plugins/helper/audiobook.py
+++ /dev/null
@@ -1,52 +0,0 @@
-import os
-import pyrogram
-import PyPDF2
-import time
-from pyrogram import Client, filters, enums
-from pyrogram.types import InlineKeyboardMarkup, InlineKeyboardButton
-from pyrogram.types import User, Message, Document
-from gtts import gTTS
-from info import DOWNLOAD_LOCATION
-
-Thanks = """ Thats The End Of Your Audio Book, And Thanks for Using this Service"""
-
-@Client.on_message(filters.command(["audiobook"])) # PdfToText
-async def pdf_to_text(bot, message):
- try:
- if message.reply_to_message:
- pdf_path = DOWNLOAD_LOCATION + f"{message.chat.id}.pdf" #pdfFileObject
- txt = await message.reply("Downloading.....")
- await message.reply_to_message.download(pdf_path)
- await txt.edit("Downloaded File")
- pdf = open(pdf_path,'rb')
- pdf_reader = PyPDF2.PdfFileReader(pdf) #pdfReaderObject
- await txt.edit("Getting Number of Pages....")
- num_of_pages = pdf_reader.getNumPages() # Number of Pages
- await txt.edit(f"Found {num_of_pages} Page")
- page_no = pdf_reader.getPage(0) # pageObject
- await txt.edit("Finding Text from Pdf File... ")
- page_content = """ """ # EmptyString
- chat_id = message.chat.id
- with open(f'{message.chat.id}.txt', 'a+') as text_path:
- for page in range (0,num_of_pages):
- page_no = pdf_reader.getPage(page) # Iteration of page number
- page_content += page_no.extractText()
- await txt.edit(f"Creating Your Audio Book...\n Please Don't Do Anything")
- output_text = page_content + Thanks
- # Change Voice by editing the Language
- language = 'en-in' # 'en': ['en-us', 'en-ca', 'en-uk', 'en-gb', 'en-au', 'en-gh', 'en-in',
- # 'en-ie', 'en-nz', 'en-ng', 'en-ph', 'en-za', 'en-tz'],
- tts_file = gTTS(text=output_text, lang=language, slow=False)
- tts_file.save(f"{message.chat.id}.mp3")
- with open(f"{message.chat.id}.mp3", "rb") as speech:
- await bot.send_voice(chat_id, speech)
- await txt.edit("𝚃𝙷𝙰𝙽𝙺𝚂 𝙵𝙾𝚁 𝚄𝚂𝙸𝙽𝙶 𝙼𝙴...☺️\n©𝙲𝙸𝙽𝙴𝙼𝙰𝙻𝙰.𝙲𝙾𝙼")
- os.remove(pdf_path)
-
-
- else :
- await message.reply("Please Reply to PDF file")
- except Exception as error :
- print(error)
- await txt.delete()
- os.remove(pdf_path)
diff --git a/plugins/helper/carbon.py b/plugins/helper/carbon.py
deleted file mode 100644
index e7a627e..0000000
--- a/plugins/helper/carbon.py
+++ /dev/null
@@ -1,50 +0,0 @@
-from pyrogram import filters
-from aiohttp import ClientSession
-from pyrogram import Client as bot
-from pyrogram.types import InlineKeyboardButton, InlineKeyboardMarkup
-from asyncio import gather
-from datetime import datetime, timedelta
-from io import BytesIO
-from math import atan2, cos, radians, sin, sqrt
-from os import execvp
-from random import randint
-from re import findall
-from re import sub as re_sub
-from sys import executable
-import aiofiles
-import speedtest
-from PIL import Image
-from pyrogram.types import Message
-from info import S_GROUP
-
-aiohttpsession = ClientSession()
-
-async def make_carbon(code):
- url = "https://carbonara.vercel.app/api/cook"
- async with aiohttpsession.post(url, json={"code": code}) as resp:
- image = BytesIO(await resp.read())
- image.name = "carbon.png"
- return image
-
-
-@bot.on_message(filters.command("carbon"))
-async def carbon_func(_, message):
- if not message.reply_to_message:
- return await message.reply_text(
- "ʀᴇᴘʟʏ ᴛᴏ ᴀ ᴛᴇxᴛ ᴍᴇssᴀɢᴇ ᴛᴏ ᴍᴀᴋᴇ ᴄᴀʀʙᴏɴ."
- )
- if not message.reply_to_message.text:
- return await message.reply_text(
- "ʀᴇᴘʟʏ ᴛᴏ ᴀ ᴛᴇxᴛ ᴍᴇssᴀɢᴇ ᴛᴏ ᴍᴀᴋᴇ ᴄᴀʀʙᴏɴ."
- )
- user_id = message.from_user.id
- m = await message.reply_text("ᴘʀᴏᴄᴇssɪɴɢ...")
- carbon = await make_carbon(message.reply_to_message.text)
- await m.edit("ᴜᴘʟᴏᴀᴅɪɴɢ..")
- await message.reply_photo(
- photo=carbon,
- caption="**ᴛʜɪs ᴘɪᴄ ɪs ɴɪᴄᴇ ᴏɴᴇ\nᴍᴀᴅᴇ ʙʏ ᴄɪɴᴇᴍᴀʟᴀ.ᴄᴏᴍ**",
- reply_markup=InlineKeyboardMarkup([[InlineKeyboardButton("sᴜᴘᴘᴏʀᴛ", url=S_GROUP)]]),
- )
- await m.delete()
- carbon.close()
diff --git a/plugins/helper/covid.py b/plugins/helper/covid.py
deleted file mode 100644
index f3845b5..0000000
--- a/plugins/helper/covid.py
+++ /dev/null
@@ -1,46 +0,0 @@
-import os
-import requests
-from requests.utils import requote_uri
-from pyrogram import Client, filters, enums
-from pyrogram.types import InlineKeyboardMarkup, InlineKeyboardButton
-
-API = "https://api.sumanjay.cf/covid/?country="
-
-BUTTONS = InlineKeyboardMarkup([[InlineKeyboardButton("𝙲𝙻𝙾𝚂𝙴", callback_data='close_data')]])
-
-@Client.on_message(filters.command("covid"))
-async def reply_info(client, message):
- query = message.text.split(None, 1)[1]
- await message.reply_photo(
- photo="https://telegra.ph/file/51fdcccb41510ff8af8b1.jpg",
- caption=covid_info(query),
- quote=True
- )
-
-
-def covid_info(country_name):
- try:
- r = requests.get(API + requote_uri(country_name.lower()))
- info = r.json()
- country = info['country'].capitalize()
- active = info['active']
- confirmed = info['confirmed']
- deaths = info['deaths']
- info_id = info['id']
- last_update = info['last_update']
- latitude = info['latitude']
- longitude = info['longitude']
- recovered = info['recovered']
- covid_info = f"""--**𝙲𝙾𝚅𝙸𝙳 𝟷𝟿 𝙸𝙽𝙵𝙾𝚁𝙼𝙰𝚃𝙸𝙾𝙽**--
-᚛› Country : `{country}`
-᚛› Actived : `{active}`
-᚛› Confirmed : `{confirmed}`
-᚛› Deaths : `{deaths}`
-᚛› ID : `{info_id}`
-᚛› Last Update : `{last_update}`
-᚛› Latitude : `{latitude}`
-᚛› Longitude : `{longitude}`
-᚛› Recovered : `{recovered}`"""
- return covid_info
- except Exception as error:
- return error
diff --git a/plugins/helper/gtranslator.py b/plugins/helper/gtranslator.py
deleted file mode 100644
index 0bc6158..0000000
--- a/plugins/helper/gtranslator.py
+++ /dev/null
@@ -1,44 +0,0 @@
-from googletrans import Translator
-from pyrogram import Client, filters
-from pyrogram.types import InlineKeyboardMarkup, InlineKeyboardButton, CallbackQuery
-from plugins.helpers.list import list
-
-@Client.on_message(filters.command(["tr"]))
-async def left(client,message):
- if (message.reply_to_message):
- try:
- lgcd = message.text.split("/tr")
- lg_cd = lgcd[1].lower().replace(" ", "")
- tr_text = message.reply_to_message.text
- translator = Translator()
- translation = translator.translate(tr_text,dest = lg_cd)
- hehek = InlineKeyboardMarkup(
- [
- [
- InlineKeyboardButton(
- text=f"𝘔𝘰𝘳𝘦 𝘓𝘢𝘯𝘨 𝘊𝘰𝘥𝘦𝘴", url="https://cloud.google.com/translate/docs/languages"
- )
- ],
- [
- InlineKeyboardButton(
- "𝘊𝘭𝘰𝘴𝘦", callback_data="close_data"
- )
- ],
- ]
- )
- try:
- for i in list:
- if list[i]==translation.src:
- fromt = i
- if list[i] == translation.dest:
- to = i
- await message.reply_text(f"translated from {fromt.capitalize()} to {to.capitalize()}\n\n```{translation.text}```", reply_markup=hehek, quote=True)
- except:
- await message.reply_text(f"Translated from **{translation.src}** To **{translation.dest}**\n\n```{translation.text}```", reply_markup=hehek, quote=True)
-
-
- except :
- print("error")
- else:
- ms = await message.reply_text("You can Use This Command by using reply to message")
- await ms.delete()
diff --git a/plugins/helper/json.py b/plugins/helper/json.py
deleted file mode 100644
index c06b59d..0000000
--- a/plugins/helper/json.py
+++ /dev/null
@@ -1,46 +0,0 @@
-import os
-from pyrogram import Client, filters, enums
-from pyrogram.types import InlineKeyboardMarkup, InlineKeyboardButton, Message, CallbackQuery
-
-@Client.on_message(filters.command(["json", 'js', 'showjson']))
-async def jsonify(_, message):
- the_real_message = None
- reply_to_id = None
-
- if message.reply_to_message:
- the_real_message = message.reply_to_message
- else:
- the_real_message = message
- try:
- pk = InlineKeyboardMarkup(
- [
- [
- InlineKeyboardButton(
- text="𝙲𝙻𝙾𝚂𝙴",
- callback_data="close_data"
- )
- ]
- ]
- )
- await message.reply_text(f"{the_real_message}", reply_markup=pk, quote=True)
- except Exception as e:
- with open("json.text", "w+", encoding="utf8") as out_file:
- out_file.write(str(the_real_message))
- reply_markup = InlineKeyboardMarkup(
- [
- [
- InlineKeyboardButton(
- text="𝙲𝙻𝙾𝚂𝙴",
- callback_data="close_data"
- )
- ]
- ]
- )
- await message.reply_document(
- document="json.text",
- caption=str(e),
- disable_notification=True,
- quote=True,
- reply_markup=reply_markup
- )
- os.remove("json.text")
diff --git a/plugins/helper/sticker.py b/plugins/helper/sticker.py
deleted file mode 100644
index 218a56f..0000000
--- a/plugins/helper/sticker.py
+++ /dev/null
@@ -1,12 +0,0 @@
-#Made
-#by
-#Don_Sflix
-
-from pyrogram import Client, filters
-
-@Client.on_message(filters.command(["stickerid"]))
-async def stickerid(bot, message):
- if message.reply_to_message.sticker:
- await message.reply(f"**Sticker ID is** \n `{message.reply_to_message.sticker.file_id}` \n \n ** Unique ID is ** \n\n`{message.reply_to_message.sticker.file_unique_id}`", quote=True)
- else:
- await message.reply("Oops !! Not a sticker file")
diff --git a/plugins/helper/url_shortner.py b/plugins/helper/url_shortner.py
deleted file mode 100644
index 9f9de4e..0000000
--- a/plugins/helper/url_shortner.py
+++ /dev/null
@@ -1,180 +0,0 @@
-import os
-import aiohttp
-from pyrogram import Client, filters, enums
-from pyrogram.types import InlineKeyboardButton, InlineKeyboardMarkup, InlineQueryResultArticle, InputTextMessageContent
-from pyrogram.handlers import MessageHandler
-from pyshorteners import Shortener
-
-BITLY_API = os.environ.get("BITLY_API", "8df1df8c23f719e5cf97788cc2d40321ea30092b")
-CUTTLY_API = os.environ.get("CUTTLY_API", "f64dffbde033b6c307387dd50b7c76e505f1c")
-SHORTCM_API = os.environ.get("SHORTCM_API", "pk_...NIZv")
-GPLINKS_API = os.environ.get("GPLINKS_API", "008ccaedd6061ad1948838f410947603de9007a7")
-
-reply_markup = InlineKeyboardMarkup(
- [[
- InlineKeyboardButton("𝘊𝘭𝘰𝘴𝘦", callback_data='close_data')
- ]]
- )
-
-@Client.on_message(filters.command(["short"]) & filters.regex(r'https?://[^\s]+'))
-async def reply_shortens(bot, update):
- message = await update.reply_text(
- text="`Analysing your link...`",
- disable_web_page_preview=True,
- quote=True
- )
- link = update.matches[0].group(0)
- shorten_urls = await short(link)
- await message.edit_text(
- text=shorten_urls,
- disable_web_page_preview=True
- )
-
-@Client.on_inline_query(filters.regex(r'https?://[^\s]+'))
-async def inline_short(bot, update):
- link = update.matches[0].group(0),
- shorten_urls = await short(link)
- answers = [
- InlineQueryResultArticle(
- title="Short Links",
- description=update.query,
- input_message_content=InputTextMessageContent(
- message_text=shorten_urls,
- disable_web_page_preview=True
- ),
- reply_to_message_id=message.id
- )
- ]
- await bot.answer_inline_query(
- inline_query_id=update.id,
- results=answers
- )
-
-async def short(link):
- shorten_urls = "**--Shorted URLs--**\n"
-
- # Bit.ly shorten
- if BITLY_API:
- try:
- s = Shortener(api_key=BITLY_API)
- url = s.bitly.short(link)
- shorten_urls += f"\n**Bit.ly :-** {url}"
- except Exception as error:
- print(f"Bit.ly error :- {error}")
-
- # Chilp.it shorten
- try:
- s = Shortener()
- url = s.chilpit.short(link)
- shorten_urls += f"\n**Chilp.it :-** {url}"
- except Exception as error:
- print(f"Chilp.it error :- {error}")
-
- # Clck.ru shorten
- try:
- s = Shortener()
- url = s.clckru.short(link)
- shorten_urls += f"\n**Clck.ru :-** {url}"
- except Exception as error:
- print(f"Click.ru error :- {error}")
-
- # Cutt.ly shorten
- if CUTTLY_API:
- try:
- s = Shortener(api_key=CUTTLY_API)
- url = s.cuttly.short(link)
- shorten_urls += f"\n**Cutt.ly :-** {url}"
- except Exception as error:
- print(f"Cutt.ly error :- {error}")
-
- # Da.gd shorten
- try:
- s = Shortener()
- url = s.dagd.short(link)
- shorten_urls += f"\n**Da.gd :-** {url}"
- except Exception as error:
- print(f"Da.gd error :- {error}")
-
- # Is.gd shorten
- try:
- s = Shortener()
- url = s.isgd.short(link)
- shorten_urls += f"\n**Is.gd :-** {url}"
- except Exception as error:
- print(f"Is.gd error :- {error}")
-
- # Osdb.link shorten
- try:
- s = Shortener()
- url = s.osdb.short(link)
- shorten_urls += f"\n**Osdb.link :-** {url}"
- except Exception as error:
- print(f"Osdb.link error :- {error}")
-
- # Ow.ly shorten
- try:
- s = Shortener()
- url = s.owly.short(link)
- shorten_urls += f"\n**Ow.ly :-** {url}"
- except Exception as error:
- print(f"Ow.ly error :- {error}")
-
- # Po.st shorten
- try:
- s = Shortener()
- url = s.post.short(link)
- shorten_urls += f"\n**Po.st :-** {url}"
- except Exception as error:
- print(f"Po.st error :- {error}")
-
- # Qps.ru shorten
- try:
- s = Shortener()
- url = s.qpsru.short(link)
- shorten_urls += f"\n**Qps.ru :-** {url}"
- except Exception as error:
- print(f"Qps.ru error :- {error}")
-
- # Short.cm shorten
- if SHORTCM_API:
- try:
- s = Shortener(api_key=SHORTCM_API)
- url = s.shortcm.short(link)
- shorten_urls += f"\n**Short.cm :-** {url}"
- except Exception as error:
- print(f"Short.cm error :- {error}")
-
- # TinyURL.com shorten
- try:
- s = Shortener()
- url = s.tinyurl.short(link)
- shorten_urls += f"\n**TinyURL.com :-** {url}"
- except Exception as error:
- print(f"TinyURL.com error :- {error}")
-
- # NullPointer shorten
- try:
- s = Shortener(domain='https://0x0.st')
- url = s.nullpointer.short(link)
- shorten_urls += f"\n**0x0.st :-** {url}"
- except Exception as error:
- print(f"NullPointer error :- {error}")
-
- # GPLinks shorten
- try:
- api_url = "https://gplinks.in/api"
- params = {'api': GPLINKS_API, 'url': link}
- async with aiohttp.ClientSession() as session:
- async with session.get(api_url, params=params, raise_for_status=True) as response:
- data = await response.json()
- url = data["shortenedUrl"]
- shorten_urls += f"\n**GPLinks.in :-** {url}"
- except Exception as error:
- print(f"GPLink error :- {error}")
-
- # Send the text
- try:
- shorten_urls += ""
- return shorten_urls
- except Exception as error:
- return error
diff --git a/plugins/helper/whois.py b/plugins/helper/whois.py
deleted file mode 100644
index 5c87849..0000000
--- a/plugins/helper/whois.py
+++ /dev/null
@@ -1,85 +0,0 @@
-
-"""Get info about the replied user
-Syntax: .whois"""
-
-import os
-import time
-from datetime import datetime
-from pyrogram import Client, filters, enums
-from pyrogram.errors import UserNotParticipant
-from info import COMMAND_HAND_LER
-from plugins.helper_functions.extract_user import extract_user
-from plugins.helper_functions.cust_p_filters import f_onw_fliter
-from plugins.helper_functions.last_online_hlpr import last_online
-
-
-@Client.on_message(
- filters.command(["whois", "info"], COMMAND_HAND_LER) &
- f_onw_fliter
-)
-async def who_is(client, message):
- """ extract user information """
- status_message = await message.reply_text(
- "Wait Bro Let Me Check 🙂"
- )
- from_user = None
- from_user_id, _ = extract_user(message)
- try:
- from_user = await client.get_users(from_user_id)
- except Exception as error:
- await status_message.edit(str(error))
- return
- if from_user is None:
- await status_message.edit("no valid user_id / message specified")
- return
-
- first_name = from_user.first_name or ""
- last_name = from_user.last_name or ""
- username = from_user.username or ""
-
- message_out_str = (
- "᚛› 𝙽𝙰𝙼𝙴 : "
- f"{first_name}\n"
- f"᚛› 𝚂𝚄𝙵𝙵𝙸𝚇 : {last_name}\n"
- f"᚛› 𝚄𝚂𝙴𝚁𝙽𝙰𝙼𝙴 : @{username}\n"
- f"᚛› 𝚄𝚂𝙴𝚁 𝙸𝙳 : {from_user.id}\n"
- f"᚛› 𝚄𝚂𝙴𝚁 𝙻𝙸𝙽𝙺 : {from_user.mention}\n" if from_user.username else ""
- f"᚛› 𝙸𝚂 𝙰𝙲𝙲𝙾𝚄𝙽𝚃 𝙳𝙴𝙻𝙴𝚃𝙴𝙳 : True\n" if from_user.is_deleted else ""
- f"᚛› 𝙸𝚂 𝚅𝙴𝚁𝙸𝙵𝙸𝙴𝙳 : True" if from_user.is_verified else ""
- f"᚛› 𝙸𝚂 𝚂𝙲𝙰𝙼 : True" if from_user.is_scam else ""
- # f"Is Fake: True" if from_user.is_fake else ""
- f"᚛› 𝙻𝙰𝚂𝚃 𝚂𝙴𝙴𝙽 : {last_online(from_user)}\n\n"
- )
-
- if message.chat.type in [enums.ChatType.SUPERGROUP, enums.ChatType.CHANNEL]:
- try:
- chat_member_p = await message.chat.get_member(from_user.id)
- joined_date = datetime.fromtimestamp(
- chat_member_p.joined_date or time.time()
- ).strftime("%Y.%m.%d %H:%M:%S")
- message_out_str += (
- "Joined on: "
- f"{joined_date}"
- "\n"
- )
- except UserNotParticipant:
- pass
- chat_photo = from_user.photo
- if chat_photo:
- local_user_photo = await client.download_media(
- message=chat_photo.big_file_id
- )
- await message.reply_photo(
- photo=local_user_photo,
- quote=True,
- caption=message_out_str,
- disable_notification=True
- )
- os.remove(local_user_photo)
- else:
- await message.reply_text(
- text=message_out_str,
- quote=True,
- disable_notification=True
- )
- await status_message.delete()
From 090dff91bb75582ff517d2153cc57b32412c1780 Mon Sep 17 00:00:00 2001
From: AFSAL <138692053+CyberTG@users.noreply.github.com>
Date: Sat, 16 Sep 2023 16:34:21 +0530
Subject: [PATCH 109/237] Delete plugins/helper_functions directory
---
plugins/helper_functions/admin_check.py | 34 -
plugins/helper_functions/cust_p_filters.py | 47 -
plugins/helper_functions/extract_user.py | 40 -
plugins/helper_functions/fonts_func.py | 2364 ------------------
plugins/helper_functions/get_file_id.py | 25 -
plugins/helper_functions/last_online_hlpr.py | 21 -
plugins/helper_functions/string_handling.py | 110 -
7 files changed, 2641 deletions(-)
delete mode 100644 plugins/helper_functions/admin_check.py
delete mode 100644 plugins/helper_functions/cust_p_filters.py
delete mode 100644 plugins/helper_functions/extract_user.py
delete mode 100644 plugins/helper_functions/fonts_func.py
delete mode 100644 plugins/helper_functions/get_file_id.py
delete mode 100644 plugins/helper_functions/last_online_hlpr.py
delete mode 100644 plugins/helper_functions/string_handling.py
diff --git a/plugins/helper_functions/admin_check.py b/plugins/helper_functions/admin_check.py
deleted file mode 100644
index bf05a2d..0000000
--- a/plugins/helper_functions/admin_check.py
+++ /dev/null
@@ -1,34 +0,0 @@
-from pyrogram.types import Message
-from pyrogram import enums
-
-
-async def admin_check(message: Message) -> bool:
- if not message.from_user:
- return False
-
- if message.chat.type not in [enums.ChatType.SUPERGROUP, enums.ChatType.CHANNEL]:
- return False
-
- if message.from_user.id in [
- 777000, # Telegram Service Notifications
- 1087968824 # GroupAnonymousBot
- ]:
- return True
-
- client = message._client
- chat_id = message.chat.id
- user_id = message.from_user.id
-
- check_status = await client.get_chat_member(
- chat_id=chat_id,
- user_id=user_id
- )
- admin_strings = [
- enums.ChatMemberStatus.OWNER,
- enums.ChatMemberStatus.ADMINISTRATOR
- ]
- # https://git.colinshark.de/PyroBot/PyroBot/src/branch/master/pyrobot/modules/admin.py#L69
- if check_status.status not in admin_strings:
- return False
- else:
- return True
diff --git a/plugins/helper_functions/cust_p_filters.py b/plugins/helper_functions/cust_p_filters.py
deleted file mode 100644
index 33831ef..0000000
--- a/plugins/helper_functions/cust_p_filters.py
+++ /dev/null
@@ -1,47 +0,0 @@
-from pyrogram import (
- filters
-)
-from info import ADMINS, AUTH_USERS
-from plugins.helper_functions.admin_check import admin_check
-import os
-
-USE_AS_BOT = os.environ.get("USE_AS_BOT", True)
-
-def f_sudo_filter(filt, client, message):
- return bool(
- message.from_user.id in AUTH_USERS
- )
-
-
-sudo_filter = filters.create(
- func=f_sudo_filter,
- name="SudoFilter"
-)
-
-
-def onw_filter(filt, client, message):
- if USE_AS_BOT:
- return bool(
- True # message.from_user.id in ADMINS
- )
- else:
- return bool(
- message.from_user and
- message.from_user.is_self
- )
-
-
-f_onw_fliter = filters.create(
- func=onw_filter,
- name="OnwFilter"
-)
-
-
-async def admin_filter_f(filt, client, message):
- return await admin_check(message)
-
-
-admin_fliter = filters.create(
- func=admin_filter_f,
- name="AdminFilter"
-)
diff --git a/plugins/helper_functions/extract_user.py b/plugins/helper_functions/extract_user.py
deleted file mode 100644
index a4d407e..0000000
--- a/plugins/helper_functions/extract_user.py
+++ /dev/null
@@ -1,40 +0,0 @@
-#!/usr/bin/env python3
-# -*- coding: utf-8 -*-
-
-from pyrogram.types import Message
-
-
-def extract_user(message: Message) -> (int, str):
- """extracts the user from a message"""
- user_id = None
- user_first_name = None
-
- if message.reply_to_message:
- user_id = message.reply_to_message.from_user.id
- user_first_name = message.reply_to_message.from_user.first_name
-
- elif len(message.command) > 1:
- if (
- len(message.entities) > 1 and
- message.entities[1].type == "text_mention"
- ):
- # 0: is the command used
- # 1: should be the user specified
- required_entity = message.entities[1]
- user_id = required_entity.user.id
- user_first_name = required_entity.user.first_name
- else:
- user_id = message.command[1]
- # don't want to make a request -_-
- user_first_name = user_id
-
- try:
- user_id = int(user_id)
- except ValueError:
- print("പൊട്ടൻ")
-
- else:
- user_id = message.from_user.id
- user_first_name = message.from_user.first_name
-
- return (user_id, user_first_name)
diff --git a/plugins/helper_functions/fonts_func.py b/plugins/helper_functions/fonts_func.py
deleted file mode 100644
index 82da4a8..0000000
--- a/plugins/helper_functions/fonts_func.py
+++ /dev/null
@@ -1,2364 +0,0 @@
-class Fonts:
- def typewriter(text):
- style = {
- 'a': '𝚊',
- 'b': '𝚋',
- 'c': '𝚌',
- 'd': '𝚍',
- 'e': '𝚎',
- 'f': '𝚏',
- 'g': '𝚐',
- 'h': '𝚑',
- 'i': '𝚒',
- 'j': '𝚓',
- 'k': '𝚔',
- 'l': '𝚕',
- 'm': '𝚖',
- 'n': '𝚗',
- 'o': '𝚘',
- 'p': '𝚙',
- 'q': '𝚚',
- 'r': '𝚛',
- 's': '𝚜',
- 't': '𝚝',
- 'u': '𝚞',
- 'v': '𝚟',
- 'w': '𝚠',
- 'x': '𝚡',
- 'y': '𝚢',
- 'z': '𝚣',
- 'A': '𝙰',
- 'B': '𝙱',
- 'C': '𝙲',
- 'D': '𝙳',
- 'E': '𝙴',
- 'F': '𝙵',
- 'G': '𝙶',
- 'H': '𝙷',
- 'I': '𝙸',
- 'J': '𝙹',
- 'K': '𝙺',
- 'L': '𝙻',
- 'M': '𝙼',
- 'N': '𝙽',
- 'O': '𝙾',
- 'P': '𝙿',
- 'Q': '𝚀',
- 'R': '𝚁',
- 'S': '𝚂',
- 'T': '𝚃',
- 'U': '𝚄',
- 'V': '𝚅',
- 'W': '𝚆',
- 'X': '𝚇',
- 'Y': '𝚈',
- 'Z': '𝚉'
- }
- for i, j in style.items():
- text = text.replace(i, j)
- return text
-
- def outline(text):
- style = {
- 'a': '𝕒',
- 'b': '𝕓',
- 'c': '𝕔',
- 'd': '𝕕',
- 'e': '𝕖',
- 'f': '𝕗',
- 'g': '𝕘',
- 'h': '𝕙',
- 'i': '𝕚',
- 'j': '𝕛',
- 'k': '𝕜',
- 'l': '𝕝',
- 'm': '𝕞',
- 'n': '𝕟',
- 'o': '𝕠',
- 'p': '𝕡',
- 'q': '𝕢',
- 'r': '𝕣',
- 's': '𝕤',
- 't': '𝕥',
- 'u': '𝕦',
- 'v': '𝕧',
- 'w': '𝕨',
- 'x': '𝕩',
- 'y': '𝕪',
- 'z': '𝕫',
- 'A': '𝔸',
- 'B': '𝔹',
- 'C': 'ℂ',
- 'D': '𝔻',
- 'E': '𝔼',
- 'F': '𝔽',
- 'G': '𝔾',
- 'H': 'ℍ',
- 'I': '𝕀',
- 'J': '𝕁',
- 'K': '𝕂',
- 'L': '𝕃',
- 'M': '𝕄',
- 'N': 'ℕ',
- 'O': '𝕆',
- 'P': 'ℙ',
- 'Q': 'ℚ',
- 'R': 'ℝ',
- 'S': '𝕊',
- 'T': '𝕋',
- 'U': '𝕌',
- 'V': '𝕍',
- 'W': '𝕎',
- 'X': '𝕏',
- 'Y': '𝕐',
- 'Z': 'ℤ',
- '0': '𝟘',
- '1': '𝟙',
- '2': '𝟚',
- '3': '𝟛',
- '4': '𝟜',
- '5': '𝟝',
- '6': '𝟞',
- '7': '𝟟',
- '8': '𝟠',
- '9': '𝟡'
- }
- for i, j in style.items():
- text = text.replace(i, j)
- return text
-
- def serief(text):
- style = {
- 'a': '𝐚',
- 'b': '𝐛',
- 'c': '𝐜',
- 'd': '𝐝',
- 'e': '𝐞',
- 'f': '𝐟',
- 'g': '𝐠',
- 'h': '𝐡',
- 'i': '𝐢',
- 'j': '𝐣',
- 'k': '𝐤',
- 'l': '𝐥',
- 'm': '𝐦',
- 'n': '𝐧',
- 'o': '𝐨',
- 'p': '𝐩',
- 'q': '𝐪',
- 'r': '𝐫',
- 's': '𝐬',
- 't': '𝐭',
- 'u': '𝐮',
- 'v': '𝐯',
- 'w': '𝐰',
- 'x': '𝐱',
- 'y': '𝐲',
- 'z': '𝐳',
- 'A': '𝐀',
- 'B': '𝐁',
- 'C': '𝐂',
- 'D': '𝐃',
- 'E': '𝐄',
- 'F': '𝐅',
- 'G': '𝐆',
- 'H': '𝐇',
- 'I': '𝐈',
- 'J': '𝐉',
- 'K': '𝐊',
- 'L': '𝐋',
- 'M': '𝐌',
- 'N': '𝐍',
- 'O': '𝐎',
- 'P': '𝐏',
- 'Q': '𝐐',
- 'R': '𝐑',
- 'S': '𝐒',
- 'T': '𝐓',
- 'U': '𝐔',
- 'V': '𝐕',
- 'W': '𝐖',
- 'X': '𝐗',
- 'Y': '𝐘',
- 'Z': '𝐙',
- '0': '𝟎',
- '1': '𝟏',
- '2': '𝟐',
- '3': '𝟑',
- '4': '𝟒',
- '5': '𝟓',
- '6': '𝟔',
- '7': '𝟕',
- '8': '𝟖',
- '9': '𝟗'
- }
- for i, j in style.items():
- text = text.replace(i, j)
- return text
-
- def bold_cool(text):
- style = {
- 'a': '𝒂',
- 'b': '𝒃',
- 'c': '𝒄',
- 'd': '𝒅',
- 'e': '𝒆',
- 'f': '𝒇',
- 'g': '𝒈',
- 'h': '𝒉',
- 'i': '𝒊',
- 'j': '𝒋',
- 'k': '𝒌',
- 'l': '𝒍',
- 'm': '𝒎',
- 'n': '𝒏',
- 'o': '𝒐',
- 'p': '𝒑',
- 'q': '𝒒',
- 'r': '𝒓',
- 's': '𝒔',
- 't': '𝒕',
- 'u': '𝒖',
- 'v': '𝒗',
- 'w': '𝒘',
- 'x': '𝒙',
- 'y': '𝒚',
- 'z': '𝒛',
- 'A': '𝑨',
- 'B': '𝑩',
- 'C': '𝑪',
- 'D': '𝑫',
- 'E': '𝑬',
- 'F': '𝑭',
- 'G': '𝑮',
- 'H': '𝑯',
- 'I': '𝑰',
- 'J': '𝑱',
- 'K': '𝑲',
- 'L': '𝑳',
- 'M': '𝑴',
- 'N': '𝑵',
- 'O': '𝑶',
- 'P': '𝑷',
- 'Q': '𝑸',
- 'R': '𝑹',
- 'S': '𝑺',
- 'T': '𝑻',
- 'U': '𝑼',
- 'V': '𝑽',
- 'W': '𝑾',
- 'X': '𝑿',
- 'Y': '𝒀',
- 'Z': '𝒁'
- }
- for i, j in style.items():
- text = text.replace(i, j)
- return text
-
- def cool(text):
- style = {
- 'a': '𝑎',
- 'b': '𝑏',
- 'c': '𝑐',
- 'd': '𝑑',
- 'e': '𝑒',
- 'f': '𝑓',
- 'g': '𝑔',
- 'h': 'ℎ',
- 'i': '𝑖',
- 'j': '𝑗',
- 'k': '𝑘',
- 'l': '𝑙',
- 'm': '𝑚',
- 'n': '𝑛',
- 'o': '𝑜',
- 'p': '𝑝',
- 'q': '𝑞',
- 'r': '𝑟',
- 's': '𝑠',
- 't': '𝑡',
- 'u': '𝑢',
- 'v': '𝑣',
- 'w': '𝑤',
- 'x': '𝑥',
- 'y': '𝑦',
- 'z': '𝑧',
- 'A': '𝐴',
- 'B': '𝐵',
- 'C': '𝐶',
- 'D': '𝐷',
- 'E': '𝐸',
- 'F': '𝐹',
- 'G': '𝐺',
- 'H': '𝐻',
- 'I': '𝐼',
- 'J': '𝐽',
- 'K': '𝐾',
- 'L': '𝐿',
- 'M': '𝑀',
- 'N': '𝑁',
- 'O': '𝑂',
- 'P': '𝑃',
- 'Q': '𝑄',
- 'R': '𝑅',
- 'S': '𝑆',
- 'T': '𝑇',
- 'U': '𝑈',
- 'V': '𝑉',
- 'W': '𝑊',
- 'X': '𝑋',
- 'Y': '𝑌',
- 'Z': '𝑍'
- }
- for i, j in style.items():
- text = text.replace(i, j)
- return text
-
- def smallcap(text):
- style = {
- 'a': 'ᴀ',
- 'b': 'ʙ',
- 'c': 'ᴄ',
- 'd': 'ᴅ',
- 'e': 'ᴇ',
- 'f': 'ғ',
- 'g': 'ɢ',
- 'h': 'ʜ',
- 'i': 'ɪ',
- 'j': 'ɪ',
- 'k': 'ᴋ',
- 'l': 'ʟ',
- 'm': 'ᴍ',
- 'n': 'ɴ',
- 'o': 'ᴏ',
- 'p': 'ᴘ',
- 'q': 'ǫ',
- 'r': 'ʀ',
- 's': 'ꜱ',
- 't': 'ᴛ',
- 'u': 'ᴜ',
- 'v': 'ᴠ',
- 'w': 'ᴡ',
- 'x': 'x',
- 'y': 'ʏ',
- 'z': 'ᴢ',
- 'A': 'A',
- 'B': 'B',
- 'C': 'C',
- 'D': 'D',
- 'E': 'E',
- 'F': 'F',
- 'G': 'G',
- 'H': 'H',
- 'I': 'I',
- 'J': 'J',
- 'K': 'K',
- 'L': 'L',
- 'M': 'M',
- 'N': 'N',
- 'O': 'O',
- 'P': 'P',
- 'Q': 'Q',
- 'R': 'R',
- 'S': 'S',
- 'T': 'T',
- 'U': 'U',
- 'V': 'V',
- 'W': 'W',
- 'X': 'X',
- 'Y': 'Y',
- 'Z': 'Z',
- '0': '𝟶',
- '1': '𝟷',
- '2': '𝟸',
- '3': '𝟹',
- '4': '𝟺',
- '5': '𝟻',
- '6': '𝟼',
- '7': '𝟽',
- '8': '𝟾',
- '9': '𝟿'
- }
- for i, j in style.items():
- text = text.replace(i, j)
- return text
-
- def script(text):
- style = {
- 'a': '𝒶',
- 'b': '𝒷',
- 'c': '𝒸',
- 'd': '𝒹',
- 'e': 'ℯ',
- 'f': '𝒻',
- 'g': 'ℊ',
- 'h': '𝒽',
- 'i': '𝒾',
- 'j': '𝒿',
- 'k': '𝓀',
- 'l': '𝓁',
- 'm': '𝓂',
- 'n': '𝓃',
- 'o': 'ℴ',
- 'p': '𝓅',
- 'q': '𝓆',
- 'r': '𝓇',
- 's': '𝓈',
- 't': '𝓉',
- 'u': '𝓊',
- 'v': '𝓋',
- 'w': '𝓌',
- 'x': '𝓍',
- 'y': '𝓎',
- 'z': '𝓏',
- 'A': '𝒜',
- 'B': 'ℬ',
- 'C': '𝒞',
- 'D': '𝒟',
- 'E': 'ℰ',
- 'F': 'ℱ',
- 'G': '𝒢',
- 'H': 'ℋ',
- 'I': 'ℐ',
- 'J': '𝒥',
- 'K': '𝒦',
- 'L': 'ℒ',
- 'M': 'ℳ',
- 'N': '𝒩',
- 'O': '𝒪',
- 'P': '𝒫',
- 'Q': '𝒬',
- 'R': 'ℛ',
- 'S': '𝒮',
- 'T': '𝒯',
- 'U': '𝒰',
- 'V': '𝒱',
- 'W': '𝒲',
- 'X': '𝒳',
- 'Y': '𝒴',
- 'Z': '𝒵'
- }
- for i, j in style.items():
- text = text.replace(i, j)
- return text
-
- def bold_script(text):
- style = {
- 'a': '𝓪',
- 'b': '𝓫',
- 'c': '𝓬',
- 'd': '𝓭',
- 'e': '𝓮',
- 'f': '𝓯',
- 'g': '𝓰',
- 'h': '𝓱',
- 'i': '𝓲',
- 'j': '𝓳',
- 'k': '𝓴',
- 'l': '𝓵',
- 'm': '𝓶',
- 'n': '𝓷',
- 'o': '𝓸',
- 'p': '𝓹',
- 'q': '𝓺',
- 'r': '𝓻',
- 's': '𝓼',
- 't': '𝓽',
- 'u': '𝓾',
- 'v': '𝓿',
- 'w': '𝔀',
- 'x': '𝔁',
- 'y': '𝔂',
- 'z': '𝔃',
- 'A': '𝓐',
- 'B': '𝓑',
- 'C': '𝓒',
- 'D': '𝓓',
- 'E': '𝓔',
- 'F': '𝓕',
- 'G': '𝓖',
- 'H': '𝓗',
- 'I': '𝓘',
- 'J': '𝓙',
- 'K': '𝓚',
- 'L': '𝓛',
- 'M': '𝓜',
- 'N': '𝓝',
- 'O': '𝓞',
- 'P': '𝓟',
- 'Q': '𝓠',
- 'R': '𝓡',
- 'S': '𝓢',
- 'T': '𝓣',
- 'U': '𝓤',
- 'V': '𝓥',
- 'W': '𝓦',
- 'X': '𝓧',
- 'Y': '𝓨',
- 'Z': '𝓩'
- }
- for i, j in style.items():
- text = text.replace(i, j)
- return text
-
- def tiny(text):
- style = {
- 'a': 'ᵃ',
- 'b': 'ᵇ',
- 'c': 'ᶜ',
- 'd': 'ᵈ',
- 'e': 'ᵉ',
- 'f': 'ᶠ',
- 'g': 'ᵍ',
- 'h': 'ʰ',
- 'i': 'ⁱ',
- 'j': 'ʲ',
- 'k': 'ᵏ',
- 'l': 'ˡ',
- 'm': 'ᵐ',
- 'n': 'ⁿ',
- 'o': 'ᵒ',
- 'p': 'ᵖ',
- 'q': 'ᵠ',
- 'r': 'ʳ',
- 's': 'ˢ',
- 't': 'ᵗ',
- 'u': 'ᵘ',
- 'v': 'ᵛ',
- 'w': 'ʷ',
- 'x': 'ˣ',
- 'y': 'ʸ',
- 'z': 'ᶻ',
- 'A': 'ᵃ',
- 'B': 'ᵇ',
- 'C': 'ᶜ',
- 'D': 'ᵈ',
- 'E': 'ᵉ',
- 'F': 'ᶠ',
- 'G': 'ᵍ',
- 'H': 'ʰ',
- 'I': 'ⁱ',
- 'J': 'ʲ',
- 'K': 'ᵏ',
- 'L': 'ˡ',
- 'M': 'ᵐ',
- 'N': 'ⁿ',
- 'O': 'ᵒ',
- 'P': 'ᵖ',
- 'Q': 'ᵠ',
- 'R': 'ʳ',
- 'S': 'ˢ',
- 'T': 'ᵗ',
- 'U': 'ᵘ',
- 'V': 'ᵛ',
- 'W': 'ʷ',
- 'X': 'ˣ',
- 'Y': 'ʸ',
- 'Z': 'ᶻ'
- }
- for i, j in style.items():
- text = text.replace(i, j)
- return text
-
- def comic(text):
- style = {
- 'a': 'ᗩ',
- 'b': 'ᗷ',
- 'c': 'ᑕ',
- 'd': 'ᗪ',
- 'e': 'ᗴ',
- 'f': 'ᖴ',
- 'g': 'ᘜ',
- 'h': 'ᕼ',
- 'i': 'I',
- 'j': 'ᒍ',
- 'k': 'K',
- 'l': 'ᒪ',
- 'm': 'ᗰ',
- 'n': 'ᑎ',
- 'o': 'O',
- 'p': 'ᑭ',
- 'q': 'ᑫ',
- 'r': 'ᖇ',
- 's': 'Տ',
- 't': 'T',
- 'u': 'ᑌ',
- 'v': 'ᐯ',
- 'w': 'ᗯ',
- 'x': '᙭',
- 'y': 'Y',
- 'z': 'ᘔ',
- 'A': 'ᗩ',
- 'B': 'ᗷ',
- 'C': 'ᑕ',
- 'D': 'ᗪ',
- 'E': 'ᗴ',
- 'F': 'ᖴ',
- 'G': 'ᘜ',
- 'H': 'ᕼ',
- 'I': 'I',
- 'J': 'ᒍ',
- 'K': 'K',
- 'L': 'ᒪ',
- 'M': 'ᗰ',
- 'N': 'ᑎ',
- 'O': 'O',
- 'P': 'ᑭ',
- 'Q': 'ᑫ',
- 'R': 'ᖇ',
- 'S': 'Տ',
- 'T': 'T',
- 'U': 'ᑌ',
- 'V': 'ᐯ',
- 'W': 'ᗯ',
- 'X': '᙭',
- 'Y': 'Y',
- 'Z': 'ᘔ'
- }
- for i, j in style.items():
- text = text.replace(i, j)
- return text
-
- def san(text):
- style = {
- 'a': '𝗮',
- 'b': '𝗯',
- 'c': '𝗰',
- 'd': '𝗱',
- 'e': '𝗲',
- 'f': '𝗳',
- 'g': '𝗴',
- 'h': '𝗵',
- 'i': '𝗶',
- 'j': '𝗷',
- 'k': '𝗸',
- 'l': '𝗹',
- 'm': '𝗺',
- 'n': '𝗻',
- 'o': '𝗼',
- 'p': '𝗽',
- 'q': '𝗾',
- 'r': '𝗿',
- 's': '𝘀',
- 't': '𝘁',
- 'u': '𝘂',
- 'v': '𝘃',
- 'w': '𝘄',
- 'x': '𝘅',
- 'y': '𝘆',
- 'z': '𝘇',
- 'A': '𝗔',
- 'B': '𝗕',
- 'C': '𝗖',
- 'D': '𝗗',
- 'E': '𝗘',
- 'F': '𝗙',
- 'G': '𝗚',
- 'H': '𝗛',
- 'I': '𝗜',
- 'J': '𝗝',
- 'K': '𝗞',
- 'L': '𝗟',
- 'M': '𝗠',
- 'N': '𝗡',
- 'O': '𝗢',
- 'P': '𝗣',
- 'Q': '𝗤',
- 'R': '𝗥',
- 'S': '𝗦',
- 'T': '𝗧',
- 'U': '𝗨',
- 'V': '𝗩',
- 'W': '𝗪',
- 'X': '𝗫',
- 'Y': '𝗬',
- 'Z': '𝗭',
- '0': '𝟬',
- '1': '𝟭',
- '2': '𝟮',
- '3': '𝟯',
- '4': '𝟰',
- '5': '𝟱',
- '6': '𝟲',
- '7': '𝟳',
- '8': '𝟴',
- '9': '𝟵'
- }
- for i, j in style.items():
- text = text.replace(i, j)
- return text
-
- def slant_san(text):
- style = {
- 'a': '𝙖',
- 'b': '𝙗',
- 'c': '𝙘',
- 'd': '𝙙',
- 'e': '𝙚',
- 'f': '𝙛',
- 'g': '𝙜',
- 'h': '𝙝',
- 'i': '𝙞',
- 'j': '𝙟',
- 'k': '𝙠',
- 'l': '𝙡',
- 'm': '𝙢',
- 'n': '𝙣',
- 'o': '𝙤',
- 'p': '𝙥',
- 'q': '𝙦',
- 'r': '𝙧',
- 's': '𝙨',
- 't': '𝙩',
- 'u': '𝙪',
- 'v': '𝙫',
- 'w': '𝙬',
- 'x': '𝙭',
- 'y': '𝙮',
- 'z': '𝙯',
- 'A': '𝘼',
- 'B': '𝘽',
- 'C': '𝘾',
- 'D': '𝘿',
- 'E': '𝙀',
- 'F': '𝙁',
- 'G': '𝙂',
- 'H': '𝙃',
- 'I': '𝙄',
- 'J': '𝙅',
- 'K': '𝙆',
- 'L': '𝙇',
- 'M': '𝙈',
- 'N': '𝙉',
- 'O': '𝙊',
- 'P': '𝙋',
- 'Q': '𝙌',
- 'R': '𝙍',
- 'S': '𝙎',
- 'T': '𝙏',
- 'U': '𝙐',
- 'V': '𝙑',
- 'W': '𝙒',
- 'X': '𝙓',
- 'Y': '𝙔',
- 'Z': '𝙕'
- }
- for i, j in style.items():
- text = text.replace(i, j)
- return text
-
- def slant(text):
- style = {
- 'a': '𝘢',
- 'b': '𝘣',
- 'c': '𝘤',
- 'd': '𝘥',
- 'e': '𝘦',
- 'f': '𝘧',
- 'g': '𝘨',
- 'h': '𝘩',
- 'i': '𝘪',
- 'j': '𝘫',
- 'k': '𝘬',
- 'l': '𝘭',
- 'm': '𝘮',
- 'n': '𝘯',
- 'o': '𝘰',
- 'p': '𝘱',
- 'q': '𝘲',
- 'r': '𝘳',
- 's': '𝘴',
- 't': '𝘵',
- 'u': '𝘶',
- 'v': '𝘷',
- 'w': '𝘸',
- 'x': '𝘹',
- 'y': '𝘺',
- 'z': '𝘻',
- 'A': '𝘈',
- 'B': '𝘉',
- 'C': '𝘊',
- 'D': '𝘋',
- 'E': '𝘌',
- 'F': '𝘍',
- 'G': '𝘎',
- 'H': '𝘏',
- 'I': '𝘐',
- 'J': '𝘑',
- 'K': '𝘒',
- 'L': '𝘓',
- 'M': '𝘔',
- 'N': '𝘕',
- 'O': '𝘖',
- 'P': '𝘗',
- 'Q': '𝘘',
- 'R': '𝘙',
- 'S': '𝘚',
- 'T': '𝘛',
- 'U': '𝘜',
- 'V': '𝘝',
- 'W': '𝘞',
- 'X': '𝘟',
- 'Y': '𝘠',
- 'Z': '𝘡'
- }
- for i, j in style.items():
- text = text.replace(i, j)
- return text
-
- def sim(text):
- style = {
- 'a': '𝖺',
- 'b': '𝖻',
- 'c': '𝖼',
- 'd': '𝖽',
- 'e': '𝖾',
- 'f': '𝖿',
- 'g': '𝗀',
- 'h': '𝗁',
- 'i': '𝗂',
- 'j': '𝗃',
- 'k': '𝗄',
- 'l': '𝗅',
- 'm': '𝗆',
- 'n': '𝗇',
- 'o': '𝗈',
- 'p': '𝗉',
- 'q': '𝗊',
- 'r': '𝗋',
- 's': '𝗌',
- 't': '𝗍',
- 'u': '𝗎',
- 'v': '𝗏',
- 'w': '𝗐',
- 'x': '𝗑',
- 'y': '𝗒',
- 'z': '𝗓',
- 'A': '𝖠',
- 'B': '𝖡',
- 'C': '𝖢',
- 'D': '𝖣',
- 'E': '𝖤',
- 'F': '𝖥',
- 'G': '𝖦',
- 'H': '𝖧',
- 'I': '𝖨',
- 'J': '𝖩',
- 'K': '𝖪',
- 'L': '𝖫',
- 'M': '𝖬',
- 'N': '𝖭',
- 'O': '𝖮',
- 'P': '𝖯',
- 'Q': '𝖰',
- 'R': '𝖱',
- 'S': '𝖲',
- 'T': '𝖳',
- 'U': '𝖴',
- 'V': '𝖵',
- 'W': '𝖶',
- 'X': '𝖷',
- 'Y': '𝖸',
- 'Z': '𝖹'
- }
- for i, j in style.items():
- text = text.replace(i, j)
- return text
-
- def circles(text):
- style = {
- 'a': 'Ⓐ︎',
- 'b': 'Ⓑ︎',
- 'c': 'Ⓒ︎',
- 'd': 'Ⓓ︎',
- 'e': 'Ⓔ︎',
- 'f': 'Ⓕ︎',
- 'g': 'Ⓖ︎',
- 'h': 'Ⓗ︎',
- 'i': 'Ⓘ︎',
- 'j': 'Ⓙ︎',
- 'k': 'Ⓚ︎',
- 'l': 'Ⓛ︎',
- 'm': 'Ⓜ︎',
- 'n': 'Ⓝ︎',
- 'o': 'Ⓞ︎',
- 'p': 'Ⓟ︎',
- 'q': 'Ⓠ︎',
- 'r': 'Ⓡ︎',
- 's': 'Ⓢ︎',
- 't': 'Ⓣ︎',
- 'u': 'Ⓤ︎',
- 'v': 'Ⓥ︎',
- 'w': 'Ⓦ︎',
- 'x': 'Ⓧ︎',
- 'y': 'Ⓨ︎',
- 'z': 'Ⓩ︎',
- 'A': 'Ⓐ︎',
- 'B': 'Ⓑ︎',
- 'C': 'Ⓒ︎',
- 'D': 'Ⓓ︎',
- 'E': 'Ⓔ︎',
- 'F': 'Ⓕ︎',
- 'G': 'Ⓖ︎',
- 'H': 'Ⓗ︎',
- 'I': 'Ⓘ︎',
- 'J': 'Ⓙ︎',
- 'K': 'Ⓚ︎',
- 'L': 'Ⓛ︎',
- 'M': 'Ⓜ︎',
- 'N': 'Ⓝ︎',
- 'O': 'Ⓞ︎',
- 'P': 'Ⓟ︎',
- 'Q': 'Ⓠ︎',
- 'R': 'Ⓡ︎',
- 'S': 'Ⓢ︎',
- 'T': 'Ⓣ︎',
- 'U': 'Ⓤ︎',
- 'V': 'Ⓥ︎',
- 'W': 'Ⓦ︎',
- 'X': 'Ⓧ︎',
- 'Y': 'Ⓨ︎',
- 'Z': 'Ⓩ︎',
- '0': '⓪',
- '1': '①',
- '2': '②',
- '3': '③',
- '4': '④',
- '5': '⑤',
- '6': '⑥',
- '7': '⑦',
- '8': '⑧',
- '9': '⑨'
- }
- for i, j in style.items():
- text = text.replace(i, j)
- return text
-
- def dark_circle(text):
- style = {
- 'a': '🅐︎',
- 'b': '🅑︎',
- 'c': '🅒︎',
- 'd': '🅓︎',
- 'e': '🅔︎',
- 'f': '🅕︎',
- 'g': '🅖︎',
- 'h': '🅗︎',
- 'i': '🅘︎',
- 'j': '🅙︎',
- 'k': '🅚︎',
- 'l': '🅛︎',
- 'm': '🅜︎',
- 'n': '🅝︎',
- 'o': '🅞︎',
- 'p': '🅟︎',
- 'q': '🅠︎',
- 'r': '🅡︎',
- 's': '🅢︎',
- 't': '🅣︎',
- 'u': '🅤︎',
- 'v': '🅥︎',
- 'w': '🅦︎',
- 'x': '🅧︎',
- 'y': '🅨︎',
- 'z': '🅩︎',
- 'A': '🅐︎',
- 'B': '🅑︎',
- 'C': '🅒︎',
- 'D': '🅓︎',
- 'E': '🅔︎',
- 'F': '🅕︎',
- 'G': '🅖︎',
- 'H': '🅗︎',
- 'I': '🅘︎',
- 'J': '🅙︎',
- 'K': '🅚︎',
- 'L': '🅛︎',
- 'M': '🅜︎',
- 'N': '🅝︎',
- 'O': '🅞︎',
- 'P': '🅟︎',
- 'Q': '🅠︎',
- 'R': '🅡︎',
- 'S': '🅢︎',
- 'T': '🅣︎',
- 'U': '🅤︎',
- 'V': '🅥︎',
- 'W': '🅦︎',
- 'X': '🅧︎',
- 'Y': '🅨︎',
- 'Z': '🅩',
- '0': '⓿',
- '1': '➊',
- '2': '➋',
- '3': '➌',
- '4': '➍',
- '5': '➎',
- '6': '➏',
- '7': '➐',
- '8': '➑',
- '9': '➒'
- }
- for i, j in style.items():
- text = text.replace(i, j)
- return text
-
- def gothic(text):
- style = {
- 'a': '𝔞',
- 'b': '𝔟',
- 'c': '𝔠',
- 'd': '𝔡',
- 'e': '𝔢',
- 'f': '𝔣',
- 'g': '𝔤',
- 'h': '𝔥',
- 'i': '𝔦',
- 'j': '𝔧',
- 'k': '𝔨',
- 'l': '𝔩',
- 'm': '𝔪',
- 'n': '𝔫',
- 'o': '𝔬',
- 'p': '𝔭',
- 'q': '𝔮',
- 'r': '𝔯',
- 's': '𝔰',
- 't': '𝔱',
- 'u': '𝔲',
- 'v': '𝔳',
- 'w': '𝔴',
- 'x': '𝔵',
- 'y': '𝔶',
- 'z': '𝔷',
- 'A': '𝔄',
- 'B': '𝔅',
- 'C': 'ℭ',
- 'D': '𝔇',
- 'E': '𝔈',
- 'F': '𝔉',
- 'G': '𝔊',
- 'H': 'ℌ',
- 'I': 'ℑ',
- 'J': '𝔍',
- 'K': '𝔎',
- 'L': '𝔏',
- 'M': '𝔐',
- 'N': '𝔑',
- 'O': '𝔒',
- 'P': '𝔓',
- 'Q': '𝔔',
- 'R': 'ℜ',
- 'S': '𝔖',
- 'T': '𝔗',
- 'U': '𝔘',
- 'V': '𝔙',
- 'W': '𝔚',
- 'X': '𝔛',
- 'Y': '𝔜',
- 'Z': 'ℨ'
- }
- for i, j in style.items():
- text = text.replace(i, j)
- return text
-
- def happy(text):
- style = {
- 'a': 'ă̈',
- 'b': 'b̆̈',
- 'c': 'c̆̈',
- 'd': 'd̆̈',
- 'e': 'ĕ̈',
- 'f': 'f̆̈',
- 'g': 'ğ̈',
- 'h': 'h̆̈',
- 'i': 'ĭ̈',
- 'j': 'j̆̈',
- 'k': 'k̆̈',
- 'l': 'l̆̈',
- 'm': 'm̆̈',
- 'n': 'n̆̈',
- 'o': 'ŏ̈',
- 'p': 'p̆̈',
- 'q': 'q̆̈',
- 'r': 'r̆̈',
- 's': 's̆̈',
- 't': 't̆̈',
- 'u': 'ŭ̈',
- 'v': 'v̆̈',
- 'w': 'w̆̈',
- 'x': 'x̆̈',
- 'y': 'y̆̈',
- 'z': 'z̆̈',
- 'A': 'Ă̈',
- 'B': 'B̆̈',
- 'C': 'C̆̈',
- 'D': 'D̆̈',
- 'E': 'Ĕ̈',
- 'F': 'F̆̈',
- 'G': 'Ğ̈',
- 'H': 'H̆̈',
- 'I': 'Ĭ̈',
- 'J': 'J̆̈',
- 'K': 'K̆̈',
- 'L': 'L̆̈',
- 'M': 'M̆̈',
- 'N': 'N̆̈',
- 'O': 'Ŏ̈',
- 'P': 'P̆̈',
- 'Q': 'Q̆̈',
- 'R': 'R̆̈',
- 'S': 'S̆̈',
- 'T': 'T̆̈',
- 'U': 'Ŭ̈',
- 'V': 'V̆̈',
- 'W': 'W̆̈',
- 'X': 'X̆̈',
- 'Y': 'Y̆̈',
- 'Z': 'Z̆̈'
- }
- for i, j in style.items():
- text = text.replace(i, j)
- return text
-
- def sad(text):
- style = {
- 'a': 'ȃ̈',
- 'b': 'b̑̈',
- 'c': 'c̑̈',
- 'd': 'd̑̈',
- 'e': 'ȇ̈',
- 'f': 'f̑̈',
- 'g': 'g̑̈',
- 'h': 'h̑̈',
- 'i': 'ȋ̈',
- 'j': 'j̑̈',
- 'k': 'k̑̈',
- 'l': 'l̑̈',
- 'm': 'm̑̈',
- 'n': 'n̑̈',
- 'o': 'ȏ̈',
- 'p': 'p̑̈',
- 'q': 'q̑̈',
- 'r': 'ȓ̈',
- 's': 's̑̈',
- 't': 't̑̈',
- 'u': 'ȗ̈',
- 'v': 'v̑̈',
- 'w': 'w̑̈',
- 'x': 'x̑̈',
- 'y': 'y̑̈',
- 'z': 'z̑̈',
- 'A': 'Ȃ̈',
- 'B': 'B̑̈',
- 'C': 'C̑̈',
- 'D': 'D̑̈',
- 'E': 'Ȇ̈',
- 'F': 'F̑̈',
- 'G': 'G̑̈',
- 'H': 'H̑̈',
- 'I': 'Ȋ̈',
- 'J': 'J̑̈',
- 'K': 'K̑̈',
- 'L': 'L̑̈',
- 'M': 'M̑̈',
- 'N': 'N̑̈',
- 'O': 'Ȏ̈',
- 'P': 'P̑̈',
- 'Q': 'Q̑̈',
- 'R': 'Ȓ̈',
- 'S': 'S̑̈',
- 'T': 'T̑̈',
- 'U': 'Ȗ̈',
- 'V': 'V̑̈',
- 'W': 'W̑̈',
- 'X': 'X̑̈',
- 'Y': 'Y̑̈',
- 'Z': 'Z̑̈'
- }
- for i, j in style.items():
- text = text.replace(i, j)
- return text
-
- def special(text):
- style = {
- 'a': '🇦 ',
- 'b': '🇧 ',
- 'c': '🇨 ',
- 'd': '🇩 ',
- 'e': '🇪 ',
- 'f': '🇫 ',
- 'g': '🇬 ',
- 'h': '🇭 ',
- 'i': '🇮 ',
- 'j': '🇯 ',
- 'k': '🇰 ',
- 'l': '🇱 ',
- 'm': '🇲 ',
- 'n': '🇳 ',
- 'o': '🇴 ',
- 'p': '🇵 ',
- 'q': '🇶 ',
- 'r': '🇷 ',
- 's': '🇸 ',
- 't': '🇹 ',
- 'u': '🇺 ',
- 'v': '🇻 ',
- 'w': '🇼 ',
- 'x': '🇽 ',
- 'y': '🇾 ',
- 'z': '🇿 ',
- 'A': '🇦 ',
- 'B': '🇧 ',
- 'C': '🇨 ',
- 'D': '🇩 ',
- 'E': '🇪 ',
- 'F': '🇫 ',
- 'G': '🇬 ',
- 'H': '🇭 ',
- 'I': '🇮 ',
- 'J': '🇯 ',
- 'K': '🇰 ',
- 'L': '🇱 ',
- 'M': '🇲 ',
- 'N': '🇳 ',
- 'O': '🇴 ',
- 'P': '🇵 ',
- 'Q': '🇶 ',
- 'R': '🇷 ',
- 'S': '🇸 ',
- 'T': '🇹 ',
- 'U': '🇺 ',
- 'V': '🇻 ',
- 'W': '🇼 ',
- 'X': '🇽 ',
- 'Y': '🇾 ',
- 'Z': '🇿 '
- }
- for i, j in style.items():
- text = text.replace(i, j)
- return text
-
- def square(text):
- style = {
- 'a': '🄰',
- 'b': '🄱',
- 'c': '🄲',
- 'd': '🄳',
- 'e': '🄴',
- 'f': '🄵',
- 'g': '🄶',
- 'h': '🄷',
- 'i': '🄸',
- 'j': '🄹',
- 'k': '🄺',
- 'l': '🄻',
- 'm': '🄼',
- 'n': '🄽',
- 'o': '🄾',
- 'p': '🄿',
- 'q': '🅀',
- 'r': '🅁',
- 's': '🅂',
- 't': '🅃',
- 'u': '🅄',
- 'v': '🅅',
- 'w': '🅆',
- 'x': '🅇',
- 'y': '🅈',
- 'z': '🅉',
- 'A': '🄰',
- 'B': '🄱',
- 'C': '🄲',
- 'D': '🄳',
- 'E': '🄴',
- 'F': '🄵',
- 'G': '🄶',
- 'H': '🄷',
- 'I': '🄸',
- 'J': '🄹',
- 'K': '🄺',
- 'L': '🄻',
- 'M': '🄼',
- 'N': '🄽',
- 'O': '🄾',
- 'P': '🄿',
- 'Q': '🅀',
- 'R': '🅁',
- 'S': '🅂',
- 'T': '🅃',
- 'U': '🅄',
- 'V': '🅅',
- 'W': '🅆',
- 'X': '🅇',
- 'Y': '🅈',
- 'Z': '🅉'
- }
- for i, j in style.items():
- text = text.replace(i, j)
- return text
-
- def dark_square(text):
- style = {
- 'a': '🅰︎',
- 'b': '🅱︎',
- 'c': '🅲︎',
- 'd': '🅳︎',
- 'e': '🅴︎',
- 'f': '🅵︎',
- 'g': '🅶︎',
- 'h': '🅷︎',
- 'i': '🅸︎',
- 'j': '🅹︎',
- 'k': '🅺︎',
- 'l': '🅻︎',
- 'm': '🅼︎',
- 'n': '🅽︎',
- 'o': '🅾︎',
- 'p': '🅿︎',
- 'q': '🆀︎',
- 'r': '🆁︎',
- 's': '🆂︎',
- 't': '🆃︎',
- 'u': '🆄︎',
- 'v': '🆅︎',
- 'w': '🆆︎',
- 'x': '🆇︎',
- 'y': '🆈︎',
- 'z': '🆉︎',
- 'A': '🅰︎',
- 'B': '🅱︎',
- 'C': '🅲︎',
- 'D': '🅳︎',
- 'E': '🅴︎',
- 'F': '🅵︎',
- 'G': '🅶︎',
- 'H': '🅷︎',
- 'I': '🅸︎',
- 'J': '🅹︎',
- 'K': '🅺︎',
- 'L': '🅻︎',
- 'M': '🅼︎',
- 'N': '🅽︎',
- 'O': '🅾︎',
- 'P': '🅿︎',
- 'Q': '🆀︎',
- 'R': '🆁︎',
- 'S': '🆂︎',
- 'T': '🆃︎',
- 'U': '🆄︎',
- 'V': '🆅︎',
- 'W': '🆆︎',
- 'X': '🆇︎',
- 'Y': '🆈︎',
- 'Z': '🆉︎'
- }
- for i, j in style.items():
- text = text.replace(i, j)
- return text
-
- def andalucia(text):
- style = {
- 'a': 'ꪖ',
- 'b': '᥇',
- 'c': 'ᥴ',
- 'd': 'ᦔ',
- 'e': 'ꫀ',
- 'f': 'ᠻ',
- 'g': 'ᧁ',
- 'h': 'ꫝ',
- 'i': '𝓲',
- 'j': '𝓳',
- 'k': '𝘬',
- 'l': 'ꪶ',
- 'm': 'ꪑ',
- 'n': 'ꪀ',
- 'o': 'ꪮ',
- 'p': 'ρ',
- 'q': '𝘲',
- 'r': '𝘳',
- 's': '𝘴',
- 't': '𝓽',
- 'u': 'ꪊ',
- 'v': 'ꪜ',
- 'w': '᭙',
- 'x': '᥊',
- 'y': 'ꪗ',
- 'z': 'ɀ',
- 'A': 'ꪖ',
- 'B': '᥇',
- 'C': 'ᥴ',
- 'D': 'ᦔ',
- 'E': 'ꫀ',
- 'F': 'ᠻ',
- 'G': 'ᧁ',
- 'H': 'ꫝ',
- 'I': '𝓲',
- 'J': '𝓳',
- 'K': '𝘬',
- 'L': 'ꪶ',
- 'M': 'ꪑ',
- 'N': 'ꪀ',
- 'O': 'ꪮ',
- 'P': 'ρ',
- 'Q': '𝘲',
- 'R': '𝘳',
- 'S': '𝘴',
- 'T': '𝓽',
- 'U': 'ꪊ',
- 'V': 'ꪜ',
- 'W': '᭙',
- 'X': '᥊',
- 'Y': 'ꪗ',
- 'Z': 'ɀ'
- }
- for i, j in style.items():
- text = text.replace(i, j)
- return text
-
- def manga(text):
- style = {
- 'a': '卂',
- 'b': '乃',
- 'c': '匚',
- 'd': 'ᗪ',
- 'e': '乇',
- 'f': '千',
- 'g': 'ᘜ',
- 'h': '卄',
- 'i': '|',
- 'j': 'フ',
- 'k': 'Ҝ',
- 'l': 'ㄥ',
- 'm': '爪',
- 'n': '几',
- 'o': 'ㄖ',
- 'p': '卩',
- 'q': 'Ҩ',
- 'r': '尺',
- 's': '丂',
- 't': 'ㄒ',
- 'u': 'ㄩ',
- 'v': 'ᐯ',
- 'w': '山',
- 'x': '乂',
- 'y': 'ㄚ',
- 'z': '乙',
- 'A': '卂',
- 'B': '乃',
- 'C': '匚',
- 'D': 'ᗪ',
- 'E': '乇',
- 'F': '千',
- 'G': 'ᘜ',
- 'H': '卄',
- 'I': '|',
- 'J': 'フ',
- 'K': 'Ҝ',
- 'L': 'ㄥ',
- 'M': '爪',
- 'N': '几',
- 'O': 'ㄖ',
- 'P': '卩',
- 'Q': 'Ҩ',
- 'R': '尺',
- 'S': '丂',
- 'T': 'ㄒ',
- 'U': 'ㄩ',
- 'V': 'ᐯ',
- 'W': '山',
- 'X': '乂',
- 'Y': 'ㄚ',
- 'Z': '乙'
- }
- for i, j in style.items():
- text = text.replace(i, j)
- return text
-
- def stinky(text):
- style = {
- 'a': 'a̾',
- 'b': 'b̾',
- 'c': 'c̾',
- 'd': 'd̾',
- 'e': 'e̾',
- 'f': 'f̾',
- 'g': 'g̾',
- 'h': 'h̾',
- 'i': 'i̾',
- 'j': 'j̾',
- 'k': 'k̾',
- 'l': 'l̾',
- 'm': 'm̾',
- 'n': 'n̾',
- 'o': 'o̾',
- 'p': 'p̾',
- 'q': 'q̾',
- 'r': 'r̾',
- 's': 's̾',
- 't': 't̾',
- 'u': 'u̾',
- 'v': 'v̾',
- 'w': 'w̾',
- 'x': 'x̾',
- 'y': 'y̾',
- 'z': 'z̾',
- 'A': 'A̾',
- 'B': 'B̾',
- 'C': 'C̾',
- 'D': 'D̾',
- 'E': 'E̾',
- 'F': 'F̾',
- 'G': 'G̾',
- 'H': 'H̾',
- 'I': 'I̾',
- 'J': 'J̾',
- 'K': 'K̾',
- 'L': 'L̾',
- 'M': 'M̾',
- 'N': 'N̾',
- 'O': 'O̾',
- 'P': 'P̾',
- 'Q': 'Q̾',
- 'R': 'R̾',
- 'S': 'S̾',
- 'T': 'T̾',
- 'U': 'U̾',
- 'V': 'V̾',
- 'W': 'W̾',
- 'X': 'X̾',
- 'Y': 'Y̾',
- 'Z': 'Z̾'
- }
- for i, j in style.items():
- text = text.replace(i, j)
- return text
-
- def bubbles(text):
- style = {
- 'a': 'ḁͦ',
- 'b': 'b̥ͦ',
- 'c': 'c̥ͦ',
- 'd': 'd̥ͦ',
- 'e': 'e̥ͦ',
- 'f': 'f̥ͦ',
- 'g': 'g̥ͦ',
- 'h': 'h̥ͦ',
- 'i': 'i̥ͦ',
- 'j': 'j̥ͦ',
- 'k': 'k̥ͦ',
- 'l': 'l̥ͦ',
- 'm': 'm̥ͦ',
- 'n': 'n̥ͦ',
- 'o': 'o̥ͦ',
- 'p': 'p̥ͦ',
- 'q': 'q̥ͦ',
- 'r': 'r̥ͦ',
- 's': 's̥ͦ',
- 't': 't̥ͦ',
- 'u': 'u̥ͦ',
- 'v': 'v̥ͦ',
- 'w': 'w̥ͦ',
- 'x': 'x̥ͦ',
- 'y': 'y̥ͦ',
- 'z': 'z̥ͦ',
- 'A': 'Ḁͦ',
- 'B': 'B̥ͦ',
- 'C': 'C̥ͦ',
- 'D': 'D̥ͦ',
- 'E': 'E̥ͦ',
- 'F': 'F̥ͦ',
- 'G': 'G̥ͦ',
- 'H': 'H̥ͦ',
- 'I': 'I̥ͦ',
- 'J': 'J̥ͦ',
- 'K': 'K̥ͦ',
- 'L': 'L̥ͦ',
- 'M': 'M̥ͦ',
- 'N': 'N̥ͦ',
- 'O': 'O̥ͦ',
- 'P': 'P̥ͦ',
- 'Q': 'Q̥ͦ',
- 'R': 'R̥ͦ',
- 'S': 'S̥ͦ',
- 'T': 'T̥ͦ',
- 'U': 'U̥ͦ',
- 'V': 'V̥ͦ',
- 'W': 'W̥ͦ',
- 'X': 'X̥ͦ',
- 'Y': 'Y̥ͦ',
- 'Z': 'Z̥ͦ'
- }
- for i, j in style.items():
- text = text.replace(i, j)
- return text
-
- def underline(text):
- style = {
- 'a': 'a͟',
- 'b': 'b͟',
- 'c': 'c͟',
- 'd': 'd͟',
- 'e': 'e͟',
- 'f': 'f͟',
- 'g': 'g͟',
- 'h': 'h͟',
- 'i': 'i͟',
- 'j': 'j͟',
- 'k': 'k͟',
- 'l': 'l͟',
- 'm': 'm͟',
- 'n': 'n͟',
- 'o': 'o͟',
- 'p': 'p͟',
- 'q': 'q͟',
- 'r': 'r͟',
- 's': 's͟',
- 't': 't͟',
- 'u': 'u͟',
- 'v': 'v͟',
- 'w': 'w͟',
- 'x': 'x͟',
- 'y': 'y͟',
- 'z': 'z͟',
- 'A': 'A͟',
- 'B': 'B͟',
- 'C': 'C͟',
- 'D': 'D͟',
- 'E': 'E͟',
- 'F': 'F͟',
- 'G': 'G͟',
- 'H': 'H͟',
- 'I': 'I͟',
- 'J': 'J͟',
- 'K': 'K͟',
- 'L': 'L͟',
- 'M': 'M͟',
- 'N': 'N͟',
- 'O': 'O͟',
- 'P': 'P͟',
- 'Q': 'Q͟',
- 'R': 'R͟',
- 'S': 'S͟',
- 'T': 'T͟',
- 'U': 'U͟',
- 'V': 'V͟',
- 'W': 'W͟',
- 'X': 'X͟',
- 'Y': 'Y͟',
- 'Z': 'Z͟'
- }
- for i, j in style.items():
- text = text.replace(i, j)
- return text
-
- def ladybug(text):
- style = {
- 'a': 'ꍏ',
- 'b': 'ꌃ',
- 'c': 'ꏳ',
- 'd': 'ꀷ',
- 'e': 'ꏂ',
- 'f': 'ꎇ',
- 'g': 'ꁅ',
- 'h': 'ꀍ',
- 'i': 'ꀤ',
- 'j': '꒻',
- 'k': 'ꀘ',
- 'l': '꒒',
- 'm': 'ꎭ',
- 'n': 'ꈤ',
- 'o': 'ꂦ',
- 'p': 'ᖘ',
- 'q': 'ꆰ',
- 'r': 'ꋪ',
- 's': 'ꌚ',
- 't': '꓄',
- 'u': 'ꀎ',
- 'v': '꒦',
- 'w': 'ꅐ',
- 'x': 'ꉧ',
- 'y': 'ꌩ',
- 'z': 'ꁴ',
- 'A': 'ꍏ',
- 'B': 'ꌃ',
- 'C': 'ꏳ',
- 'D': 'ꀷ',
- 'E': 'ꏂ',
- 'F': 'ꎇ',
- 'G': 'ꁅ',
- 'H': 'ꀍ',
- 'I': 'ꀤ',
- 'J': '꒻',
- 'K': 'ꀘ',
- 'L': '꒒',
- 'M': 'ꎭ',
- 'N': 'ꈤ',
- 'O': 'ꂦ',
- 'P': 'ᖘ',
- 'Q': 'ꆰ',
- 'R': 'ꋪ',
- 'S': 'ꌚ',
- 'T': '꓄',
- 'U': 'ꀎ',
- 'V': '꒦',
- 'W': 'ꅐ',
- 'X': 'ꉧ',
- 'Y': 'ꌩ',
- 'Z': 'ꁴ'
- }
- for i, j in style.items():
- text = text.replace(i, j)
- return text
-
- def rays(text):
- style = {
- 'a': 'a҉',
- 'b': 'b҉',
- 'c': 'c҉',
- 'd': 'd҉',
- 'e': 'e҉',
- 'f': 'f҉',
- 'g': 'g҉',
- 'h': 'h҉',
- 'i': 'i҉',
- 'j': 'j҉',
- 'k': 'k҉',
- 'l': 'l҉',
- 'm': 'm҉',
- 'n': 'n҉',
- 'o': 'o҉',
- 'p': 'p҉',
- 'q': 'q҉',
- 'r': 'r҉',
- 's': 's҉',
- 't': 't҉',
- 'u': 'u҉',
- 'v': 'v҉',
- 'w': 'w҉',
- 'x': 'x҉',
- 'y': 'y҉',
- 'z': 'z҉',
- 'A': 'A҉',
- 'B': 'B҉',
- 'C': 'C҉',
- 'D': 'D҉',
- 'E': 'E҉',
- 'F': 'F҉',
- 'G': 'G҉',
- 'H': 'H҉',
- 'I': 'I҉',
- 'J': 'J҉',
- 'K': 'K҉',
- 'L': 'L҉',
- 'M': 'M҉',
- 'N': 'N҉',
- 'O': 'O҉',
- 'P': 'P҉',
- 'Q': 'Q҉',
- 'R': 'R҉',
- 'S': 'S҉',
- 'T': 'T҉',
- 'U': 'U҉',
- 'V': 'V҉',
- 'W': 'W҉',
- 'X': 'X҉',
- 'Y': 'Y҉',
- 'Z': 'Z҉'
- }
- for i, j in style.items():
- text = text.replace(i, j)
- return text
-
- def birds(text):
- style = {
- 'a': 'a҈',
- 'b': 'b҈',
- 'c': 'c҈',
- 'd': 'd҈',
- 'e': 'e҈',
- 'f': 'f҈',
- 'g': 'g҈',
- 'h': 'h҈',
- 'i': 'i҈',
- 'j': 'j҈',
- 'k': 'k҈',
- 'l': 'l҈',
- 'm': 'm҈',
- 'n': 'n҈',
- 'o': 'o҈',
- 'p': 'p҈',
- 'q': 'q҈',
- 'r': 'r҈',
- 's': 's҈',
- 't': 't҈',
- 'u': 'u҈',
- 'v': 'v҈',
- 'w': 'w҈',
- 'x': 'x҈',
- 'y': 'y҈',
- 'z': 'z҈',
- 'A': 'A҈',
- 'B': 'B҈',
- 'C': 'C҈',
- 'D': 'D҈',
- 'E': 'E҈',
- 'F': 'F҈',
- 'G': 'G҈',
- 'H': 'H҈',
- 'I': 'I҈',
- 'J': 'J҈',
- 'K': 'K҈',
- 'L': 'L҈',
- 'M': 'M҈',
- 'N': 'N҈',
- 'O': 'O҈',
- 'P': 'P҈',
- 'Q': 'Q҈',
- 'R': 'R҈',
- 'S': 'S҈',
- 'T': 'T҈',
- 'U': 'U҈',
- 'V': 'V҈',
- 'W': 'W҈',
- 'X': 'X҈',
- 'Y': 'Y҈',
- 'Z': 'Z҈'
- }
- for i, j in style.items():
- text = text.replace(i, j)
- return text
-
- def slash(text):
- style = {
- 'a': 'a̸',
- 'b': 'b̸',
- 'c': 'c̸',
- 'd': 'd̸',
- 'e': 'e̸',
- 'f': 'f̸',
- 'g': 'g̸',
- 'h': 'h̸',
- 'i': 'i̸',
- 'j': 'j̸',
- 'k': 'k̸',
- 'l': 'l̸',
- 'm': 'm̸',
- 'n': 'n̸',
- 'o': 'o̸',
- 'p': 'p̸',
- 'q': 'q̸',
- 'r': 'r̸',
- 's': 's̸',
- 't': 't̸',
- 'u': 'u̸',
- 'v': 'v̸',
- 'w': 'w̸',
- 'x': 'x̸',
- 'y': 'y̸',
- 'z': 'z̸',
- 'A': 'A̸',
- 'B': 'B̸',
- 'C': 'C̸',
- 'D': 'D̸',
- 'E': 'E̸',
- 'F': 'F̸',
- 'G': 'G̸',
- 'H': 'H̸',
- 'I': 'I̸',
- 'J': 'J̸',
- 'K': 'K̸',
- 'L': 'L̸',
- 'M': 'M̸',
- 'N': 'N̸',
- 'O': 'O̸',
- 'P': 'P̸',
- 'Q': 'Q̸',
- 'R': 'R̸',
- 'S': 'S̸',
- 'T': 'T̸',
- 'U': 'U̸',
- 'V': 'V̸',
- 'W': 'W̸',
- 'X': 'X̸',
- 'Y': 'Y̸',
- 'Z': 'Z̸'
- }
- for i, j in style.items():
- text = text.replace(i, j)
- return text
-
- def stop(text):
- style = {
- 'a': 'a⃠',
- 'b': 'b⃠',
- 'c': 'c⃠',
- 'd': 'd⃠',
- 'e': 'e⃠',
- 'f': 'f⃠',
- 'g': 'g⃠',
- 'h': 'h⃠',
- 'i': 'i⃠',
- 'j': 'j⃠',
- 'k': 'k⃠',
- 'l': 'l⃠',
- 'm': 'm⃠',
- 'n': 'n⃠',
- 'o': 'o⃠',
- 'p': 'p⃠',
- 'q': 'q⃠',
- 'r': 'r⃠',
- 's': 's⃠',
- 't': 't⃠',
- 'u': 'u⃠',
- 'v': 'v⃠',
- 'w': 'w⃠',
- 'x': 'x⃠',
- 'y': 'y⃠',
- 'z': 'z⃠',
- 'A': 'A⃠',
- 'B': 'B⃠',
- 'C': 'C⃠',
- 'D': 'D⃠',
- 'E': 'E⃠',
- 'F': 'F⃠',
- 'G': 'G⃠',
- 'H': 'H⃠',
- 'I': 'I⃠',
- 'J': 'J⃠',
- 'K': 'K⃠',
- 'L': 'L⃠',
- 'M': 'M⃠',
- 'N': 'N⃠',
- 'O': 'O⃠',
- 'P': 'P⃠',
- 'Q': 'Q⃠',
- 'R': 'R⃠',
- 'S': 'S⃠',
- 'T': 'T⃠',
- 'U': 'U⃠',
- 'V': 'V⃠',
- 'W': 'W⃠',
- 'X': 'X⃠',
- 'Y': 'Y⃠',
- 'Z': 'Z⃠'
- }
- for i, j in style.items():
- text = text.replace(i, j)
- return text
-
- def skyline(text):
- style = {
- 'a': 'a̺͆',
- 'b': 'b̺͆',
- 'c': 'c̺͆',
- 'd': 'd̺͆',
- 'e': 'e̺͆',
- 'f': 'f̺͆',
- 'g': 'g̺͆',
- 'h': 'h̺͆',
- 'i': 'i̺͆',
- 'j': 'j̺͆',
- 'k': 'k̺͆',
- 'l': 'l̺͆',
- 'm': 'm̺͆',
- 'n': 'n̺͆',
- 'o': 'o̺͆',
- 'p': 'p̺͆',
- 'q': 'q̺͆',
- 'r': 'r̺͆',
- 's': 's̺͆',
- 't': 't̺͆',
- 'u': 'u̺͆',
- 'v': 'v̺͆',
- 'w': 'w̺͆',
- 'x': 'x̺͆',
- 'y': 'y̺͆',
- 'z': 'z̺͆',
- 'A': 'A̺͆',
- 'B': 'B̺͆',
- 'C': 'C̺͆',
- 'D': 'D̺͆',
- 'E': 'E̺͆',
- 'F': 'F̺͆',
- 'G': 'G̺͆',
- 'H': 'H̺͆',
- 'I': 'I̺͆',
- 'J': 'J̺͆',
- 'K': 'K̺͆',
- 'L': 'L̺͆',
- 'M': 'M̺͆',
- 'N': 'N̺͆',
- 'O': 'O̺͆',
- 'P': 'P̺͆',
- 'Q': 'Q̺͆',
- 'R': 'R̺͆',
- 'S': 'S̺͆',
- 'T': 'T̺͆',
- 'U': 'U̺͆',
- 'V': 'V̺͆',
- 'W': 'W̺͆',
- 'X': 'X̺͆',
- 'Y': 'Y̺͆',
- 'Z': 'Z̺͆'
- }
- for i, j in style.items():
- text = text.replace(i, j)
- return text
-
- def arrows(text):
- style = {
- 'a': 'a͎',
- 'b': 'b͎',
- 'c': 'c͎',
- 'd': 'd͎',
- 'e': 'e͎',
- 'f': 'f͎',
- 'g': 'g͎',
- 'h': 'h͎',
- 'i': 'i͎',
- 'j': 'j͎',
- 'k': 'k͎',
- 'l': 'l͎',
- 'm': 'm͎',
- 'n': 'n͎',
- 'o': 'o͎',
- 'p': 'p͎',
- 'q': 'q͎',
- 'r': 'r͎',
- 's': 's͎',
- 't': 't͎',
- 'u': 'u͎',
- 'v': 'v͎',
- 'w': 'w͎',
- 'x': 'x͎',
- 'y': 'y͎',
- 'z': 'z͎',
- 'A': 'A͎',
- 'B': 'B͎',
- 'C': 'C͎',
- 'D': 'D͎',
- 'E': 'E͎',
- 'F': 'F͎',
- 'G': 'G͎',
- 'H': 'H͎',
- 'I': 'I͎',
- 'J': 'J͎',
- 'K': 'K͎',
- 'L': 'L͎',
- 'M': 'M͎',
- 'N': 'N͎',
- 'O': 'O͎',
- 'P': 'P͎',
- 'Q': 'Q͎',
- 'R': 'R͎',
- 'S': 'S͎',
- 'T': 'T͎',
- 'U': 'U͎',
- 'V': 'V͎',
- 'W': 'W͎',
- 'X': 'X͎',
- 'Y': 'Y͎',
- 'Z': 'Z͎'
- }
- for i, j in style.items():
- text = text.replace(i, j)
- return text
-
- def rvnes(text):
- style = {
- 'a': 'ል',
- 'b': 'ጌ',
- 'c': 'ር',
- 'd': 'ዕ',
- 'e': 'ቿ',
- 'f': 'ቻ',
- 'g': 'ኗ',
- 'h': 'ዘ',
- 'i': 'ጎ',
- 'j': 'ጋ',
- 'k': 'ጕ',
- 'l': 'ረ',
- 'm': 'ጠ',
- 'n': 'ክ',
- 'o': 'ዐ',
- 'p': 'የ',
- 'q': 'ዒ',
- 'r': 'ዪ',
- 's': 'ነ',
- 't': 'ፕ',
- 'u': 'ሁ',
- 'v': 'ሀ',
- 'w': 'ሠ',
- 'x': 'ሸ',
- 'y': 'ሃ',
- 'z': 'ጊ',
- 'A': 'ል',
- 'B': 'ጌ',
- 'C': 'ር',
- 'D': 'ዕ',
- 'E': 'ቿ',
- 'F': 'ቻ',
- 'G': 'ኗ',
- 'H': 'ዘ',
- 'I': 'ጎ',
- 'J': 'ጋ',
- 'K': 'ጕ',
- 'L': 'ረ',
- 'M': 'ጠ',
- 'N': 'ክ',
- 'O': 'ዐ',
- 'P': 'የ',
- 'Q': 'ዒ',
- 'R': 'ዪ',
- 'S': 'ነ',
- 'T': 'ፕ',
- 'U': 'ሁ',
- 'V': 'ሀ',
- 'W': 'ሠ',
- 'X': 'ሸ',
- 'Y': 'ሃ',
- 'Z': 'ጊ'
- }
- for i, j in style.items():
- text = text.replace(i, j)
- return text
-
- def strike(text):
- style = {
- 'a': 'a̶',
- 'b': 'b̶',
- 'c': 'c̶',
- 'd': 'd̶',
- 'e': 'e̶',
- 'f': 'f̶',
- 'g': 'g̶',
- 'h': 'h̶',
- 'i': 'i̶',
- 'j': 'j̶',
- 'k': 'k̶',
- 'l': 'l̶',
- 'm': 'm̶',
- 'n': 'n̶',
- 'o': 'o̶',
- 'p': 'p̶',
- 'q': 'q̶',
- 'r': 'r̶',
- 's': 's̶',
- 't': 't̶',
- 'u': 'u̶',
- 'v': 'v̶',
- 'w': 'w̶',
- 'x': 'x̶',
- 'y': 'y̶',
- 'z': 'z̶',
- 'A': 'A̶',
- 'B': 'B̶',
- 'C': 'C̶',
- 'D': 'D̶',
- 'E': 'E̶',
- 'F': 'F̶',
- 'G': 'G̶',
- 'H': 'H̶',
- 'I': 'I̶',
- 'J': 'J̶',
- 'K': 'K̶',
- 'L': 'L̶',
- 'M': 'M̶',
- 'N': 'N̶',
- 'O': 'O̶',
- 'P': 'P̶',
- 'Q': 'Q̶',
- 'R': 'R̶',
- 'S': 'S̶',
- 'T': 'T̶',
- 'U': 'U̶',
- 'V': 'V̶',
- 'W': 'W̶',
- 'X': 'X̶',
- 'Y': 'Y̶',
- 'Z': 'Z̶'
- }
- for i, j in style.items():
- text = text.replace(i, j)
- return text
-
- def frozen(text):
- style = {
- 'a': 'a༙',
- 'b': 'b༙',
- 'c': 'c༙',
- 'd': 'd༙',
- 'e': 'e༙',
- 'f': 'f༙',
- 'g': 'g༙',
- 'h': 'h༙',
- 'i': 'i༙',
- 'j': 'j༙',
- 'k': 'k༙',
- 'l': 'l༙',
- 'm': 'm༙',
- 'n': 'n༙',
- 'o': 'o༙',
- 'p': 'p༙',
- 'q': 'q༙',
- 'r': 'r༙',
- 's': 's༙',
- 't': 't༙',
- 'u': 'u༙',
- 'v': 'v༙',
- 'w': 'w༙',
- 'x': 'x༙',
- 'y': 'y༙',
- 'z': 'z༙',
- 'A': 'A༙',
- 'B': 'B༙',
- 'C': 'C༙',
- 'D': 'D༙',
- 'E': 'E༙',
- 'F': 'F༙',
- 'G': 'G༙',
- 'H': 'H༙',
- 'I': 'I༙',
- 'J': 'J༙',
- 'K': 'K༙',
- 'L': 'L༙',
- 'M': 'M༙',
- 'N': 'N༙',
- 'O': 'O༙',
- 'P': 'P༙',
- 'Q': 'Q༙',
- 'R': 'R༙',
- 'S': 'S༙',
- 'T': 'T༙',
- 'U': 'U༙',
- 'V': 'V༙',
- 'W': 'W༙',
- 'X': 'X༙',
- 'Y': 'Y༙',
- 'Z': 'Z༙'
- }
- for i, j in style.items():
- text = text.replace(i, j)
- return text
-
- def bold_gothic(text):
- style = {
- 'a': '𝖆',
- 'b': '𝖇',
- 'c': '𝖈',
- 'd': '𝖉',
- 'e': '𝖊',
- 'f': '𝖋',
- 'g': '𝖌',
- 'h': '𝖍',
- 'i': '𝖎',
- 'j': '𝖏',
- 'k': '𝖐',
- 'l': '𝖑',
- 'm': '𝖒',
- 'n': '𝖓',
- 'o': '𝖔',
- 'p': '𝖕',
- 'q': '𝖖',
- 'r': '𝖗',
- 's': '𝖘',
- 't': '𝖙',
- 'u': '𝖚',
- 'v': '𝖛',
- 'w': '𝖜',
- 'x': '𝖝',
- 'y': '𝖞',
- 'z': '𝖟',
- 'A': '𝕬',
- 'B': '𝕭',
- 'C': '𝕮',
- 'D': '𝕺',
- 'E': '𝕰',
- 'F': '𝕱',
- 'G': '𝕲',
- 'H': '𝕳',
- 'I': '𝕴',
- 'J': '𝕵',
- 'K': '𝕶',
- 'L': '𝕷',
- 'M': '𝕸',
- 'N': '𝕹',
- 'O': '𝕺',
- 'P': '𝕻',
- 'Q': '𝕼',
- 'R': '𝕽',
- 'S': '𝕾',
- 'T': '𝕿',
- 'U': '𝖀',
- 'V': '𝖁',
- 'W': '𝖂',
- 'X': '𝖃',
- 'Y': '𝖄',
- 'Z': '𝖅'
- }
- for i, j in style.items():
- text = text.replace(i, j)
- return text
-
- def cloud(text):
- style = {
- 'a': 'a͜͡',
- 'b': 'b͜͡',
- 'c': 'c͜͡',
- 'd': 'd͜͡',
- 'e': 'e͜͡',
- 'f': 'f͜͡',
- 'g': 'g͜͡',
- 'h': 'h͜͡',
- 'i': 'i͜͡',
- 'j': 'j͜͡',
- 'k': 'k͜͡',
- 'l': 'l͜͡',
- 'm': 'm͜͡',
- 'n': 'n͜͡',
- 'o': 'o͜͡',
- 'p': 'p͜͡',
- 'q': 'q͜͡',
- 'r': 'r͜͡',
- 's': 's͜͡',
- 't': 't͜͡',
- 'u': 'u͜͡',
- 'v': 'v͜͡',
- 'w': 'w͜͡',
- 'x': 'x͜͡',
- 'y': 'y͜͡',
- 'z': 'z͜͡',
- 'A': 'A͜͡',
- 'B': 'B͜͡',
- 'C': 'C͜͡',
- 'D': 'D͜͡',
- 'E': 'E͜͡',
- 'F': 'F͜͡',
- 'G': 'G͜͡',
- 'H': 'H͜͡',
- 'I': 'I͜͡',
- 'J': 'J͜͡',
- 'K': 'K͜͡',
- 'L': 'L͜͡',
- 'M': 'M͜͡',
- 'N': 'N͜͡',
- 'O': 'O͜͡',
- 'P': 'P͜͡',
- 'Q': 'Q͜͡',
- 'R': 'R͜͡',
- 'S': 'S͜͡',
- 'T': 'T͜͡',
- 'U': 'U͜͡',
- 'V': 'V͜͡',
- 'W': 'W͜͡',
- 'X': 'X͜͡',
- 'Y': 'Y͜͡',
- 'Z': 'Z͜͡'
- }
- for i, j in style.items():
- text = text.replace(i, j)
- return text
-
-
-
diff --git a/plugins/helper_functions/get_file_id.py b/plugins/helper_functions/get_file_id.py
deleted file mode 100644
index 556575a..0000000
--- a/plugins/helper_functions/get_file_id.py
+++ /dev/null
@@ -1,25 +0,0 @@
-from pyrogram.types import Message
-from pyrogram.types.messages_and_media import message
-
-
-def get_file_id(msg: Message):
- if msg.media:
- for message_type in (
- "photo",
- "animation",
- "audio",
- "document",
- "video",
- "video_note",
- "voice",
- # "contact",
- # "dice",
- # "poll",
- # "location",
- # "venue",
- "sticker"
- ):
- obj = getattr(msg, message_type)
- if obj:
- setattr(obj, "message_type", message_type)
- return obj
diff --git a/plugins/helper_functions/last_online_hlpr.py b/plugins/helper_functions/last_online_hlpr.py
deleted file mode 100644
index 442843c..0000000
--- a/plugins/helper_functions/last_online_hlpr.py
+++ /dev/null
@@ -1,21 +0,0 @@
-from pyrogram.types import User
-from datetime import datetime
-
-
-def last_online(from_user: User) -> str:
- time = ""
- if from_user.is_bot:
- time += "🤖 Bot :("
- elif from_user.status == 'recently':
- time += "Recently"
- elif from_user.status == 'within_week':
- time += "Within the last week"
- elif from_user.status == 'within_month':
- time += "Within the last month"
- elif from_user.status == 'long_time_ago':
- time += "A long time ago :("
- elif from_user.status == 'online':
- time += "Currently Online"
- elif from_user.status == 'offline':
- time += datetime.fromtimestamp(from_user.last_online_date).strftime("%a, %d %b %Y, %H:%M:%S")
- return time
diff --git a/plugins/helper_functions/string_handling.py b/plugins/helper_functions/string_handling.py
deleted file mode 100644
index 46dbe8b..0000000
--- a/plugins/helper_functions/string_handling.py
+++ /dev/null
@@ -1,110 +0,0 @@
-import re
-import time
-from typing import List
-from pyrogram.types import Message, InlineKeyboardButton
-from info import COMMAND_HAND_LER
-
-
-# NOTE: the url \ escape may cause double escapes
-# match * (bold) (don't escape if in url)
-# match _ (italics) (don't escape if in url)
-# match ` (code)
-# match []() (markdown link)
-# else, escape *, _, `, and [
-MATCH_MD = re.compile(r'\*(.*?)\*|'
- r'_(.*?)_|'
- r'`(.*?)`|'
- r'(?[*_`\[])')
-
-# regex to find []() links -> hyperlinks/buttons
-LINK_REGEX = re.compile(r'(? (str, List):
- # offset = len(args[2]) - len(raw_text)
- # set correct offset relative to command + notename
- markdown_note = None
- if msg.media:
- if msg.caption:
- markdown_note = msg.caption.markdown
- else:
- markdown_note = msg.text.markdown
- note_data = ""
- buttons = []
- if markdown_note is None:
- return note_data, buttons
- #
- if markdown_note.startswith(COMMAND_HAND_LER):
- args = markdown_note.split(None, 2)
- # use python's maxsplit to separate cmd and args
- markdown_note = args[2]
- prev = 0
- for match in BTN_URL_REGEX.finditer(markdown_note):
- # Check if btnurl is escaped
- n_escapes = 0
- to_check = match.start(1) - 1
- while to_check > 0 and markdown_note[to_check] == "\\":
- n_escapes += 1
- to_check -= 1
-
- # if even, not escaped -> create button
- if n_escapes % 2 == 0:
- # create a thruple with button label, url, and newline status
- if bool(match.group(4)) and buttons:
- buttons[-1].append(InlineKeyboardButton(
- text=match.group(2),
- url=match.group(3)
- ))
- else:
- buttons.append([InlineKeyboardButton(
- text=match.group(2),
- url=match.group(3)
- )])
- note_data += markdown_note[prev:match.start(1)]
- prev = match.end(1)
- # if odd, escaped -> move along
- else:
- note_data += markdown_note[prev:to_check]
- prev = match.start(1) - 1
- else:
- note_data += markdown_note[prev:]
-
- return note_data, buttons
-
-
-def extract_time(time_val):
- if any(time_val.endswith(unit) for unit in ('s', 'm', 'h', 'd')):
- unit = time_val[-1]
- time_num = time_val[:-1] # type: str
- if not time_num.isdigit():
- return None
-
- if unit == 's':
- bantime = int(time.time() + int(time_num))
- elif unit == 'm':
- bantime = int(time.time() + int(time_num) * 60)
- elif unit == 'h':
- bantime = int(time.time() + int(time_num) * 60 * 60)
- elif unit == 'd':
- bantime = int(time.time() + int(time_num) * 24 * 60 * 60)
- else:
- # how even...?
- return None
- return bantime
- else:
- return None
-
-
-def format_welcome_caption(html_string, chat_member):
- return html_string.format(
- dc_id=chat_member.dc_id,
- first_name=chat_member.first_name,
- id=chat_member.id,
- last_name=chat_member.last_name,
- mention=chat_member.mention,
- username=chat_member.username
- )
From e43f71c2e6d4611f438a7189231f8573c127069c Mon Sep 17 00:00:00 2001
From: AFSAL <138692053+CyberTG@users.noreply.github.com>
Date: Sat, 16 Sep 2023 16:34:33 +0530
Subject: [PATCH 110/237] Delete plugins/helpers directory
---
plugins/helpers/arrow.py | 27 ------
plugins/helpers/country.py | 43 ---------
plugins/helpers/dice.py | 27 ------
plugins/helpers/fonts.py | 175 -----------------------------------
plugins/helpers/goal.py | 25 -----
plugins/helpers/list.py | 109 ----------------------
plugins/helpers/luck.py | 25 -----
plugins/helpers/ping.py | 32 -------
plugins/helpers/runs.py | 51 ----------
plugins/helpers/song.py | 158 -------------------------------
plugins/helpers/telegraph.py | 46 ---------
plugins/helpers/tts.py | 38 --------
12 files changed, 756 deletions(-)
delete mode 100644 plugins/helpers/arrow.py
delete mode 100644 plugins/helpers/country.py
delete mode 100644 plugins/helpers/dice.py
delete mode 100644 plugins/helpers/fonts.py
delete mode 100644 plugins/helpers/goal.py
delete mode 100644 plugins/helpers/list.py
delete mode 100644 plugins/helpers/luck.py
delete mode 100644 plugins/helpers/ping.py
delete mode 100644 plugins/helpers/runs.py
delete mode 100644 plugins/helpers/song.py
delete mode 100644 plugins/helpers/telegraph.py
delete mode 100644 plugins/helpers/tts.py
diff --git a/plugins/helpers/arrow.py b/plugins/helpers/arrow.py
deleted file mode 100644
index a000a49..0000000
--- a/plugins/helpers/arrow.py
+++ /dev/null
@@ -1,27 +0,0 @@
-# codes added by @lallu_tg
-# use with proper credits
-
-from pyrogram import Client, filters, enums
-from info import COMMAND_HAND_LER
-from plugins.helper_functions.cust_p_filters import f_onw_fliter
-
-# EMOJI CONSTANTS
-DART_E_MOJI = "🎯"
-# EMOJI CONSTANTS
-
-
-@Client.on_message(
- filters.command(["throw", "dart"], COMMAND_HAND_LER) &
- f_onw_fliter
-)
-async def throw_dart(client, message):
- """ /throw an @AnimatedDart """
- rep_mesg_id = message.id
- if message.reply_to_message:
- rep_mesg_id = message.reply_to_message.id
- await client.send_dice(
- chat_id=message.chat.id,
- emoji=DART_E_MOJI,
- disable_notification=True,
- reply_to_message_id=rep_mesg_id
- )
diff --git a/plugins/helpers/country.py b/plugins/helpers/country.py
deleted file mode 100644
index fbbda6b..0000000
--- a/plugins/helpers/country.py
+++ /dev/null
@@ -1,43 +0,0 @@
-from countryinfo import CountryInfo
-from pyrogram import filters, Client
-from pyrogram.types import InlineKeyboardMarkup, InlineKeyboardButton, CallbackQuery
-from Script import script
-
-@Client.on_message(filters.command(["country"]))
-async def country_info(bot, update):
- country = update.text.split(" ", 1)[1]
- country = CountryInfo(country)
- info = f"""𝖢𝗈𝗎𝗇𝗍𝗋𝗒 𝖨𝗇𝖿𝗈𝗋𝗆𝖺𝗍𝗂𝗈𝗇
-𝖭𝖺𝗆𝖾 : {country.name()}
-𝖭𝖺𝗍𝗂𝗏𝖾 𝖭𝖺𝗆𝖾 : {country.native_name()}
-𝖢𝖺𝗉𝗂𝗍𝖺𝗅 : {country.capital()}
-Population : {country.population()}
-𝖱𝖾𝗀𝗂𝗈𝗇 : {country.region()}
-𝖲𝗎𝖻 𝖱𝖾𝗀𝗂𝗈𝗇 : {country.subregion()}
-𝖳𝗈𝗉 𝖫𝖾𝗏𝖾𝗅 𝖣𝗈𝗆𝖺𝗂𝗇𝗌 : {country.tld()}
-𝖢𝖺𝗅𝗅𝗂𝗇𝗀 𝖢𝗈𝖽𝖾𝗌 : {country.calling_codes()}
-𝖢𝗎𝗋𝗋𝖾𝗇𝖼𝗂𝖾𝗌 : {country.currencies()}
-𝖱𝖾𝗌𝗂𝖽𝖾𝗇𝖼𝖾 : {country.demonym()}
-𝖳𝗂𝗆𝖾𝗓𝗈𝗇𝖾 : {country.timezones()}
-"""
- country_name = country.name()
- country_name = country_name.replace(" ", "+")
- buttons=[[
- InlineKeyboardButton("ᴡɪᴋɪᴘᴇᴅɪᴀ", url=f"{country.wiki()}"),
- InlineKeyboardButton("ɢᴏᴏɢʟᴇ", url=f"https://www.google.com/search?q={country_name}")
- ],[
- InlineKeyboardButton('ᴄʟᴏsᴇ', callback_data='close_data')
- ]]
- try:
- await update.reply_photo(
- photo="https://telegra.ph/file/834750cfadc32b359b40c.jpg",
- caption=info,
- reply_markup=InlineKeyboardMarkup(buttons),
- quote=True
- )
- except Exception as error:
- await update.reply_text(
- text=error,
- disable_web_page_preview=True,
- quote=True
- )
diff --git a/plugins/helpers/dice.py b/plugins/helpers/dice.py
deleted file mode 100644
index f77e172..0000000
--- a/plugins/helpers/dice.py
+++ /dev/null
@@ -1,27 +0,0 @@
-# codes added by @lallu_tg
-# use with proper credits
-
-from pyrogram import Client, filters, enums
-from info import COMMAND_HAND_LER
-from plugins.helper_functions.cust_p_filters import f_onw_fliter
-
-# EMOJI CONSTANTS
-DICE_E_MOJI = "🎲"
-# EMOJI CONSTANTS
-
-
-@Client.on_message(
- filters.command(["roll", "dice"], COMMAND_HAND_LER) &
- f_onw_fliter
-)
-async def roll_dice(client, message):
- """ @RollaDie """
- rep_mesg_id = message.id
- if message.reply_to_message:
- rep_mesg_id = message.reply_to_message.id
- await client.send_dice(
- chat_id=message.chat.id,
- emoji=DICE_E_MOJI,
- disable_notification=True,
- reply_to_message_id=rep_mesg_id
- )
diff --git a/plugins/helpers/fonts.py b/plugins/helpers/fonts.py
deleted file mode 100644
index 6899f3e..0000000
--- a/plugins/helpers/fonts.py
+++ /dev/null
@@ -1,175 +0,0 @@
-from pyrogram import Client, filters
-from pyrogram.types import InlineKeyboardButton, InlineKeyboardMarkup, CallbackQuery
-from plugins.helper_functions.fonts_func import Fonts
-
-
-@Client.on_message(filters.private & filters.command(["font"]))
-async def style_buttons(c, m, cb=False):
- buttons = [[
- InlineKeyboardButton('𝚃𝚢𝚙𝚎𝚠𝚛𝚒𝚝𝚎𝚛', callback_data='style+typewriter'),
- InlineKeyboardButton('𝕆𝕦𝕥𝕝𝕚𝕟𝕖', callback_data='style+outline'),
- InlineKeyboardButton('𝐒𝐞𝐫𝐢𝐟', callback_data='style+serif'),
- ],[
- InlineKeyboardButton('𝑺𝒆𝒓𝒊𝒇', callback_data='style+bold_cool'),
- InlineKeyboardButton('𝑆𝑒𝑟𝑖𝑓', callback_data='style+cool'),
- InlineKeyboardButton('Sᴍᴀʟʟ Cᴀᴘs', callback_data='style+small_cap'),
- ],[
- InlineKeyboardButton('𝓈𝒸𝓇𝒾𝓅𝓉', callback_data='style+script'),
- InlineKeyboardButton('𝓼𝓬𝓻𝓲𝓹𝓽', callback_data='style+script_bolt'),
- InlineKeyboardButton('ᵗⁱⁿʸ', callback_data='style+tiny'),
- ],[
- InlineKeyboardButton('ᑕOᗰIᑕ', callback_data='style+comic'),
- InlineKeyboardButton('𝗦𝗮𝗻𝘀', callback_data='style+sans'),
- InlineKeyboardButton('𝙎𝙖𝙣𝙨', callback_data='style+slant_sans'),
- ],[
- InlineKeyboardButton('𝘚𝘢𝘯𝘴', callback_data='style+slant'),
- InlineKeyboardButton('𝖲𝖺𝗇𝗌', callback_data='style+sim'),
- InlineKeyboardButton('Ⓒ︎Ⓘ︎Ⓡ︎Ⓒ︎Ⓛ︎Ⓔ︎Ⓢ︎', callback_data='style+circles')
- ],[
- InlineKeyboardButton('🅒︎🅘︎🅡︎🅒︎🅛︎🅔︎🅢︎', callback_data='style+circle_dark'),
- InlineKeyboardButton('𝔊𝔬𝔱𝔥𝔦𝔠', callback_data='style+gothic'),
- InlineKeyboardButton('𝕲𝖔𝖙𝖍𝖎𝖈', callback_data='style+gothic_bolt'),
- ],[
- InlineKeyboardButton('C͜͡l͜͡o͜͡u͜͡d͜͡s͜͡', callback_data='style+cloud'),
- InlineKeyboardButton('H̆̈ă̈p̆̈p̆̈y̆̈', callback_data='style+happy'),
- InlineKeyboardButton('S̑̈ȃ̈d̑̈', callback_data='style+sad'),
- ],[
- InlineKeyboardButton('Next ➡️', callback_data="nxt")
- ]]
- if not cb:
- if ' ' in m.text:
- title = m.text.split(" ", 1)[1]
- await m.reply_text(title, reply_markup=InlineKeyboardMarkup(buttons), reply_to_message_id=m.id)
- else:
- await m.reply_text(text="Enter Any Text Eg:- `/font [text]`")
- else:
- await m.answer()
- await m.message.edit_reply_markup(InlineKeyboardMarkup(buttons))
-
-
-@Client.on_callback_query(filters.regex('^nxt'))
-async def nxt(c, m):
- if m.data == "nxt":
- buttons = [[
- InlineKeyboardButton('🇸 🇵 🇪 🇨 🇮 🇦 🇱 ', callback_data='style+special'),
- InlineKeyboardButton('🅂🅀🅄🄰🅁🄴🅂', callback_data='style+squares'),
- InlineKeyboardButton('🆂︎🆀︎🆄︎🅰︎🆁︎🅴︎🆂︎', callback_data='style+squares_bold'),
- ],[
- InlineKeyboardButton('ꪖꪀᦔꪖꪶꪊᥴ𝓲ꪖ', callback_data='style+andalucia'),
- InlineKeyboardButton('爪卂几ᘜ卂', callback_data='style+manga'),
- InlineKeyboardButton('S̾t̾i̾n̾k̾y̾', callback_data='style+stinky'),
- ],[
- InlineKeyboardButton('B̥ͦu̥ͦb̥ͦb̥ͦl̥ͦe̥ͦs̥ͦ', callback_data='style+bubbles'),
- InlineKeyboardButton('U͟n͟d͟e͟r͟l͟i͟n͟e͟', callback_data='style+underline'),
- InlineKeyboardButton('꒒ꍏꀷꌩꌃꀎꁅ', callback_data='style+ladybug'),
- ],[
- InlineKeyboardButton('R҉a҉y҉s҉', callback_data='style+rays'),
- InlineKeyboardButton('B҈i҈r҈d҈s҈', callback_data='style+birds'),
- InlineKeyboardButton('S̸l̸a̸s̸h̸', callback_data='style+slash'),
- ],[
- InlineKeyboardButton('s⃠t⃠o⃠p⃠', callback_data='style+stop'),
- InlineKeyboardButton('S̺͆k̺͆y̺͆l̺͆i̺͆n̺͆e̺͆', callback_data='style+skyline'),
- InlineKeyboardButton('A͎r͎r͎o͎w͎s͎', callback_data='style+arrows'),
- ],[
- InlineKeyboardButton('ዪሀክቿነ', callback_data='style+qvnes'),
- InlineKeyboardButton('S̶t̶r̶i̶k̶e̶', callback_data='style+strike'),
- InlineKeyboardButton('F༙r༙o༙z༙e༙n༙', callback_data='style+frozen')
- ],[
- InlineKeyboardButton('⬅️ Back', callback_data='nxt+0'),
- InlineKeyboardButton('🔐 Close', callback_data='close_data')
- ]]
- await m.answer()
- await m.message.edit_reply_markup(InlineKeyboardMarkup(buttons))
- else:
- await style_buttons(c, m, cb=True)
-
-@Client.on_callback_query(filters.regex('^style'))
-async def style(c, m):
- await m.answer()
- cmd, style = m.data.split('+')
-
- if style == 'typewriter':
- cls = Fonts.typewriter
- if style == 'outline':
- cls = Fonts.outline
- if style == 'serif':
- cls = Fonts.serief
- if style == 'bold_cool':
- cls = Fonts.bold_cool
- if style == 'cool':
- cls = Fonts.cool
- if style == 'small_cap':
- cls = Fonts.smallcap
- if style == 'script':
- cls = Fonts.script
- if style == 'script_bolt':
- cls = Fonts.bold_script
- if style == 'tiny':
- cls = Fonts.tiny
- if style == 'comic':
- cls = Fonts.comic
- if style == 'sans':
- cls = Fonts.san
- if style == 'slant_sans':
- cls = Fonts.slant_san
- if style == 'slant':
- cls = Fonts.slant
- if style == 'sim':
- cls = Fonts.sim
- if style == 'circles':
- cls = Fonts.circles
- if style == 'circle_dark':
- cls = Fonts.dark_circle
- if style == 'gothic':
- cls = Fonts.gothic
- if style == 'gothic_bolt':
- cls = Fonts.bold_gothic
- if style == 'cloud':
- cls = Fonts.cloud
- if style == 'happy':
- cls = Fonts.happy
- if style == 'sad':
- cls = Fonts.sad
- if style == 'special':
- cls = Fonts.special
- if style == 'squares':
- cls = Fonts.square
- if style == 'squares_bold':
- cls = Fonts.dark_square
- if style == 'andalucia':
- cls = Fonts.andalucia
- if style == 'manga':
- cls = Fonts.manga
- if style == 'stinky':
- cls = Fonts.stinky
- if style == 'bubbles':
- cls = Fonts.bubbles
- if style == 'underline':
- cls = Fonts.underline
- if style == 'ladybug':
- cls = Fonts.ladybug
- if style == 'rays':
- cls = Fonts.rays
- if style == 'birds':
- cls = Fonts.birds
- if style == 'slash':
- cls = Fonts.slash
- if style == 'stop':
- cls = Fonts.stop
- if style == 'skyline':
- cls = Fonts.skyline
- if style == 'arrows':
- cls = Fonts.arrows
- if style == 'qvnes':
- cls = Fonts.rvnes
- if style == 'strike':
- cls = Fonts.strike
- if style == 'frozen':
- cls = Fonts.frozen
-
- r, oldtxt = m.message.reply_to_message.text.split(None, 1)
- new_text = cls(oldtxt)
- try:
- await m.message.edit_text(f"`{new_text}`\n\n👆 Click To Copy", reply_markup=m.message.reply_markup)
- except Exception as e:
- print(e)
diff --git a/plugins/helpers/goal.py b/plugins/helpers/goal.py
deleted file mode 100644
index 6a4df80..0000000
--- a/plugins/helpers/goal.py
+++ /dev/null
@@ -1,25 +0,0 @@
-
-from pyrogram import Client, filters, enums
-from info import COMMAND_HAND_LER
-from plugins.helper_functions.cust_p_filters import f_onw_fliter
-
-# EMOJI CONSTANTS
-GOAL_E_MOJI = "⚽"
-# EMOJI CONSTANTS
-
-
-@Client.on_message(
- filters.command(["goal", "shoot"], COMMAND_HAND_LER) &
- f_onw_fliter
-)
-async def roll_dice(client, message):
- """ @Goal """
- rep_mesg_id = message.id
- if message.reply_to_message:
- rep_mesg_id = message.reply_to_message.id
- await client.send_dice(
- chat_id=message.chat.id,
- emoji=GOAL_E_MOJI,
- disable_notification=True,
- reply_to_message_id=rep_mesg_id
- )
diff --git a/plugins/helpers/list.py b/plugins/helpers/list.py
deleted file mode 100644
index dbe15e0..0000000
--- a/plugins/helpers/list.py
+++ /dev/null
@@ -1,109 +0,0 @@
-list = {
-"afrikaans":"af",
-"albanian":"sq",
-"amharic":"am",
-"arabic":"ar",
-"armenian":"hy",
-"azerbaijani":"az",
-"basque":"eu",
-"belarusian":"be",
-"bengali":"bn",
-"bosnian":"bs",
-"bulgarian":"bg",
-"catalan":"ca",
-"cebuano":"ceb",
-"chinese": "zh",
-"corsican":"co",
-"croatian":"hr",
-"czech":"cs",
-"danish":"da",
-"dutch":"nl",
-"english":"en",
-"esperanto":"eo",
-"estonian":"et",
-"finnish":"fi",
-"french":"fr",
-"frisian":"fy",
-"galician":"gl",
-"georgian":"ka",
-"german":"de",
-"greek":"el",
-"gujarati":"gu",
-"haitian creole":"ht",
-"hausa":"ha",
-"hawaiian":"haw",
-"hebrew":"he",
-"hindi":"hi",
-"hmong":"hmn",
-"hungarian":"hu",
-"icelandic":"is",
-"igbo":"ig",
-"indonesian":"id",
-"irish":"ga",
-"italian":"it",
-"japanese":"ja",
-"javanese":"jv",
-"kannada":"kn",
-"kazakh":"kk",
-"khmer":"km",
-"kinyarwanda":"rw",
-"korean":"ko",
-"kurdish":"ku",
-"kyrgyz":"ky",
-"lao":"lo",
-"latin":"la",
-"latvian":"lv",
-"lithuanian":"lt",
-"luxembourgish":"lb",
-"macedonian":"mk",
-"malagasy":"mg",
-"malay":"ms",
-"malayalam":"ml",
-"maltese":"mt",
-"maori":"mi",
-"marathi":"mr",
-"mongolian":"mn",
-"myanmar":"my",
-"nepali":"ne",
-"norwegian":"no",
-"nyanja":"ny",
-"odia":"or",
-"pashto":"ps",
-"persian":"fa",
-"polish":"pl",
-"portuguese":"pt",
-"punjabi":"pa",
-"romanian":"ro",
-"russian":"ru",
-"samoan":"sm",
-"scots gaelic":"gd",
-"serbian":"sr",
-"sesotho":"st",
-"shona":"sn",
-"sindhi":"sd",
-"sinhala":"si",
-"slovak":"sk",
-"slovenian":"sl",
-"somali":"so",
-"spanish":"es",
-"sundanese":"su",
-"swahili":"sw",
-"swedish":"sv",
-"tagalog":"tl",
-"tajik":"tg",
-"tamil":"ta",
-"tatar":"tt",
-"telugu":"te",
-"thai":"th",
-"turkish":"tr",
-"turkmen":"tk",
-"ukrainian":"uk",
-"urdu":"ur",
-"uyghur":"ug",
-"uzbek":"uz",
-"vietnamese":"vi",
-"welsh":"cy",
-"xhosa":"xh",
-"yiddish":"yi",
-"yoruba":"yo",
-"zulu":"zu"}
diff --git a/plugins/helpers/luck.py b/plugins/helpers/luck.py
deleted file mode 100644
index a159aaa..0000000
--- a/plugins/helpers/luck.py
+++ /dev/null
@@ -1,25 +0,0 @@
-
-from pyrogram import Client, filters, enums
-from info import COMMAND_HAND_LER
-from plugins.helper_functions.cust_p_filters import f_onw_fliter
-
-# LUCK------------ https://telegram.me/Josprojects ------------ #
-
-# EMOJI CONSTANTS
-TRY_YOUR_LUCK = "🎰"
-# EMOJI CONSTANTS
-
-@Client.on_message(
- filters.command(["luck", "cownd"])
-)
-async def luck_cownd(client, message):
- """ /luck an @animatedluck """
- rep_mesg_id = message.id
- if message.reply_to_message:
- rep_mesg_id = message.reply_to_message.id
- await client.send_dice(
- chat_id=message.chat.id,
- emoji=TRY_YOUR_LUCK,
- disable_notification=True,
- reply_to_message_id=rep_mesg_id
- )
diff --git a/plugins/helpers/ping.py b/plugins/helpers/ping.py
deleted file mode 100644
index 60ba3ae..0000000
--- a/plugins/helpers/ping.py
+++ /dev/null
@@ -1,32 +0,0 @@
-"""Telegram Ping / Pong Speed
-Syntax: .ping"""
-
-import time
-import random
-from pyrogram import Client, filters
-from info import COMMAND_HAND_LER
-from plugins.helper_functions.cust_p_filters import f_onw_fliter
-
-# -- Constants -- #
-ALIVE = "ചത്തിട്ടില്ല മുത്തേ ഇവിടെ തന്നെ ഉണ്ട്.. നിനക്ക് ഇപ്പൊ എന്നോട് ഒരു സ്നേഹവും ഇല്ല. കൊള്ളാം.. നീ പാഴെ പോലെയേ അല്ല മാറിപോയി..😔 ഇടക്ക് എങ്കിലും ചുമ്മാ ഒന്ന് /start ചെയ്തു നോക്ക്..🙂"
-# -- Constants End -- #
-
-
-@Client.on_message(filters.command("alive", COMMAND_HAND_LER) & f_onw_fliter)
-async def check_alive(_, message):
- await message.reply_text(ALIVE)
-
-
-@Client.on_message(filters.command("ping", COMMAND_HAND_LER) & f_onw_fliter)
-async def ping(_, message):
- start_t = time.time()
- rm = await message.reply_text("...")
- end_t = time.time()
- time_taken_s = (end_t - start_t) * 1000
- await rm.edit(f"Pong!\n{time_taken_s:.3f} ms\n\n©CINEMALA.COM™")
-
-
-
-
-
-
diff --git a/plugins/helpers/runs.py b/plugins/helpers/runs.py
deleted file mode 100644
index 5b6e560..0000000
--- a/plugins/helpers/runs.py
+++ /dev/null
@@ -1,51 +0,0 @@
-import random
-from pyrogram import Client, filters, enums
-from info import COMMAND_HAND_LER
-from plugins.helper_functions.cust_p_filters import f_onw_fliter
-
-
-RUN_STRINGS = (
- "ഓ.. ധിക്കാരം... പഴേപോലെ തന്നെ....ഒരു മാറ്റോമില്ല.....ചുമ്മാതല്ല ഗതി പിടിക്കാത്തത്....!!!",
- "അള്ളാ... പിള്ളേരുടെ ഓരോ... പെഷനെ...",
- "എനിക്ക് എഴുതാൻ അല്ലെ അറിയൂ സാറേ.... വായിക്കാൻ അറിയില്ലല്ലോ....",
- "ഇന്ന് ഇനി നീ മിണ്ടരുത്... ഇന്നത്തെ കോട്ട കഴിഞ്ഞ്.....",
- "ചാരമാണെന്ന് കരുതി ചെകയാൻ നിൽക്കണ്ട കനൽ കെട്ടിട്ടില്ലെങ്കിൽ പൊള്ളും.",
- "ഒറ്റ ജീവിതമേ ഉള്ളു മനസിലാക്കിക്കോ, സ്വർഗ്ഗമില്ല നരകമില്ല, 'ഒറ്റ ജീവിതം', അത് എവിടെ എങ്ങനെ വേണമെന്ന് അവനവൻ തീരുമാനിക്കും",
- "വാട്ട് എ ബോംബെസ്റ്റിക് എക്സ്പ്ലോഷൻ! സച് എ ടെറിഫിക് ഡിസ്ക്ലോസ്!!",
- "ഗോ എവേ സ്ടുപ്പിഡ് ഇൻ ദി ഹൗസ് ഓഫ് മൈ വൈഫ് ആൻഡ് ഡോട്ടർ യൂവിൽ നോട്ട് സി എനി മിനിറ്റ് ഓഫ് ദി ടുഡേ... ഇറങ്ങി പോടാ..",
- "ഐ കാൻ ഡു ദാറ്റ് ഡു കാൻ ഐ ദാറ്റ്",
- "ക്രീം ബിസ്കറ്റിൽ ക്രീം ഉണ്ടന്ന് കരുതി ടൈഗർ ബിസ്കറ്റിൽ ടൈഗർ ഉണ്ടാകണമെന്നില്ല. പണി പാളും മോനെ...",
- "പട പേടിച്ചു പന്തളത്തു ചെന്നപ്പോ പന്തോം കുത്തി പട പന്തളത്തോട്ടെന്ന് പറഞ്ഞ പോലെ ആയല്ലോ.",
- "എന്റ കർത്താവെ.... എന്നെ നീ നല്ലവനാകാൻ സമ്മതിക്കൂല്ല അല്ലെ.",
- "കാർ എൻജിൻ ഔട്ട് കംപ്ലീറ്റ്ലി......",
- "തള്ളെ കലിപ്പ് തീരണില്ലല്ലോ!!",
- "പാതിരാത്രിക്ക് നിന്റെ അച്ഛൻ ഉണ്ടാക്കി വെച്ചിരിക്കുന്നോ പൊറോട്ടയും ചിക്കനും....",
- "ഓ പിന്നെ നീ ഒക്കെ പ്രേമിക്കുമ്പോൾ അത് പ്രണയം.... നമ്മൾ ഒക്കെ പ്രേമിക്കുമ്പോൾ അത് കമ്പി....",
- "ദൈവമേ എന്നെ മാത്രം രക്ഷിക്കണേ....",
- "അവളെ ഓർത്ത് കുടിച്ച കള്ളും നനഞ്ഞ മഴയും വേസ്റ്റ്....",
- "ഇത്രേം കാലം എവിടെ ആയിരുന്നു....!",
- "ഇൻഗ്ലീഷ് തീരെ പിടി ഇല്ല അല്ലെ....",
- "ആൾ ദി ഡ്രീംസ് ലൈക് ട്വിങ്കിൽ സ്റ്റാർസ്...",
- "എന്റെ പ്രാന്തൻ മുത്തപ്പാ അവനെ ഒരു വഴിയാക്കി തരണേ",
- "പെങ്ങളെ കെട്ടിയ സ്ത്രീധന തുക തരുമോ അളിയാ",
- "നീ വല്ലാതെ ക്ഷീണിച്ചു പൊയി",
- "കണ്ണിലെണ്ണയൊഴിച്ചു കാത്തിരിക്കുവായിരുന്നളിയാ.",
- "ചെല്ലാക്കണ്ടു എന്നിച്ചു പോടാ തടി.യാ .\
- ഷട്ട് ഉഒ യുവർ മൗത് ബ്ലഡി gramavasis.",
- "പോയി ചാവട .\
- നിന്നെ കൊണ്ട് ചാവാൻ patto.",
- "നിന്നെ കൊണ്ട് നാട്ടുകാർക്കും ഗുണോല്ല്യ വിട്ടുകാർക്കും ഗുണോല്ല്യ എന്തിനാ ഇങ്ങനെ നാണം കേട്ടു ജീവിക്കുന്നട പാട് വാഴെ ചെങ്കതളി വാഴ .",
-)
-
-
-@Client.on_message(
- filters.command("runs", COMMAND_HAND_LER) &
- f_onw_fliter
-)
-async def runs(_, message):
- """ /runs strings """
- effective_string = random.choice(RUN_STRINGS)
- if message.reply_to_message:
- await message.reply_to_message.reply_text(effective_string)
- else:
- await message.reply_text(effective_string)
diff --git a/plugins/helpers/song.py b/plugins/helpers/song.py
deleted file mode 100644
index f4a4504..0000000
--- a/plugins/helpers/song.py
+++ /dev/null
@@ -1,158 +0,0 @@
-from __future__ import unicode_literals
-
-import os
-import requests
-import aiohttp
-import yt_dlp
-import asyncio
-import math
-import time
-
-import wget
-import aiofiles
-
-from pyrogram import filters, Client, enums
-from pyrogram.errors import FloodWait, MessageNotModified
-from pyrogram.types import Message
-from youtube_search import YoutubeSearch
-from youtubesearchpython import SearchVideos
-from yt_dlp import YoutubeDL
-import youtube_dl
-import requests
-
-def time_to_seconds(time):
- stringt = str(time)
- return sum(int(x) * 60 ** i for i, x in enumerate(reversed(stringt.split(':'))))
-
-
-@Client.on_message(filters.command('song'))
-def song(client, message):
-
- user_id = message.from_user.id
- user_name = message.from_user.first_name
- rpk = "["+user_name+"](tg://user?id="+str(user_id)+")"
-
- query = ''
- for i in message.command[1:]:
- query += ' ' + str(i)
- print(query)
- m = message.reply("**ѕєαrchíng чσur ѕσng...!**")
- ydl_opts = {"format": "bestaudio[ext=m4a]"}
- try:
- results = YoutubeSearch(query, max_results=1).to_dict()
- link = f"https://youtube.com{results[0]['url_suffix']}"
- #print(results)
- title = results[0]["title"][:40]
- thumbnail = results[0]["thumbnails"][0]
- thumb_name = f'thumb{title}.jpg'
- thumb = requests.get(thumbnail, allow_redirects=True)
- open(thumb_name, 'wb').write(thumb.content)
-
-
- performer = f"[Elsa - 𝙲𝙸𝙽𝙴𝙼𝙰𝙻𝙰.𝙲𝙾𝙼™]"
- duration = results[0]["duration"]
- url_suffix = results[0]["url_suffix"]
- views = results[0]["views"]
-
- except Exception as e:
- m.edit(
- "**𝙵𝙾𝚄𝙽𝙳 𝙽𝙾𝚃𝙷𝙸𝙽𝙶 𝙿𝙻𝙴𝙰𝚂𝙴 𝙲𝙾𝚁𝚁𝙴𝙲𝚃 𝚃𝙷𝙴 𝚂𝙿𝙴𝙻𝙻𝙸𝙽𝙶 𝙾𝚁 𝚂𝙴𝙰𝚁𝙲𝙷 𝙰𝙽𝚈 𝙾𝚃𝙷𝙴𝚁 𝚂𝙾𝙽𝙶**"
- )
- print(str(e))
- return
- m.edit("**dσwnlσαdíng чσur ѕσng...!**")
- try:
- with yt_dlp.YoutubeDL(ydl_opts) as ydl:
- info_dict = ydl.extract_info(link, download=False)
- audio_file = ydl.prepare_filename(info_dict)
- ydl.process_info(info_dict)
- rep = '**𝚂𝚄𝙱𝚂𝙲𝚁𝙸𝙱𝙴 ›› [🍁 ᴄʜᴀɴɴᴇʟ 🍁](https://t.me/cinemala_com1)**\n**𝙿𝙾𝚆𝙴𝚁𝙴𝙳 𝙱𝚈 ›› [muѕíc вσч](https://t.me/CcommusicBot)**\n@𝙲𝙸𝙽𝙴𝙼𝙰𝙻𝙰.𝙲𝙾𝙼**'
- secmul, dur, dur_arr = 1, 0, duration.split(':')
- for i in range(len(dur_arr)-1, -1, -1):
- dur += (int(dur_arr[i]) * secmul)
- secmul *= 60
- message.reply_audio(audio_file, caption=rep, parse_mode=enums.ParseMode.MARKDOWN,quote=False, title=title, duration=dur, performer=performer, thumb=thumb_name)
- m.delete()
- except Exception as e:
- m.edit("**🚫 𝙴𝚁𝚁𝙾𝚁 🚫**")
- print(e)
-
- try:
- os.remove(audio_file)
- os.remove(thumb_name)
- except Exception as e:
- print(e)
-
-def get_text(message: Message) -> [None,str]:
- text_to_return = message.text
- if message.text is None:
- return None
- if " " not in text_to_return:
- return None
- try:
- return message.text.split(None, 1)[1]
- except IndexError:
- return None
-
-
-@Client.on_message(filters.command(["video", "mp4"]))
-async def vsong(client, message: Message):
- urlissed = get_text(message)
-
- pablo = await client.send_message(
- message.chat.id, f"**𝙵𝙸𝙽𝙳𝙸𝙽𝙶 𝚈𝙾𝚄𝚁 𝚅𝙸𝙳𝙴𝙾** `{urlissed}`"
- )
- if not urlissed:
- await pablo.edit("Invalid Command Syntax Please Check help Menu To Know More!")
- return
-
- search = SearchVideos(f"{urlissed}", offset=1, mode="dict", max_results=1)
- mi = search.result()
- mio = mi["search_result"]
- mo = mio[0]["link"]
- thum = mio[0]["title"]
- fridayz = mio[0]["id"]
- mio[0]["channel"]
- kekme = f"https://img.youtube.com/vi/{fridayz}/hqdefault.jpg"
- await asyncio.sleep(0.6)
- url = mo
- sedlyf = wget.download(kekme)
- opts = {
- "format": "best",
- "addmetadata": True,
- "key": "FFmpegMetadata",
- "prefer_ffmpeg": True,
- "geo_bypass": True,
- "nocheckcertificate": True,
- "postprocessors": [{"key": "FFmpegVideoConvertor", "preferedformat": "mp4"}],
- "outtmpl": "%(id)s.mp4",
- "logtostderr": False,
- "quiet": True,
- }
- try:
- with YoutubeDL(opts) as ytdl:
- ytdl_data = ytdl.extract_info(url, download=True)
- except Exception as e:
- await event.edit(event, f"**𝙳𝚘𝚠𝚗𝚕𝚘𝚊𝚍 𝙵𝚊𝚒𝚕𝚎𝚍 𝙿𝚕𝚎𝚊𝚜𝚎 𝚃𝚛𝚢 𝙰𝚐𝚊𝚒𝚗..♥️** \n**Error :** `{str(e)}`")
- return
- c_time = time.time()
- file_stark = f"{ytdl_data['id']}.mp4"
- capy = f"""
-**𝚃𝙸𝚃𝙻𝙴 :** [{thum}]({mo})
-**𝚁𝙴𝚀𝚄𝙴𝚂𝚃𝙴𝙳 𝙱𝚈 :** {message.from_user.mention}
-**@ᴄᴄᴏᴍ_ᴛᴇᴀᴍ**
-"""
- await client.send_video(
- message.chat.id,
- video=open(file_stark, "rb"),
- duration=int(ytdl_data["duration"]),
- file_name=str(ytdl_data["title"]),
- thumb=sedlyf,
- caption=capy,
- supports_streaming=True,
- reply_to_message_id=message.id
- )
- await pablo.delete()
- for files in (sedlyf, file_stark):
- if files and os.path.exists(files):
- os.remove(files)
diff --git a/plugins/helpers/telegraph.py b/plugins/helpers/telegraph.py
deleted file mode 100644
index a95a95b..0000000
--- a/plugins/helpers/telegraph.py
+++ /dev/null
@@ -1,46 +0,0 @@
-import os
-import shutil
-from pyrogram import Client, filters, enums
-from telegraph import upload_file
-from info import TMP_DOWNLOAD_DIRECTORY
-from plugins.helper_functions.cust_p_filters import f_onw_fliter
-from plugins.helper_functions.get_file_id import get_file_id
-
-
-@Client.on_message(
- filters.command("telegraph") &
- f_onw_fliter
-)
-async def telegraph(client, message):
- replied = message.reply_to_message
- if not replied:
- await message.reply_text("𝚁𝙴𝙿𝙻𝚈 𝚃𝙾 𝙰 𝙿𝙷𝙾𝚃𝙾 𝙾𝚁 𝚅𝙸𝙳𝙴𝙾 𝚄𝙽𝙳𝙴𝚁 𝟻𝙼𝙱.")
- return
- file_info = get_file_id(replied)
- if not file_info:
- await message.reply_text("Not supported!")
- return
- _t = os.path.join(
- TMP_DOWNLOAD_DIRECTORY,
- str(replied.id)
- )
- if not os.path.isdir(_t):
- os.makedirs(_t)
- _t += "/"
- download_location = await replied.download(
- _t
- )
- try:
- response = upload_file(download_location)
- except Exception as document:
- await message.reply_text(message, text=document)
- else:
- await message.reply(
- f"Link :- https://telegra.ph{response[0]}",
- disable_web_page_preview=True
- )
- finally:
- shutil.rmtree(
- _t,
- ignore_errors=True
- )
diff --git a/plugins/helpers/tts.py b/plugins/helpers/tts.py
deleted file mode 100644
index 76eeafe..0000000
--- a/plugins/helpers/tts.py
+++ /dev/null
@@ -1,38 +0,0 @@
-import traceback
-from asyncio import get_running_loop
-from io import BytesIO
-
-from googletrans import Translator
-from gtts import gTTS
-from pyrogram import Client, filters, enums
-from pyrogram.types import Message
-
-
-def convert(text):
- audio = BytesIO()
- i = Translator().translate(text, dest="en")
- lang = i.src
- tts = gTTS(text, lang=lang)
- audio.name = lang + ".mp3"
- tts.write_to_fp(audio)
- return audio
-
-
-@Client.on_message(filters.command("tts"))
-async def text_to_speech(_, message: Message):
- if not message.reply_to_message:
- return await message.reply_text("Reply to some text ffs.")
- if not message.reply_to_message.text:
- return await message.reply_text("Reply to some text ffs.")
- m = await message.reply_text("Processing")
- text = message.reply_to_message.text
- try:
- loop = get_running_loop()
- audio = await loop.run_in_executor(None, convert, text)
- await message.reply_audio(audio)
- await m.delete()
- audio.close()
- except Exception as e:
- await m.edit(e)
- e = traceback.format_exc()
- print(e)
From 170f97bd9ec3da6350a3d957dc0a48575b21713d Mon Sep 17 00:00:00 2001
From: AFSAL <138692053+CyberTG@users.noreply.github.com>
Date: Sat, 16 Sep 2023 16:34:43 +0530
Subject: [PATCH 111/237] Delete plugins/xtra_plugins directory
---
plugins/xtra_plugins/status.py | 95 ----------------------------------
1 file changed, 95 deletions(-)
delete mode 100644 plugins/xtra_plugins/status.py
diff --git a/plugins/xtra_plugins/status.py b/plugins/xtra_plugins/status.py
deleted file mode 100644
index 3c01df1..0000000
--- a/plugins/xtra_plugins/status.py
+++ /dev/null
@@ -1,95 +0,0 @@
-#Made By @Don_Sflix
-
-import os
-import math
-import time
-import heroku3
-import requests
-
-from pyrogram import Client, filters, enums
-from database.users_chats_db import db
-
-#=====================================================
-BOT_START_TIME = time.time()
-
-HEROKU_API_KEY = (os.environ.get("HEROKU_API_KEY", ""))
-#=====================================================
-
-@Client.on_message(filters.command('status'))
-async def bot_status(client,message):
- if HEROKU_API_KEY:
- try:
- server = heroku3.from_key(HEROKU_API_KEY)
-
- user_agent = (
- 'Mozilla/5.0 (Linux; Android 10; SM-G975F) '
- 'AppleWebKit/537.36 (KHTML, like Gecko) '
- 'Chrome/80.0.3987.149 Mobile Safari/537.36'
- )
- accountid = server.account().id
- headers = {
- 'User-Agent': user_agent,
- 'Authorization': f'Bearer {HEROKU_API_KEY}',
- 'Accept': 'application/vnd.heroku+json; version=3.account-quotas',
- }
-
- path = "/accounts/" + accountid + "/actions/get-quota"
-
- request = requests.get("https://api.heroku.com" + path, headers=headers)
-
- if request.status_code == 200:
- result = request.json()
-
- total_quota = result['account_quota']
- quota_used = result['quota_used']
-
- quota_left = total_quota - quota_used
-
- total = math.floor(total_quota/3600)
- used = math.floor(quota_used/3600)
- hours = math.floor(quota_left/3600)
- minutes = math.floor(quota_left/60 % 60)
- days = math.floor(hours/24)
-
- usedperc = math.floor(quota_used / total_quota * 100)
- leftperc = math.floor(quota_left / total_quota * 100)
-
- quota_details = f"""
-Heroku Account Status
-➪ 𝖸𝗈𝗎 𝗁𝖺𝗏𝖾 {total} 𝗁𝗈𝗎𝗋𝗌 𝗈𝖿 𝖿𝗋𝖾𝖾 𝖽𝗒𝗇𝗈 𝗊𝗎𝗈𝗍𝖺 𝖺𝗏𝖺𝗂𝗅𝖺𝖻𝗅𝖾 𝖾𝖺𝖼𝗁 𝗆𝗈𝗇𝗍𝗁.
-➪ 𝖣𝗒𝗇𝗈 𝗁𝗈𝗎𝗋𝗌 𝗎𝗌𝖾𝖽 𝗍𝗁𝗂𝗌 𝗆𝗈𝗇𝗍𝗁:
- • {used} 𝖧𝗈𝗎𝗋𝗌 ( {usedperc}% )
-➪ 𝖣𝗒𝗇𝗈 𝗁𝗈𝗎𝗋𝗌 𝗋𝖾𝗆𝖺𝗂𝗇𝗂𝗇𝗀 𝗍𝗁𝗂𝗌 𝗆𝗈𝗇𝗍𝗁:
- • {hours} 𝖧𝗈𝗎𝗋𝗌 ( {leftperc}% )
- • Approximately {days} days!"""
- else:
- quota_details = ""
- except:
- print("Check your Heroku API key")
- quota_details = ""
- else:
- quota_details = ""
-
- uptime = time.strftime("%Hh %Mm %Ss", time.gmtime(time.time() - BOT_START_TIME))
-
- try:
- t, u, f = shutil.disk_usage(".")
- total = humanbytes(t)
- used = humanbytes(u)
- free = humanbytes(f)
-
- disk = "\n**Disk Details**\n\n" \
- f"> USED : {used} / {total}\n" \
- f"> FREE : {free}\n\n"
- except:
- disk = ""
-
- await message.reply_text(
- "𝗖𝘂𝗿𝗿𝗲𝗻𝘁 𝘀𝘁𝗮𝘁𝘂𝘀 𝗼𝗳 𝘆𝗼𝘂𝗿 𝗕𝗼𝘁\n\n"
- "DB Status\n"
- f"➪ 𝖡𝗈𝗍 𝖴𝗉𝗍𝗂𝗆𝖾: {uptime}\n"
- f"{quota_details}"
- f"{disk}",
- quote=True,
- parse_mode=enums.ParseMode.MARKDOWN
- )
From f7fe21246adf6172b2905d87557de52fb5caf0b3 Mon Sep 17 00:00:00 2001
From: AFSAL <138692053+CyberTG@users.noreply.github.com>
Date: Sat, 16 Sep 2023 16:34:57 +0530
Subject: [PATCH 112/237] Delete plugins/banned.py
---
plugins/banned.py | 40 ----------------------------------------
1 file changed, 40 deletions(-)
delete mode 100644 plugins/banned.py
diff --git a/plugins/banned.py b/plugins/banned.py
deleted file mode 100644
index ec9c049..0000000
--- a/plugins/banned.py
+++ /dev/null
@@ -1,40 +0,0 @@
-from pyrogram import Client, filters
-from utils import temp
-from pyrogram.types import Message
-from database.users_chats_db import db
-from pyrogram.types import InlineKeyboardButton, InlineKeyboardMarkup
-from info import SUPPORT_CHAT
-
-async def banned_users(_, client, message: Message):
- return (
- message.from_user is not None or not message.sender_chat
- ) and message.from_user.id in temp.BANNED_USERS
-
-banned_user = filters.create(banned_users)
-
-async def disabled_chat(_, client, message: Message):
- return message.chat.id in temp.BANNED_CHATS
-
-disabled_group=filters.create(disabled_chat)
-
-
-@Client.on_message(filters.private & banned_user & filters.incoming)
-async def ban_reply(bot, message):
- ban = await db.get_ban_status(message.from_user.id)
- await message.reply(f'Sorry Dude, You are Banned to use Me. \nBan Reason: {ban["ban_reason"]}')
-
-@Client.on_message(filters.group & disabled_group & filters.incoming)
-async def grp_bd(bot, message):
- buttons = [[
- InlineKeyboardButton('Support', url=f'https://t.me/{SUPPORT_CHAT}')
- ]]
- reply_markup=InlineKeyboardMarkup(buttons)
- vazha = await db.get_chat(message.chat.id)
- k = await message.reply(
- text=f"CHAT NOT ALLOWED 🐞\n\nMy admins has restricted me from working here ! If you want to know more about it contact support..\nReason : {vazha['reason']}.",
- reply_markup=reply_markup)
- try:
- await k.pin()
- except:
- pass
- await bot.leave_chat(message.chat.id)
From d52b6077103493ce57b8c5448e613554f87f5d67 Mon Sep 17 00:00:00 2001
From: AFSAL <138692053+CyberTG@users.noreply.github.com>
Date: Sat, 16 Sep 2023 16:35:09 +0530
Subject: [PATCH 113/237] Delete plugins/broadcast.py
---
plugins/broadcast.py | 73 --------------------------------------------
1 file changed, 73 deletions(-)
delete mode 100644 plugins/broadcast.py
diff --git a/plugins/broadcast.py b/plugins/broadcast.py
deleted file mode 100644
index b885065..0000000
--- a/plugins/broadcast.py
+++ /dev/null
@@ -1,73 +0,0 @@
-from pyrogram import Client, filters
-import datetime
-import time
-from database.users_chats_db import db
-from info import ADMINS
-from utils import broadcast_messages
-import asyncio
-
-@Client.on_message(filters.command("broadcast") & filters.user(ADMINS) & filters.reply)
-# https://t.me/GetTGLink/4178
-async def verupikkals(bot, message):
- users = await db.get_all_users()
- b_msg = message.reply_to_message
- sts = await message.reply_text(
- text='Broadcasting your messages...'
- )
- start_time = time.time()
- total_users = await db.total_users_count()
- done = 0
- blocked = 0
- deleted = 0
- failed =0
-
- success = 0
- async for user in users:
- pti, sh = await broadcast_messages(int(user['id']), b_msg)
- if pti:
- success += 1
- elif pti == False:
- if sh == "Blocked":
- blocked+=1
- elif sh == "Deleted":
- deleted += 1
- elif sh == "Error":
- failed += 1
- done += 1
- await asyncio.sleep(2)
- if not done % 20:
- await sts.edit(f"Broadcast in progress:\n\nTotal Users {total_users}\nCompleted: {done} / {total_users}\nSuccess: {success}\nBlocked: {blocked}\nDeleted: {deleted}")
- time_taken = datetime.timedelta(seconds=int(time.time()-start_time))
- await sts.edit(f"Broadcast Completed:\nCompleted in {time_taken} seconds.\n\nTotal Users {total_users}\nCompleted: {done} / {total_users}\nSuccess: {success}\nBlocked: {blocked}\nDeleted: {deleted}")
-
-
-@Client.on_message(filters.command("grp_broadcast") & filters.user(ADMINS) & filters.reply)
-async def grp_brodcst(bot, message):
- chats = await db.get_all_chats()
- b_msg = message.reply_to_message
- sts = await message.reply_text(
- text='Broadcasting your messages...'
- )
- start_time = time.time()
- total_chats = await db.total_chat_count()
- done = 0
- failed =0
-
- success = 0
- async for chat in chats:
- pti, sh = await broadcast_messages(int(chat['id']), b_msg)
- if pti:
- success += 1
- elif pti == False:
- if sh == "Blocked":
- blocked+=1
- elif sh == "Deleted":
- deleted += 1
- elif sh == "Error":
- failed += 1
- done += 1
- await asyncio.sleep(2)
- if not done % 20:
- await sts.edit(f"Broadcast in progress:\n\nTotal Chats {total_chats}\nCompleted: {done} / {total_chats}\nSuccess: {success}\nFailed: {failed}")
- time_taken = datetime.timedelta(seconds=int(time.time()-start_time))
- await sts.edit(f"Broadcast Completed:\nCompleted in {time_taken} seconds.\n\nTotal Chats {total_chats}\nCompleted: {done} / {total_chats}\nSuccess: {success}\nFailed: {failed}")
From 6000324f483631202912d7f7543f14593bbc824c Mon Sep 17 00:00:00 2001
From: AFSAL <138692053+CyberTG@users.noreply.github.com>
Date: Sat, 16 Sep 2023 16:35:22 +0530
Subject: [PATCH 114/237] Delete plugins/channel.py
---
plugins/channel.py | 20 --------------------
1 file changed, 20 deletions(-)
delete mode 100644 plugins/channel.py
diff --git a/plugins/channel.py b/plugins/channel.py
deleted file mode 100644
index 7fc3ad7..0000000
--- a/plugins/channel.py
+++ /dev/null
@@ -1,20 +0,0 @@
-from pyrogram import Client, filters
-from info import CHANNELS
-from database.ia_filterdb import save_file
-
-media_filter = filters.document | filters.video | filters.audio
-
-
-@Client.on_message(filters.chat(CHANNELS) & media_filter)
-async def media(bot, message):
- """Media Handler"""
- for file_type in ("document", "video", "audio"):
- media = getattr(message, file_type, None)
- if media is not None:
- break
- else:
- return
-
- media.file_type = file_type
- media.caption = message.caption
- await save_file(media)
From ce42e6fb34aadde0ad168c279ed24ed795bcc8b0 Mon Sep 17 00:00:00 2001
From: AFSAL <138692053+CyberTG@users.noreply.github.com>
Date: Sat, 16 Sep 2023 16:35:35 +0530
Subject: [PATCH 115/237] Delete plugins/connection.py
---
plugins/connection.py | 147 ------------------------------------------
1 file changed, 147 deletions(-)
delete mode 100644 plugins/connection.py
diff --git a/plugins/connection.py b/plugins/connection.py
deleted file mode 100644
index 6011dd1..0000000
--- a/plugins/connection.py
+++ /dev/null
@@ -1,147 +0,0 @@
-from pyrogram import filters, Client, enums
-from pyrogram.types import InlineKeyboardButton, InlineKeyboardMarkup
-from database.connections_mdb import add_connection, all_connections, if_active, delete_connection
-from info import ADMINS
-import logging
-
-logger = logging.getLogger(__name__)
-logger.setLevel(logging.ERROR)
-
-
-@Client.on_message((filters.private | filters.group) & filters.command('connect'))
-async def addconnection(client, message):
- userid = message.from_user.id if message.from_user else None
- if not userid:
- return await message.reply(f"You are anonymous admin. Use /connect {message.chat.id} in PM")
- chat_type = message.chat.type
-
- if chat_type == enums.ChatType.PRIVATE:
- try:
- cmd, group_id = message.text.split(" ", 1)
- except:
- await message.reply_text(
- "Enter in correct format!\n\n"
- "/connect groupid\n\n"
- "Get your Group id by adding this bot to your group and use /id",
- quote=True
- )
- return
-
- elif chat_type in [enums.ChatType.GROUP, enums.ChatType.SUPERGROUP]:
- group_id = message.chat.id
-
- try:
- st = await client.get_chat_member(group_id, userid)
- if (
- st.status != enums.ChatMemberStatus.ADMINISTRATOR
- and st.status != enums.ChatMemberStatus.OWNER
- and userid not in ADMINS
- ):
- await message.reply_text("You should be an admin in Given group!", quote=True)
- return
- except Exception as e:
- logger.exception(e)
- await message.reply_text(
- "Invalid Group ID!\n\nIf correct, Make sure I'm present in your group!!",
- quote=True,
- )
-
- return
- try:
- st = await client.get_chat_member(group_id, "me")
- if st.status == enums.ChatMemberStatus.ADMINISTRATOR:
- ttl = await client.get_chat(group_id)
- title = ttl.title
-
- addcon = await add_connection(str(group_id), str(userid))
- if addcon:
- await message.reply_text(
- f"Successfully connected to **{title}**\nNow manage your group from my pm !",
- quote=True,
- parse_mode=enums.ParseMode.MARKDOWN
- )
- if chat_type in [enums.ChatType.GROUP, enums.ChatType.SUPERGROUP]:
- await client.send_message(
- userid,
- f"Connected to **{title}** !",
- parse_mode=enums.ParseMode.MARKDOWN
- )
- else:
- await message.reply_text(
- "You're already connected to this chat!",
- quote=True
- )
- else:
- await message.reply_text("Add me as an admin in group", quote=True)
- except Exception as e:
- logger.exception(e)
- await message.reply_text('Some error occurred! Try again later.', quote=True)
- return
-
-
-@Client.on_message((filters.private | filters.group) & filters.command('disconnect'))
-async def deleteconnection(client, message):
- userid = message.from_user.id if message.from_user else None
- if not userid:
- return await message.reply(f"You are anonymous admin. Use /connect {message.chat.id} in PM")
- chat_type = message.chat.type
-
- if chat_type == enums.ChatType.PRIVATE:
- await message.reply_text("Run /connections to view or disconnect from groups!", quote=True)
-
- elif chat_type in [enums.ChatType.GROUP, enums.ChatType.SUPERGROUP]:
- group_id = message.chat.id
-
- st = await client.get_chat_member(group_id, userid)
- if (
- st.status != enums.ChatMemberStatus.ADMINISTRATOR
- and st.status != enums.ChatMemberStatus.OWNER
- and str(userid) not in ADMINS
- ):
- return
-
- delcon = await delete_connection(str(userid), str(group_id))
- if delcon:
- await message.reply_text("Successfully disconnected from this chat", quote=True)
- else:
- await message.reply_text("This chat isn't connected to me!\nDo /connect to connect.", quote=True)
-
-
-@Client.on_message(filters.private & filters.command(["connections"]))
-async def connections(client, message):
- userid = message.from_user.id
-
- groupids = await all_connections(str(userid))
- if groupids is None:
- await message.reply_text(
- "There are no active connections!! Connect to some groups first.",
- quote=True
- )
- return
- buttons = []
- for groupid in groupids:
- try:
- ttl = await client.get_chat(int(groupid))
- title = ttl.title
- active = await if_active(str(userid), str(groupid))
- act = " - ACTIVE" if active else ""
- buttons.append(
- [
- InlineKeyboardButton(
- text=f"{title}{act}", callback_data=f"groupcb:{groupid}:{act}"
- )
- ]
- )
- except:
- pass
- if buttons:
- await message.reply_text(
- "Your connected group details ;\n\n",
- reply_markup=InlineKeyboardMarkup(buttons),
- quote=True
- )
- else:
- await message.reply_text(
- "There are no active connections!! Connect to some groups first.",
- quote=True
- )
From ba7f0248183c1c9eb835304f4bda3fdb8ad8f62e Mon Sep 17 00:00:00 2001
From: AFSAL <138692053+CyberTG@users.noreply.github.com>
Date: Sat, 16 Sep 2023 16:35:46 +0530
Subject: [PATCH 116/237] Delete plugins/delete_files.py
---
plugins/delete_files.py | 50 -----------------------------------------
1 file changed, 50 deletions(-)
delete mode 100644 plugins/delete_files.py
diff --git a/plugins/delete_files.py b/plugins/delete_files.py
deleted file mode 100644
index dda816f..0000000
--- a/plugins/delete_files.py
+++ /dev/null
@@ -1,50 +0,0 @@
-#https://github.com/Joelkb/DQ-the-file-donor
-
-import re
-import logging
-from pyrogram import Client, filters
-from info import DELETE_CHANNELS
-from database.ia_filterdb import Media, unpack_new_file_id
-
-logger = logging.getLogger(__name__)
-
-media_filter = filters.document | filters.video | filters.audio
-
-
-@Client.on_message(filters.chat(DELETE_CHANNELS) & media_filter)
-async def deletemultiplemedia(bot, message):
- """Delete Multiple files from database"""
-
- for file_type in ("document", "video", "audio"):
- media = getattr(message, file_type, None)
- if media is not None:
- break
- else:
- return
-
- file_id, file_ref = unpack_new_file_id(media.file_id)
-
- result = await Media.collection.delete_one({
- '_id': file_id,
- })
- if result.deleted_count:
- logger.info('File is successfully deleted from database.')
- else:
- file_name = re.sub(r"(_|\-|\.|\+)", " ", str(media.file_name))
- result = await Media.collection.delete_many({
- 'file_name': file_name,
- 'file_size': media.file_size,
- 'mime_type': media.mime_type
- })
- if result.deleted_count:
- logger.info('File is successfully deleted from database.')
- else:
- result = await Media.collection.delete_many({
- 'file_name': media.file_name,
- 'file_size': media.file_size,
- 'mime_type': media.mime_type
- })
- if result.deleted_count:
- logger.info('File is successfully deleted from database.')
- else:
- logger.info('File not found in database.')
From f183e47260afe3253b6cbb7d7054dbe2050f3ee6 Mon Sep 17 00:00:00 2001
From: AFSAL <138692053+CyberTG@users.noreply.github.com>
Date: Sat, 16 Sep 2023 16:35:59 +0530
Subject: [PATCH 117/237] Delete plugins/filters.py
---
plugins/filters.py | 272 ---------------------------------------------
1 file changed, 272 deletions(-)
delete mode 100644 plugins/filters.py
diff --git a/plugins/filters.py b/plugins/filters.py
deleted file mode 100644
index ae0eaaa..0000000
--- a/plugins/filters.py
+++ /dev/null
@@ -1,272 +0,0 @@
-import io
-from pyrogram import filters, Client, enums
-from pyrogram.types import InlineKeyboardButton, InlineKeyboardMarkup
-from database.filters_mdb import(
- add_filter,
- get_filters,
- delete_filter,
- count_filters
-)
-
-from database.connections_mdb import active_connection
-from utils import get_file_id, parser, split_quotes
-from info import ADMINS
-
-
-@Client.on_message(filters.command(['filter', 'add']) & filters.incoming)
-async def addfilter(client, message):
- userid = message.from_user.id if message.from_user else None
- if not userid:
- return await message.reply(f"You are anonymous admin. Use /connect {message.chat.id} in PM")
- chat_type = message.chat.type
- args = message.text.html.split(None, 1)
-
- if chat_type == enums.ChatType.PRIVATE:
- grpid = await active_connection(str(userid))
- if grpid is not None:
- grp_id = grpid
- try:
- chat = await client.get_chat(grpid)
- title = chat.title
- except:
- await message.reply_text("Make sure I'm present in your group!!", quote=True)
- return
- else:
- await message.reply_text("I'm not connected to any groups!", quote=True)
- return
-
- elif chat_type in [enums.ChatType.GROUP, enums.ChatType.SUPERGROUP]:
- grp_id = message.chat.id
- title = message.chat.title
-
- else:
- return
-
- st = await client.get_chat_member(grp_id, userid)
- if (
- st.status != enums.ChatMemberStatus.ADMINISTRATOR
- and st.status != enums.ChatMemberStatus.OWNER
- and str(userid) not in ADMINS
- ):
- return
-
-
- if len(args) < 2:
- await message.reply_text("Command Incomplete :(", quote=True)
- return
-
- extracted = split_quotes(args[1])
- text = extracted[0].lower()
-
- if not message.reply_to_message and len(extracted) < 2:
- await message.reply_text("Add some content to save your filter!", quote=True)
- return
-
- if (len(extracted) >= 2) and not message.reply_to_message:
- reply_text, btn, alert = parser(extracted[1], text)
- fileid = None
- if not reply_text:
- await message.reply_text("You cannot have buttons alone, give some text to go with it!", quote=True)
- return
-
- elif message.reply_to_message and message.reply_to_message.reply_markup:
- try:
- rm = message.reply_to_message.reply_markup
- btn = rm.inline_keyboard
- msg = get_file_id(message.reply_to_message)
- if msg:
- fileid = msg.file_id
- reply_text = message.reply_to_message.caption.html
- else:
- reply_text = message.reply_to_message.text.html
- fileid = None
- alert = None
- except:
- reply_text = ""
- btn = "[]"
- fileid = None
- alert = None
-
- elif message.reply_to_message and message.reply_to_message.media:
- try:
- msg = get_file_id(message.reply_to_message)
- fileid = msg.file_id if msg else None
- reply_text, btn, alert = parser(extracted[1], text) if message.reply_to_message.sticker else parser(message.reply_to_message.caption.html, text)
- except:
- reply_text = ""
- btn = "[]"
- alert = None
- elif message.reply_to_message and message.reply_to_message.text:
- try:
- fileid = None
- reply_text, btn, alert = parser(message.reply_to_message.text.html, text)
- except:
- reply_text = ""
- btn = "[]"
- alert = None
- else:
- return
-
- await add_filter(grp_id, text, reply_text, btn, fileid, alert)
-
- await message.reply_text(
- f"Filter for `{text}` added in **{title}**",
- quote=True,
- parse_mode=enums.ParseMode.MARKDOWN
- )
-
-
-@Client.on_message(filters.command(['viewfilters', 'filters']) & filters.incoming)
-async def get_all(client, message):
-
- chat_type = message.chat.type
- userid = message.from_user.id if message.from_user else None
- if not userid:
- return await message.reply(f"You are anonymous admin. Use /connect {message.chat.id} in PM")
- if chat_type == enums.ChatType.PRIVATE:
- grpid = await active_connection(str(userid))
- if grpid is not None:
- grp_id = grpid
- try:
- chat = await client.get_chat(grpid)
- title = chat.title
- except:
- await message.reply_text("Make sure I'm present in your group!!", quote=True)
- return
- else:
- await message.reply_text("I'm not connected to any groups!", quote=True)
- return
-
- elif chat_type in [enums.ChatType.GROUP, enums.ChatType.SUPERGROUP]:
- grp_id = message.chat.id
- title = message.chat.title
-
- else:
- return
-
- st = await client.get_chat_member(grp_id, userid)
- if (
- st.status != enums.ChatMemberStatus.ADMINISTRATOR
- and st.status != enums.ChatMemberStatus.OWNER
- and str(userid) not in ADMINS
- ):
- return
-
- texts = await get_filters(grp_id)
- count = await count_filters(grp_id)
- if count:
- filterlist = f"Total number of filters in **{title}** : {count}\n\n"
-
- for text in texts:
- keywords = " × `{}`\n".format(text)
-
- filterlist += keywords
-
- if len(filterlist) > 4096:
- with io.BytesIO(str.encode(filterlist.replace("`", ""))) as keyword_file:
- keyword_file.name = "keywords.txt"
- await message.reply_document(
- document=keyword_file,
- quote=True
- )
- return
- else:
- filterlist = f"There are no active filters in **{title}**"
-
- await message.reply_text(
- text=filterlist,
- quote=True,
- parse_mode=enums.ParseMode.MARKDOWN
- )
-
-@Client.on_message(filters.command('del') & filters.incoming)
-async def deletefilter(client, message):
- userid = message.from_user.id if message.from_user else None
- if not userid:
- return await message.reply(f"You are anonymous admin. Use /connect {message.chat.id} in PM")
- chat_type = message.chat.type
-
- if chat_type == enums.ChatType.PRIVATE:
- grpid = await active_connection(str(userid))
- if grpid is not None:
- grp_id = grpid
- try:
- chat = await client.get_chat(grpid)
- title = chat.title
- except:
- await message.reply_text("Make sure I'm present in your group!!", quote=True)
- return
- else:
- await message.reply_text("I'm not connected to any groups!", quote=True)
- return
-
- elif chat_type in [enums.ChatType.GROUP, enums.ChatType.SUPERGROUP]:
- grp_id = message.chat.id
- title = message.chat.title
-
- else:
- return
-
- st = await client.get_chat_member(grp_id, userid)
- if (
- st.status != enums.ChatMemberStatus.ADMINISTRATOR
- and st.status != enums.ChatMemberStatus.OWNER
- and str(userid) not in ADMINS
- ):
- return
-
- try:
- cmd, text = message.text.split(" ", 1)
- except:
- await message.reply_text(
- "Mention the filtername which you wanna delete!\n\n"
- "/del filtername\n\n"
- "Use /viewfilters to view all available filters",
- quote=True
- )
- return
-
- query = text.lower()
-
- await delete_filter(message, query, grp_id)
-
-
-@Client.on_message(filters.command('delall') & filters.incoming)
-async def delallconfirm(client, message):
- userid = message.from_user.id if message.from_user else None
- if not userid:
- return await message.reply(f"You are anonymous admin. Use /connect {message.chat.id} in PM")
- chat_type = message.chat.type
-
- if chat_type == enums.ChatType.PRIVATE:
- grpid = await active_connection(str(userid))
- if grpid is not None:
- grp_id = grpid
- try:
- chat = await client.get_chat(grpid)
- title = chat.title
- except:
- await message.reply_text("Make sure I'm present in your group!!", quote=True)
- return
- else:
- await message.reply_text("I'm not connected to any groups!", quote=True)
- return
-
- elif chat_type in [enums.ChatType.GROUP, enums.ChatType.SUPERGROUP]:
- grp_id = message.chat.id
- title = message.chat.title
-
- else:
- return
-
-
- st = await client.get_chat_member(grp_id, userid)
- if (st.status == enums.ChatMemberStatus.OWNER) or (str(userid) in ADMINS):
- await message.reply_text(
- f"This will delete all filters from '{title}'.\nDo you want to continue??",
- reply_markup=InlineKeyboardMarkup([
- [InlineKeyboardButton(text="YES",callback_data="delallconfirm")],
- [InlineKeyboardButton(text="CANCEL",callback_data="delallcancel")]
- ]),
- quote=True
- )
From c730c130ca2bd7c447b6718f34479073c5765e5d Mon Sep 17 00:00:00 2001
From: AFSAL <138692053+CyberTG@users.noreply.github.com>
Date: Sat, 16 Sep 2023 16:36:12 +0530
Subject: [PATCH 118/237] Delete plugins/genlink.py
---
plugins/genlink.py | 125 ---------------------------------------------
1 file changed, 125 deletions(-)
delete mode 100644 plugins/genlink.py
diff --git a/plugins/genlink.py b/plugins/genlink.py
deleted file mode 100644
index 4d9c7dd..0000000
--- a/plugins/genlink.py
+++ /dev/null
@@ -1,125 +0,0 @@
-import re
-from pyrogram import filters, Client, enums
-from pyrogram.errors.exceptions.bad_request_400 import ChannelInvalid, UsernameInvalid, UsernameNotModified
-from info import ADMINS, LOG_CHANNEL, FILE_STORE_CHANNEL, PUBLIC_FILE_STORE
-from database.ia_filterdb import unpack_new_file_id
-from utils import temp
-import re
-import os
-import json
-import base64
-import logging
-
-logger = logging.getLogger(__name__)
-logger.setLevel(logging.INFO)
-
-async def allowed(_, __, message):
- if PUBLIC_FILE_STORE:
- return True
- if message.from_user and message.from_user.id in ADMINS:
- return True
- return False
-
-@Client.on_message(filters.command(['link', 'plink']) & filters.create(allowed))
-async def gen_link_s(bot, message):
- replied = message.reply_to_message
- if not replied:
- return await message.reply('Reply to a message to get a shareable link.')
- file_type = replied.media
- if file_type not in [enums.MessageMediaType.VIDEO, enums.MessageMediaType.AUDIO, enums.MessageMediaType.DOCUMENT]:
- return await message.reply("Reply to a supported media")
- if message.has_protected_content and message.chat.id not in ADMINS:
- return await message.reply("okDa")
- file_id, ref = unpack_new_file_id((getattr(replied, file_type.value)).file_id)
- string = 'filep_' if message.text.lower().strip() == "/plink" else 'file_'
- string += file_id
- outstr = base64.urlsafe_b64encode(string.encode("ascii")).decode().strip("=")
- await message.reply(f"Here is your Link:\nhttps://t.me/{temp.U_NAME}?start={outstr}")
-
-
-@Client.on_message(filters.command(['batch', 'pbatch']) & filters.create(allowed))
-async def gen_link_batch(bot, message):
- if " " not in message.text:
- return await message.reply("Use correct format.\nExample /batch https://t.me/cinemala_com1/10 https://t.me/cinemala_com1/20.")
- links = message.text.strip().split(" ")
- if len(links) != 3:
- return await message.reply("Use correct format.\nExample /batch https://t.me/cinemala_com1/10 https://t.me/cinemala_com1/20.")
- cmd, first, last = links
- regex = re.compile("(https://)?(t\.me/|telegram\.me/|telegram\.dog/)(c/)?(\d+|[a-zA-Z_0-9]+)/(\d+)$")
- match = regex.match(first)
- if not match:
- return await message.reply('Invalid link')
- f_chat_id = match.group(4)
- f_msg_id = int(match.group(5))
- if f_chat_id.isnumeric():
- f_chat_id = int(("-100" + f_chat_id))
-
- match = regex.match(last)
- if not match:
- return await message.reply('Invalid link')
- l_chat_id = match.group(4)
- l_msg_id = int(match.group(5))
- if l_chat_id.isnumeric():
- l_chat_id = int(("-100" + l_chat_id))
-
- if f_chat_id != l_chat_id:
- return await message.reply("Chat ids not matched.")
- try:
- chat_id = (await bot.get_chat(f_chat_id)).id
- except ChannelInvalid:
- return await message.reply('This may be a private channel / group. Make me an admin over there to index the files.')
- except (UsernameInvalid, UsernameNotModified):
- return await message.reply('Invalid Link specified.')
- except Exception as e:
- return await message.reply(f'Errors - {e}')
-
- sts = await message.reply("Generating link for your message.\nThis may take time depending upon number of messages")
- if chat_id in FILE_STORE_CHANNEL:
- string = f"{f_msg_id}_{l_msg_id}_{chat_id}_{cmd.lower().strip()}"
- b_64 = base64.urlsafe_b64encode(string.encode("ascii")).decode().strip("=")
- return await sts.edit(f"Here is your link https://t.me/{temp.U_NAME}?start=DSTORE-{b_64}")
-
- FRMT = "Generating Link...\nTotal Messages: `{total}`\nDone: `{current}`\nRemaining: `{rem}`\nStatus: `{sts}`"
-
- outlist = []
-
- # file store without db channel
- og_msg = 0
- tot = 0
- async for msg in bot.iter_messages(f_chat_id, l_msg_id, f_msg_id):
- tot += 1
- if msg.empty or msg.service:
- continue
- if not msg.media:
- # only media messages supported.
- continue
- try:
- file_type = msg.media
- file = getattr(msg, file_type.value)
- caption = getattr(msg, 'caption', '')
- if caption:
- caption = caption.html
- if file:
- file = {
- "file_id": file.file_id,
- "caption": caption,
- "title": getattr(file, "file_name", ""),
- "size": file.file_size,
- "protect": cmd.lower().strip() == "/pbatch",
- }
-
- og_msg +=1
- outlist.append(file)
- except:
- pass
- if not og_msg % 20:
- try:
- await sts.edit(FRMT.format(total=l_msg_id-f_msg_id, current=tot, rem=((l_msg_id-f_msg_id) - tot), sts="Saving Messages"))
- except:
- pass
- with open(f"batchmode_{message.from_user.id}.json", "w+") as out:
- json.dump(outlist, out)
- post = await bot.send_document(LOG_CHANNEL, f"batchmode_{message.from_user.id}.json", file_name="Batch.json", caption="⚠️Generated for filestore.")
- os.remove(f"batchmode_{message.from_user.id}.json")
- file_id, ref = unpack_new_file_id(post.document.file_id)
- await sts.edit(f"Here is your link\nContains `{og_msg}` files.\n https://t.me/{temp.U_NAME}?start=BATCH-{file_id}")
From 59d3397591084b468737af65430787368770df64 Mon Sep 17 00:00:00 2001
From: AFSAL <138692053+CyberTG@users.noreply.github.com>
Date: Sat, 16 Sep 2023 16:36:24 +0530
Subject: [PATCH 119/237] Delete plugins/global_filter.py
---
plugins/global_filter.py | 148 ---------------------------------------
1 file changed, 148 deletions(-)
delete mode 100644 plugins/global_filter.py
diff --git a/plugins/global_filter.py b/plugins/global_filter.py
deleted file mode 100644
index 11a5337..0000000
--- a/plugins/global_filter.py
+++ /dev/null
@@ -1,148 +0,0 @@
-import io
-from pyrogram import filters, Client, enums
-from pyrogram.types import InlineKeyboardButton, InlineKeyboardMarkup
-from database.gfilters_mdb import(
- add_gfilter,
- get_gfilters,
- delete_gfilter,
- count_gfilters,
- del_allg
-)
-
-from database.connections_mdb import active_connection
-from utils import get_file_id, gfilterparser, split_quotes
-from info import ADMINS
-
-
-@Client.on_message(filters.command(['gfilter', 'addg']) & filters.incoming & filters.user(ADMINS))
-async def addgfilter(client, message):
- args = message.text.html.split(None, 1)
-
- if len(args) < 2:
- await message.reply_text("Command Incomplete :(", quote=True)
- return
-
- extracted = split_quotes(args[1])
- text = extracted[0].lower()
-
- if not message.reply_to_message and len(extracted) < 2:
- await message.reply_text("Add some content to save your filter!", quote=True)
- return
-
- if (len(extracted) >= 2) and not message.reply_to_message:
- reply_text, btn, alert = gfilterparser(extracted[1], text)
- fileid = None
- if not reply_text:
- await message.reply_text("You cannot have buttons alone, give some text to go with it!", quote=True)
- return
-
- elif message.reply_to_message and message.reply_to_message.reply_markup:
- try:
- rm = message.reply_to_message.reply_markup
- btn = rm.inline_keyboard
- msg = get_file_id(message.reply_to_message)
- if msg:
- fileid = msg.file_id
- reply_text = message.reply_to_message.caption.html
- else:
- reply_text = message.reply_to_message.text.html
- fileid = None
- alert = None
- except:
- reply_text = ""
- btn = "[]"
- fileid = None
- alert = None
-
- elif message.reply_to_message and message.reply_to_message.media:
- try:
- msg = get_file_id(message.reply_to_message)
- fileid = msg.file_id if msg else None
- reply_text, btn, alert = gfilterparser(extracted[1], text) if message.reply_to_message.sticker else gfilterparser(message.reply_to_message.caption.html, text)
- except:
- reply_text = ""
- btn = "[]"
- alert = None
- elif message.reply_to_message and message.reply_to_message.text:
- try:
- fileid = None
- reply_text, btn, alert = gfilterparser(message.reply_to_message.text.html, text)
- except:
- reply_text = ""
- btn = "[]"
- alert = None
- else:
- return
-
- await add_gfilter('gfilters', text, reply_text, btn, fileid, alert)
-
- await message.reply_text(
- f"GFilter for `{text}` added",
- quote=True,
- parse_mode=enums.ParseMode.MARKDOWN
- )
-
-
-@Client.on_message(filters.command(['viewgfilters', 'gfilters']) & filters.incoming & filters.user(ADMINS))
-async def get_all_gfilters(client, message):
- texts = await get_gfilters('gfilters')
- count = await count_gfilters('gfilters')
- if count:
- gfilterlist = f"Total number of gfilters : {count}\n\n"
-
- for text in texts:
- keywords = " × `{}`\n".format(text)
-
- gfilterlist += keywords
-
- if len(gfilterlist) > 4096:
- with io.BytesIO(str.encode(gfilterlist.replace("`", ""))) as keyword_file:
- keyword_file.name = "keywords.txt"
- await message.reply_document(
- document=keyword_file,
- quote=True
- )
- return
- else:
- gfilterlist = f"There are no active gfilters."
-
- await message.reply_text(
- text=gfilterlist,
- quote=True,
- parse_mode=enums.ParseMode.MARKDOWN
- )
-
-@Client.on_message(filters.command('delg') & filters.incoming & filters.user(ADMINS))
-async def deletegfilter(client, message):
- try:
- cmd, text = message.text.split(" ", 1)
- except:
- await message.reply_text(
- "Mention the gfiltername which you wanna delete!\n\n"
- "/delg gfiltername\n\n"
- "Use /viewgfilters to view all available gfilters",
- quote=True
- )
- return
-
- query = text.lower()
-
- await delete_gfilter(message, query, 'gfilters')
-
-
-@Client.on_message(filters.command('delallg') & filters.user(ADMINS))
-async def delallgfill(client, message):
- await message.reply_text(
- f"Do you want to continue??",
- reply_markup=InlineKeyboardMarkup([
- [InlineKeyboardButton(text="YES",callback_data="gconforme")],
- [InlineKeyboardButton(text="CANCEL",callback_data="close_data")]
- ]),
- quote=True
- )
-
-
-@Client.on_callback_query(filters.regex("gconforme"))
-async def dellacbd(client, message):
- await del_allg(message.message, 'gfilters')
- return await message.reply("👍 Done")
From f1af84f9c855a9503a46eca045f695eda4858ba7 Mon Sep 17 00:00:00 2001
From: AFSAL <138692053+CyberTG@users.noreply.github.com>
Date: Sat, 16 Sep 2023 16:36:36 +0530
Subject: [PATCH 120/237] Delete plugins/index.py
---
plugins/index.py | 185 -----------------------------------------------
1 file changed, 185 deletions(-)
delete mode 100644 plugins/index.py
diff --git a/plugins/index.py b/plugins/index.py
deleted file mode 100644
index df5cf10..0000000
--- a/plugins/index.py
+++ /dev/null
@@ -1,185 +0,0 @@
-import logging
-import asyncio
-from pyrogram import Client, filters, enums
-from pyrogram.errors import FloodWait
-from pyrogram.errors.exceptions.bad_request_400 import ChannelInvalid, ChatAdminRequired, UsernameInvalid, UsernameNotModified
-from info import ADMINS
-from info import INDEX_REQ_CHANNEL as LOG_CHANNEL
-from database.ia_filterdb import save_file
-from pyrogram.types import InlineKeyboardMarkup, InlineKeyboardButton
-from utils import temp
-import re
-logger = logging.getLogger(__name__)
-logger.setLevel(logging.INFO)
-lock = asyncio.Lock()
-
-
-@Client.on_callback_query(filters.regex(r'^index'))
-async def index_files(bot, query):
- if query.data.startswith('index_cancel'):
- temp.CANCEL = True
- return await query.answer("Cancelling Indexing")
- _, raju, chat, lst_msg_id, from_user = query.data.split("#")
- if raju == 'reject':
- await query.message.delete()
- await bot.send_message(int(from_user),
- f'Your Submission for indexing {chat} has been decliened by our moderators.',
- reply_to_message_id=int(lst_msg_id))
- return
-
- if lock.locked():
- return await query.answer('Wait until previous process complete.', show_alert=True)
- msg = query.message
-
- await query.answer('Processing...⏳', show_alert=True)
- if int(from_user) not in ADMINS:
- await bot.send_message(int(from_user),
- f'Your Submission for indexing {chat} has been accepted by our moderators and will be added soon.',
- reply_to_message_id=int(lst_msg_id))
- await msg.edit(
- "Starting Indexing",
- reply_markup=InlineKeyboardMarkup(
- [[InlineKeyboardButton('Cancel', callback_data='index_cancel')]]
- )
- )
- try:
- chat = int(chat)
- except:
- chat = chat
- await index_files_to_db(int(lst_msg_id), chat, msg, bot)
-
-
-@Client.on_message((filters.forwarded | (filters.regex("(https://)?(t\.me/|telegram\.me/|telegram\.dog/)(c/)?(\d+|[a-zA-Z_0-9]+)/(\d+)$")) & filters.text ) & filters.private & filters.incoming)
-async def send_for_index(bot, message):
- if message.text:
- regex = re.compile("(https://)?(t\.me/|telegram\.me/|telegram\.dog/)(c/)?(\d+|[a-zA-Z_0-9]+)/(\d+)$")
- match = regex.match(message.text)
- if not match:
- return await message.reply('Invalid link')
- chat_id = match.group(4)
- last_msg_id = int(match.group(5))
- if chat_id.isnumeric():
- chat_id = int(("-100" + chat_id))
- elif message.forward_from_chat.type == enums.ChatType.CHANNEL:
- last_msg_id = message.forward_from_message_id
- chat_id = message.forward_from_chat.username or message.forward_from_chat.id
- else:
- return
- try:
- await bot.get_chat(chat_id)
- except ChannelInvalid:
- return await message.reply('This may be a private channel / group. Make me an admin over there to index the files.')
- except (UsernameInvalid, UsernameNotModified):
- return await message.reply('Invalid Link specified.')
- except Exception as e:
- logger.exception(e)
- return await message.reply(f'Errors - {e}')
- try:
- k = await bot.get_messages(chat_id, last_msg_id)
- except:
- return await message.reply('Make Sure That Iam An Admin In The Channel, if channel is private')
- if k.empty:
- return await message.reply('This may be group and iam not a admin of the group.')
-
- if message.from_user.id in ADMINS:
- buttons = [
- [
- InlineKeyboardButton('Yes',
- callback_data=f'index#accept#{chat_id}#{last_msg_id}#{message.from_user.id}')
- ],
- [
- InlineKeyboardButton('close', callback_data='close_data'),
- ]
- ]
- reply_markup = InlineKeyboardMarkup(buttons)
- return await message.reply(
- f'Do you Want To Index This Channel/ Group ?\n\nChat ID/ Username: {chat_id}\nLast Message ID: {last_msg_id}',
- reply_markup=reply_markup)
-
- if type(chat_id) is int:
- try:
- link = (await bot.create_chat_invite_link(chat_id)).invite_link
- except ChatAdminRequired:
- return await message.reply('Make sure iam an admin in the chat and have permission to invite users.')
- else:
- link = f"@{message.forward_from_chat.username}"
- buttons = [
- [
- InlineKeyboardButton('Accept Index',
- callback_data=f'index#accept#{chat_id}#{last_msg_id}#{message.from_user.id}')
- ],
- [
- InlineKeyboardButton('Reject Index',
- callback_data=f'index#reject#{chat_id}#{message.id}#{message.from_user.id}'),
- ]
- ]
- reply_markup = InlineKeyboardMarkup(buttons)
- await bot.send_message(LOG_CHANNEL,
- f'#IndexRequest\n\nBy : {message.from_user.mention} ({message.from_user.id})\nChat ID/ Username - {chat_id}\nLast Message ID - {last_msg_id}\nInviteLink - {link}',
- reply_markup=reply_markup)
- await message.reply('ThankYou For the Contribution, Wait For My Moderators to verify the files.')
-
-
-@Client.on_message(filters.command('setskip') & filters.user(ADMINS))
-async def set_skip_number(bot, message):
- if ' ' in message.text:
- _, skip = message.text.split(" ")
- try:
- skip = int(skip)
- except:
- return await message.reply("Skip number should be an integer.")
- await message.reply(f"Successfully set SKIP number as {skip}")
- temp.CURRENT = int(skip)
- else:
- await message.reply("Give me a skip number")
-
-
-async def index_files_to_db(lst_msg_id, chat, msg, bot):
- total_files = 0
- duplicate = 0
- errors = 0
- deleted = 0
- no_media = 0
- unsupported = 0
- async with lock:
- try:
- current = temp.CURRENT
- temp.CANCEL = False
- async for message in bot.iter_messages(chat, lst_msg_id, temp.CURRENT):
- if temp.CANCEL:
- await msg.edit(f"Successfully Cancelled!!\n\nSaved {total_files} files to dataBase!\nDuplicate Files Skipped: {duplicate}\nDeleted Messages Skipped: {deleted}\nNon-Media messages skipped: {no_media + unsupported}(Unsupported Media - `{unsupported}` )\nErrors Occurred: {errors}")
- break
- current += 1
- if current % 20 == 0:
- can = [[InlineKeyboardButton('Cancel', callback_data='index_cancel')]]
- reply = InlineKeyboardMarkup(can)
- await msg.edit_text(
- text=f"Total messages fetched: {current}\nTotal messages saved: {total_files}\nDuplicate Files Skipped: {duplicate}\nDeleted Messages Skipped: {deleted}\nNon-Media messages skipped: {no_media + unsupported}(Unsupported Media - `{unsupported}` )\nErrors Occurred: {errors}",
- reply_markup=reply)
- if message.empty:
- deleted += 1
- continue
- elif not message.media:
- no_media += 1
- continue
- elif message.media not in [enums.MessageMediaType.VIDEO, enums.MessageMediaType.AUDIO, enums.MessageMediaType.DOCUMENT]:
- unsupported += 1
- continue
- media = getattr(message, message.media.value, None)
- if not media:
- unsupported += 1
- continue
- media.file_type = message.media.value
- media.caption = message.caption
- aynav, vnay = await save_file(media)
- if aynav:
- total_files += 1
- elif vnay == 0:
- duplicate += 1
- elif vnay == 2:
- errors += 1
- except Exception as e:
- logger.exception(e)
- await msg.edit(f'Error: {e}')
- else:
- await msg.edit(f'Succesfully saved {total_files} to dataBase!\nDuplicate Files Skipped: {duplicate}\nDeleted Messages Skipped: {deleted}\nNon-Media messages skipped: {no_media + unsupported}(Unsupported Media - `{unsupported}` )\nErrors Occurred: {errors}')
From 71a5ae7ca2cf1d621b74f52bed021ac414ecfe75 Mon Sep 17 00:00:00 2001
From: AFSAL <138692053+CyberTG@users.noreply.github.com>
Date: Sat, 16 Sep 2023 16:36:48 +0530
Subject: [PATCH 121/237] Delete plugins/inline.py
---
plugins/inline.py | 109 ----------------------------------------------
1 file changed, 109 deletions(-)
delete mode 100644 plugins/inline.py
diff --git a/plugins/inline.py b/plugins/inline.py
deleted file mode 100644
index 7d344a6..0000000
--- a/plugins/inline.py
+++ /dev/null
@@ -1,109 +0,0 @@
-import logging
-from pyrogram import Client, emoji, filters
-from pyrogram.errors.exceptions.bad_request_400 import QueryIdInvalid
-from pyrogram.types import InlineKeyboardButton, InlineKeyboardMarkup, InlineQueryResultCachedDocument, InlineQuery
-from database.ia_filterdb import get_search_results
-from utils import is_subscribed, get_size, temp
-from info import CACHE_TIME, AUTH_USERS, AUTH_CHANNEL, CUSTOM_FILE_CAPTION
-
-logger = logging.getLogger(__name__)
-cache_time = 0 if AUTH_USERS or AUTH_CHANNEL else CACHE_TIME
-
-async def inline_users(query: InlineQuery):
- if AUTH_USERS:
- if query.from_user and query.from_user.id in AUTH_USERS:
- return True
- else:
- return False
- if query.from_user and query.from_user.id not in temp.BANNED_USERS:
- return True
- return False
-
-@Client.on_inline_query()
-async def answer(bot, query):
- """Show search results for given inline query"""
-
- if not await inline_users(query):
- await query.answer(results=[],
- cache_time=0,
- switch_pm_text='okDa',
- switch_pm_parameter="hehe")
- return
-
- if AUTH_CHANNEL and not await is_subscribed(bot, query):
- await query.answer(results=[],
- cache_time=0,
- switch_pm_text='You have to subscribe my channel to use the bot',
- switch_pm_parameter="subscribe")
- return
-
- results = []
- if '|' in query.query:
- string, file_type = query.query.split('|', maxsplit=1)
- string = string.strip()
- file_type = file_type.strip().lower()
- else:
- string = query.query.strip()
- file_type = None
-
- offset = int(query.offset or 0)
- reply_markup = get_reply_markup(query=string)
- files, next_offset, total = await get_search_results(string,
- file_type=file_type,
- max_results=10,
- offset=offset)
-
- for file in files:
- title=file.file_name
- size=get_size(file.file_size)
- f_caption=file.caption
- if CUSTOM_FILE_CAPTION:
- try:
- f_caption=CUSTOM_FILE_CAPTION.format(file_name= '' if title is None else title, file_size='' if size is None else size, file_caption='' if f_caption is None else f_caption)
- except Exception as e:
- logger.exception(e)
- f_caption=f_caption
- if f_caption is None:
- f_caption = f"{file.file_name}"
- results.append(
- InlineQueryResultCachedDocument(
- title=file.file_name,
- document_file_id=file.file_id,
- caption=f_caption,
- description=f'Size: {get_size(file.file_size)}\nType: {file.file_type}',
- reply_markup=reply_markup))
-
- if results:
- switch_pm_text = f"{emoji.FILE_FOLDER} Results - {total}"
- if string:
- switch_pm_text += f" for {string}"
- try:
- await query.answer(results=results,
- is_personal = True,
- cache_time=cache_time,
- switch_pm_text=switch_pm_text,
- switch_pm_parameter="start",
- next_offset=str(next_offset))
- except QueryIdInvalid:
- pass
- except Exception as e:
- logging.exception(str(e))
- else:
- switch_pm_text = f'{emoji.CROSS_MARK} No results'
- if string:
- switch_pm_text += f' for "{string}"'
-
- await query.answer(results=[],
- is_personal = True,
- cache_time=cache_time,
- switch_pm_text=switch_pm_text,
- switch_pm_parameter="okay")
-
-
-def get_reply_markup(query):
- buttons = [
- [
- InlineKeyboardButton('Search again', switch_inline_query_current_chat=query)
- ]
- ]
- return InlineKeyboardMarkup(buttons)
From d39f303c1b49568fec8420af9d280f489f3c87a1 Mon Sep 17 00:00:00 2001
From: AFSAL <138692053+CyberTG@users.noreply.github.com>
Date: Sat, 16 Sep 2023 16:37:01 +0530
Subject: [PATCH 122/237] Delete plugins/misc.py
---
plugins/misc.py | 211 ------------------------------------------------
1 file changed, 211 deletions(-)
delete mode 100644 plugins/misc.py
diff --git a/plugins/misc.py b/plugins/misc.py
deleted file mode 100644
index 63cbfa9..0000000
--- a/plugins/misc.py
+++ /dev/null
@@ -1,211 +0,0 @@
-import os
-from pyrogram import Client, filters, enums
-from pyrogram.errors.exceptions.bad_request_400 import UserNotParticipant, MediaEmpty, PhotoInvalidDimensions, WebpageMediaEmpty
-from info import IMDB_TEMPLATE
-from utils import extract_user, get_file_id, get_poster, last_online
-import time
-from datetime import datetime
-from pyrogram.types import InlineKeyboardMarkup, InlineKeyboardButton, CallbackQuery
-import logging
-logger = logging.getLogger(__name__)
-logger.setLevel(logging.ERROR)
-
-@Client.on_message(filters.command('id'))
-async def showid(client, message):
- chat_type = message.chat.type
- if chat_type == enums.ChatType.PRIVATE:
- user_id = message.chat.id
- first = message.from_user.first_name
- last = message.from_user.last_name or ""
- username = message.from_user.username
- dc_id = message.from_user.dc_id or ""
- await message.reply_text(
- f"➲ First Name: {first}\n➲ Last Name: {last}\n➲ Username: {username}\n➲ Telegram ID: {user_id}\n➲ Data Centre: {dc_id}",
- quote=True
- )
-
- elif chat_type in [enums.ChatType.GROUP, enums.ChatType.SUPERGROUP]:
- _id = ""
- _id += (
- "➲ Chat ID: "
- f"{message.chat.id}\n"
- )
- if message.reply_to_message:
- _id += (
- "➲ User ID: "
- f"{message.from_user.id if message.from_user else 'Anonymous'}\n"
- "➲ Replied User ID: "
- f"{message.reply_to_message.from_user.id if message.reply_to_message.from_user else 'Anonymous'}\n"
- )
- file_info = get_file_id(message.reply_to_message)
- else:
- _id += (
- "➲ User ID: "
- f"{message.from_user.id if message.from_user else 'Anonymous'}\n"
- )
- file_info = get_file_id(message)
- if file_info:
- _id += (
- f"{file_info.message_type}: "
- f"{file_info.file_id}\n"
- )
- await message.reply_text(
- _id,
- quote=True
- )
-
-@Client.on_message(filters.command(["info"]))
-async def who_is(client, message):
- # https://github.com/SpEcHiDe/PyroGramBot/blob/master/pyrobot/plugins/admemes/whois.py#L19
- status_message = await message.reply_text(
- "`Fetching user info...`"
- )
- await status_message.edit(
- "`Processing user info...`"
- )
- from_user = None
- from_user_id, _ = extract_user(message)
- try:
- from_user = await client.get_users(from_user_id)
- except Exception as error:
- await status_message.edit(str(error))
- return
- if from_user is None:
- return await status_message.edit("no valid user_id / message specified")
- message_out_str = ""
- message_out_str += f"➲First Name: {from_user.first_name}\n"
- last_name = from_user.last_name or "None"
- message_out_str += f"➲Last Name: {last_name}\n"
- message_out_str += f"➲Telegram ID: {from_user.id}\n"
- username = from_user.username or "None"
- dc_id = from_user.dc_id or "[User Doesn't Have A Valid DP]"
- message_out_str += f"➲Data Centre: {dc_id}\n"
- message_out_str += f"➲User Name: @{username}\n"
- message_out_str += f"➲User 𝖫𝗂𝗇𝗄: Click Here\n"
- if message.chat.type in ((enums.ChatType.SUPERGROUP, enums.ChatType.CHANNEL)):
- try:
- chat_member_p = await message.chat.get_member(from_user.id)
- joined_date = (
- chat_member_p.joined_date or datetime.now()
- ).strftime("%Y.%m.%d %H:%M:%S")
- message_out_str += (
- "➲Joined this Chat on: "
- f"{joined_date}"
- "\n"
- )
- except UserNotParticipant:
- pass
- chat_photo = from_user.photo
- if chat_photo:
- local_user_photo = await client.download_media(
- message=chat_photo.big_file_id
- )
- buttons = [[
- InlineKeyboardButton('🔐 Close', callback_data='close_data')
- ]]
- reply_markup = InlineKeyboardMarkup(buttons)
- await message.reply_photo(
- photo=local_user_photo,
- quote=True,
- reply_markup=reply_markup,
- caption=message_out_str,
- parse_mode=enums.ParseMode.HTML,
- disable_notification=True
- )
- os.remove(local_user_photo)
- else:
- buttons = [[
- InlineKeyboardButton('🔐 Close', callback_data='close_data')
- ]]
- reply_markup = InlineKeyboardMarkup(buttons)
- await message.reply_text(
- text=message_out_str,
- reply_markup=reply_markup,
- quote=True,
- parse_mode=enums.ParseMode.HTML,
- disable_notification=True
- )
- await status_message.delete()
-
-@Client.on_message(filters.command(["imdb", 'search']))
-async def imdb_search(client, message):
- if ' ' in message.text:
- k = await message.reply('Searching ImDB')
- r, title = message.text.split(None, 1)
- movies = await get_poster(title, bulk=True)
- if not movies:
- return await message.reply("No results Found")
- btn = [
- [
- InlineKeyboardButton(
- text=f"{movie.get('title')} - {movie.get('year')}",
- callback_data=f"imdb#{movie.movieID}",
- )
- ]
- for movie in movies
- ]
- await k.edit('Here is what i found on IMDb', reply_markup=InlineKeyboardMarkup(btn))
- else:
- await message.reply('Give me a movie / series Name')
-
-@Client.on_callback_query(filters.regex('^imdb'))
-async def imdb_callback(bot: Client, quer_y: CallbackQuery):
- i, movie = quer_y.data.split('#')
- imdb = await get_poster(query=movie, id=True)
- btn = [
- [
- InlineKeyboardButton(
- text=f"{imdb.get('title')}",
- url=imdb['url'],
- )
- ]
- ]
- message = quer_y.message.reply_to_message or quer_y.message
- if imdb:
- caption = IMDB_TEMPLATE.format(
- query = imdb['title'],
- title = imdb['title'],
- votes = imdb['votes'],
- aka = imdb["aka"],
- seasons = imdb["seasons"],
- box_office = imdb['box_office'],
- localized_title = imdb['localized_title'],
- kind = imdb['kind'],
- imdb_id = imdb["imdb_id"],
- cast = imdb["cast"],
- runtime = imdb["runtime"],
- countries = imdb["countries"],
- certificates = imdb["certificates"],
- languages = imdb["languages"],
- director = imdb["director"],
- writer = imdb["writer"],
- producer = imdb["producer"],
- composer = imdb["composer"],
- cinematographer = imdb["cinematographer"],
- music_team = imdb["music_team"],
- distributors = imdb["distributors"],
- release_date = imdb['release_date'],
- year = imdb['year'],
- genres = imdb['genres'],
- poster = imdb['poster'],
- plot = imdb['plot'],
- rating = imdb['rating'],
- url = imdb['url'],
- **locals()
- )
- else:
- caption = "No Results"
- if imdb.get('poster'):
- try:
- await quer_y.message.reply_photo(photo=imdb['poster'], caption=caption, reply_markup=InlineKeyboardMarkup(btn))
- except (MediaEmpty, PhotoInvalidDimensions, WebpageMediaEmpty):
- pic = imdb.get('poster')
- poster = pic.replace('.jpg', "._V1_UX360.jpg")
- await quer_y.message.reply_photo(photo=poster, caption=caption, reply_markup=InlineKeyboardMarkup(btn))
- except Exception as e:
- logger.exception(e)
- await quer_y.message.reply(caption, reply_markup=InlineKeyboardMarkup(btn), disable_web_page_preview=False)
- await quer_y.message.delete()
- else:
- await quer_y.message.edit(caption, reply_markup=InlineKeyboardMarkup(btn), disable_web_page_preview=False)
- await quer_y.answer()
From 8433e5775a949892199c9f8b516f68ca0bf95a7c Mon Sep 17 00:00:00 2001
From: AFSAL <138692053+CyberTG@users.noreply.github.com>
Date: Sat, 16 Sep 2023 16:38:25 +0530
Subject: [PATCH 123/237] Update commands.py
---
plugins/commands.py | 345 +-------------------------------------------
1 file changed, 3 insertions(+), 342 deletions(-)
diff --git a/plugins/commands.py b/plugins/commands.py
index 5060ffb..3dc0647 100644
--- a/plugins/commands.py
+++ b/plugins/commands.py
@@ -50,9 +50,9 @@ async def start(client, message):
InlineKeyboardButton("⭕️𝗚𝗘𝗧 𝗢𝗨𝗥 𝗖𝗛𝗔𝗡𝗡𝗘𝗟 𝗟𝗜𝗡𝗞𝗦 ⭕️", url="https://t.me/ARAKAL_THERAVAD_GROUP_LINKS")
]]
reply_markup = InlineKeyboardMarkup(buttons)
- m=await message.reply_sticker("CAACAgUAAxkBAAINdmL9uWnC3ptj9YnTjFU4YGr5dtzwAAIEAAPBJDExieUdbguzyBAeBA")
- await asyncio.sleep(1)
- await m.delete()
+ # m=await message.reply_sticker("CAACAgUAAxkBAAINdmL9uWnC3ptj9YnTjFU4YGr5dtzwAAIEAAPBJDExieUdbguzyBAeBA")
+ # await asyncio.sleep(1)
+ # await m.delete()
await message.reply_photo(
photo=random.choice(PICS),
caption=script.SUR_TXT.format(message.from_user.mention, temp.U_NAME, temp.B_NAME),
@@ -245,92 +245,6 @@ async def start(client, message):
)
-@Client.on_message(filters.command('channel') & filters.user(ADMINS))
-async def channel_info(bot, message):
-
- """Send basic information of channel"""
- if isinstance(CHANNELS, (int, str)):
- channels = [CHANNELS]
- elif isinstance(CHANNELS, list):
- channels = CHANNELS
- else:
- raise ValueError("Unexpected type of CHANNELS")
-
- text = '📑 **Indexed channels/groups**\n'
- for channel in channels:
- chat = await bot.get_chat(channel)
- if chat.username:
- text += '\n@' + chat.username
- else:
- text += '\n' + chat.title or chat.first_name
-
- text += f'\n\n**Total:** {len(CHANNELS)}'
-
- if len(text) < 4096:
- await message.reply(text)
- else:
- file = 'Indexed channels.txt'
- with open(file, 'w') as f:
- f.write(text)
- await message.reply_document(file)
- os.remove(file)
-
-
-@Client.on_message(filters.command('logs') & filters.user(ADMINS))
-async def log_file(bot, message):
- """Send log file"""
- try:
- await message.reply_document('TelegramBot.log')
- except Exception as e:
- await message.reply(str(e))
-
-@Client.on_message(filters.command('delete') & filters.user(ADMINS))
-async def delete(bot, message):
- """Delete file from database"""
- reply = message.reply_to_message
- if reply and reply.media:
- msg = await message.reply("Processing...⏳", quote=True)
- else:
- await message.reply('Reply to file with /delete which you want to delete', quote=True)
- return
-
- for file_type in ("document", "video", "audio"):
- media = getattr(reply, file_type, None)
- if media is not None:
- break
- else:
- await msg.edit('This is not supported file format')
- return
-
- file_id, file_ref = unpack_new_file_id(media.file_id)
-
- result = await Media.collection.delete_one({
- '_id': file_id,
- })
- if result.deleted_count:
- await msg.edit('File is successfully deleted from database')
- else:
- file_name = re.sub(r"(_|\-|\.|\+)", " ", str(media.file_name))
- result = await Media.collection.delete_many({
- 'file_name': file_name,
- 'file_size': media.file_size,
- 'mime_type': media.mime_type
- })
- if result.deleted_count:
- await msg.edit('File is successfully deleted from database')
- else:
- # files indexed before https://github.com/EvamariaTG/EvaMaria/commit/f3d2a1bcb155faf44178e5d7a685a1b533e714bf#diff-86b613edf1748372103e94cacff3b578b36b698ef9c16817bb98fe9ef22fb669R39
- # have original file name.
- result = await Media.collection.delete_many({
- 'file_name': media.file_name,
- 'file_size': media.file_size,
- 'mime_type': media.mime_type
- })
- if result.deleted_count:
- await msg.edit('File is successfully deleted from database')
- else:
- await msg.edit('File not found in database')
-
@Client.on_message(filters.command('deleteall') & filters.user(ADMINS))
async def delete_all_index(bot, message):
@@ -359,256 +273,3 @@ async def delete_all_index_confirm(bot, message):
await Media.collection.drop()
await message.answer(MSG_ALRT)
await message.message.edit('Succesfully Deleted All The Indexed Files.')
-
-
-@Client.on_message(filters.command('settings'))
-async def settings(client, message):
- userid = message.from_user.id if message.from_user else None
- if not userid:
- return await message.reply(f"You are anonymous admin. Use /connect {message.chat.id} in PM")
- chat_type = message.chat.type
-
- if chat_type == enums.ChatType.PRIVATE:
- grpid = await active_connection(str(userid))
- if grpid is not None:
- grp_id = grpid
- try:
- chat = await client.get_chat(grpid)
- title = chat.title
- except:
- await message.reply_text("Make sure I'm present in your group!!", quote=True)
- return
- else:
- await message.reply_text("I'm not connected to any groups!", quote=True)
- return
-
- elif chat_type in [enums.ChatType.GROUP, enums.ChatType.SUPERGROUP]:
- grp_id = message.chat.id
- title = message.chat.title
-
- else:
- return
-
- st = await client.get_chat_member(grp_id, userid)
- if (
- st.status != enums.ChatMemberStatus.ADMINISTRATOR
- and st.status != enums.ChatMemberStatus.OWNER
- and str(userid) not in ADMINS
- ):
- return
-
- settings = await get_settings(grp_id)
- try:
- if settings['auto_delete']:
- settings = await get_settings(grp_id)
- except KeyError:
- await save_group_settings(grp_id, 'auto_delete', True)
- settings = await get_settings(grp_id)
- if 'is_shortlink' not in settings.keys():
- await save_group_settings(grp_id, 'is_shortlink', False)
- else:
- pass
-
- if settings is not None:
- buttons = [
- [
- InlineKeyboardButton(
- 'Filter Button',
- callback_data=f'setgs#button#{settings["button"]}#{grp_id}',
- ),
- InlineKeyboardButton(
- 'Single' if settings["button"] else 'Double',
- callback_data=f'setgs#button#{settings["button"]}#{grp_id}',
- ),
- ],
- [
- InlineKeyboardButton(
- 'Redirect To',
- callback_data=f'setgs#botpm#{settings["botpm"]}#{grp_id}',
- ),
- InlineKeyboardButton(
- 'Bot PM' if settings["botpm"] else 'Channel',
- callback_data=f'setgs#botpm#{settings["botpm"]}#{grp_id}',
- ),
- ],
- [
- InlineKeyboardButton(
- 'File Secure',
- callback_data=f'setgs#file_secure#{settings["file_secure"]}#{grp_id}',
- ),
- InlineKeyboardButton(
- '✅ Yes' if settings["file_secure"] else '❌ No',
- callback_data=f'setgs#file_secure#{settings["file_secure"]}#{grp_id}',
- ),
- ],
- [
- InlineKeyboardButton(
- 'IMDB',
- callback_data=f'setgs#imdb#{settings["imdb"]}#{grp_id}',
- ),
- InlineKeyboardButton(
- '✅ Yes' if settings["imdb"] else '❌ No',
- callback_data=f'setgs#imdb#{settings["imdb"]}#{grp_id}',
- ),
- ],
- [
- InlineKeyboardButton(
- 'Spell Check',
- callback_data=f'setgs#spell_check#{settings["spell_check"]}#{grp_id}',
- ),
- InlineKeyboardButton(
- '✅ Yes' if settings["spell_check"] else '❌ No',
- callback_data=f'setgs#spell_check#{settings["spell_check"]}#{grp_id}',
- ),
- ],
- [
- InlineKeyboardButton(
- 'Welcome',
- callback_data=f'setgs#welcome#{settings["welcome"]}#{grp_id}',
- ),
- InlineKeyboardButton(
- '✅ Yes' if settings["welcome"] else '❌ No',
- callback_data=f'setgs#welcome#{settings["welcome"]}#{grp_id}',
- ),
- ],
- [
- InlineKeyboardButton(
- 'Auto Delete',
- callback_data=f'setgs#auto_delete#{settings["auto_delete"]}#{grp_id}',
- ),
- InlineKeyboardButton(
- '10 Mins' if settings["auto_delete"] else 'OFF',
- callback_data=f'setgs#auto_delete#{settings["auto_delete"]}#{grp_id}',
- ),
- ],
- [
- InlineKeyboardButton(
- 'ShortLink',
- callback_data=f'setgs#is_shortlink#{settings["is_shortlink"]}#{grp_id}',
- ),
- InlineKeyboardButton(
- '✅ ON' if settings["is_shortlink"] else '❌ OFF',
- callback_data=f'setgs#is_shortlink#{settings["is_shortlink"]}#{grp_id}',
- ),
- ],
- ]
-
- reply_markup = InlineKeyboardMarkup(buttons)
-
- await message.reply_text(
- text=f"Change Your Settings for {title} As Your Wish ⚙",
- reply_markup=reply_markup,
- disable_web_page_preview=True,
- parse_mode=enums.ParseMode.HTML,
- reply_to_message_id=message.id
- )
-
-
-
-@Client.on_message(filters.command('set_template'))
-async def save_template(client, message):
- sts = await message.reply("Checking template")
- userid = message.from_user.id if message.from_user else None
- if not userid:
- return await message.reply(f"You are anonymous admin. Use /connect {message.chat.id} in PM")
- chat_type = message.chat.type
-
- if chat_type == enums.ChatType.PRIVATE:
- grpid = await active_connection(str(userid))
- if grpid is not None:
- grp_id = grpid
- try:
- chat = await client.get_chat(grpid)
- title = chat.title
- except:
- await message.reply_text("Make sure I'm present in your group!!", quote=True)
- return
- else:
- await message.reply_text("I'm not connected to any groups!", quote=True)
- return
-
- elif chat_type in [enums.ChatType.GROUP, enums.ChatType.SUPERGROUP]:
- grp_id = message.chat.id
- title = message.chat.title
-
- else:
- return
-
- st = await client.get_chat_member(grp_id, userid)
- if (
- st.status != enums.ChatMemberStatus.ADMINISTRATOR
- and st.status != enums.ChatMemberStatus.OWNER
- and str(userid) not in ADMINS
- ):
- return
-
- if len(message.command) < 2:
- return await sts.edit("No Input!!")
- template = message.text.split(" ", 1)[1]
- await save_group_settings(grp_id, 'template', template)
- await sts.edit(f"Successfully changed template for {title} to\n\n{template}")
-
-@Client.on_message(filters.command("deletefiles") & filters.user(ADMINS))
-async def deletemultiplefiles(bot, message):
- btn = [[
- InlineKeyboardButton("Delete PreDVDs", callback_data="predvd"),
- InlineKeyboardButton("Delete CamRips", callback_data="camrip")
- ]]
- await message.reply_text(
- text="Select the type of files you want to delete !\n\nThis will delete 100 files from the database for the selected type.",
- reply_markup=InlineKeyboardMarkup(btn)
- )
-
-
-@Client.on_message(filters.command("send") & filters.user(ADMINS))
-async def send_msg(bot, message):
- if message.reply_to_message:
- target_id = message.text.split(" ", 1)[1]
- out = "Users Saved In DB Are:\n\n"
- success = False
- try:
- user = await bot.get_users(target_id)
- users = await db.get_all_users()
- async for usr in users:
- out += f"{usr['id']}"
- out += '\n'
- if str(user.id) in str(out):
- await message.reply_to_message.copy(int(user.id))
- success = True
- else:
- success = False
- if success:
- await message.reply_text(f"Your message has been successfully send to {user.mention}.")
- else:
- await message.reply_text("This user didn't started this bot yet !")
- except Exception as e:
- await message.reply_text(f"Error: {e}")
- else:
- await message.reply_text("Use this command as a reply to any message using the target chat id. For eg: /send userid")
-
-@Client.on_message(filters.command("shortlink") & filters.user(ADMINS))
-async def shortlink(bot, message):
- chat_type = message.chat.type
- if chat_type == enums.ChatType.PRIVATE:
- return await message.reply_text(f"Hey {message.from_user.mention}, This command only works on groups !")
- elif chat_type in [enums.ChatType.GROUP, enums.ChatType.SUPERGROUP]:
- grpid = message.chat.id
- title = message.chat.title
- else:
- return
- data = message.text
- userid = message.from_user.id
- user = await bot.get_chat_member(grpid, userid)
- if user.status != enums.ChatMemberStatus.ADMINISTRATOR and user.status != enums.ChatMemberStatus.OWNER and str(userid) not in ADMINS:
- return await message.reply_text("You don't have access to use this command !")
- else:
- pass
- try:
- command, shortlink_url, api = data.split(" ")
- except:
- return await message.reply_text("Command Incomplete :(\n\nGive me a shortlink and api along with the command !\n\nFormat: /shortlink shorturllink.in 95a8195c40d31e0c3b6baa68813fcecb1239f2e9")
- reply = await message.reply_text("Please Wait...")
- await save_group_settings(grpid, 'shortlink', shortlink_url)
- await save_group_settings(grpid, 'shortlink_api', api)
- await save_group_settings(grpid, 'is_shortlink', True)
- await reply.edit_text(f"Successfully added shortlink API for {title}.\n\nCurrent Shortlink Website: {shortlink_url}\nCurrent API: {api}")
From 12f24ecfca0eac766f35dc94d33045f2ae4e3183 Mon Sep 17 00:00:00 2001
From: AFSAL <138692053+CyberTG@users.noreply.github.com>
Date: Sat, 16 Sep 2023 16:39:10 +0530
Subject: [PATCH 124/237] Update p_ttishow.py
---
plugins/p_ttishow.py | 215 -------------------------------------------
1 file changed, 215 deletions(-)
diff --git a/plugins/p_ttishow.py b/plugins/p_ttishow.py
index 3e78aa6..1ccd574 100644
--- a/plugins/p_ttishow.py
+++ b/plugins/p_ttishow.py
@@ -70,218 +70,3 @@ async def save_group(bot, message):
await asyncio.sleep(600)
await (temp.MELCOW['welcome']).delete()
-@Client.on_message(filters.command('leave') & filters.user(ADMINS))
-async def leave_a_chat(bot, message):
- if len(message.command) == 1:
- return await message.reply('Give me a chat id')
- chat = message.command[1]
- try:
- chat = int(chat)
- except:
- chat = chat
- try:
- buttons = [[
- InlineKeyboardButton('Support', url=f'https://t.me/{SUPPORT_CHAT}')
- ]]
- reply_markup=InlineKeyboardMarkup(buttons)
- await bot.send_message(
- chat_id=chat,
- text='Hello Friends, \nMy admin has told me to leave from group so i go! If you wanna add me again contact my support group.',
- reply_markup=reply_markup,
- )
-
- await bot.leave_chat(chat)
- await message.reply(f"left the chat `{chat}`")
- except Exception as e:
- await message.reply(f'Error - {e}')
-
-@Client.on_message(filters.command('disable') & filters.user(ADMINS))
-async def disable_chat(bot, message):
- if len(message.command) == 1:
- return await message.reply('Give me a chat id')
- r = message.text.split(None)
- if len(r) > 2:
- reason = message.text.split(None, 2)[2]
- chat = message.text.split(None, 2)[1]
- else:
- chat = message.command[1]
- reason = "No reason Provided"
- try:
- chat_ = int(chat)
- except:
- return await message.reply('Give Me A Valid Chat ID')
- cha_t = await db.get_chat(int(chat_))
- if not cha_t:
- return await message.reply("Chat Not Found In DB")
- if cha_t['is_disabled']:
- return await message.reply(f"This chat is already disabled:\nReason- {cha_t['reason']} ")
- await db.disable_chat(int(chat_), reason)
- temp.BANNED_CHATS.append(int(chat_))
- await message.reply('Chat Successfully Disabled')
- try:
- buttons = [[
- InlineKeyboardButton('Support', url=f'https://t.me/{SUPPORT_CHAT}')
- ]]
- reply_markup=InlineKeyboardMarkup(buttons)
- await bot.send_message(
- chat_id=chat_,
- text=f'Hello Friends, \nMy admin has told me to leave from group so i go! If you wanna add me again contact my support group. \nReason : {reason}',
- reply_markup=reply_markup)
- await bot.leave_chat(chat_)
- except Exception as e:
- await message.reply(f"Error - {e}")
-
-
-@Client.on_message(filters.command('enable') & filters.user(ADMINS))
-async def re_enable_chat(bot, message):
- if len(message.command) == 1:
- return await message.reply('Give me a chat id')
- chat = message.command[1]
- try:
- chat_ = int(chat)
- except:
- return await message.reply('Give Me A Valid Chat ID')
- sts = await db.get_chat(int(chat))
- if not sts:
- return await message.reply("Chat Not Found In DB !")
- if not sts.get('is_disabled'):
- return await message.reply('This chat is not yet disabled.')
- await db.re_enable_chat(int(chat_))
- temp.BANNED_CHATS.remove(int(chat_))
- await message.reply("Chat Successfully re-enabled")
-
-
-@Client.on_message(filters.command('stats') & filters.incoming)
-async def get_ststs(bot, message):
- rju = await message.reply('Fetching stats..')
- total_users = await db.total_users_count()
- totl_chats = await db.total_chat_count()
- files = await Media.count_documents()
- size = await db.get_db_size()
- free = 536870912 - size
- size = get_size(size)
- free = get_size(free)
- await rju.edit(script.STATUS_TXT.format(files, total_users, totl_chats, size, free))
-
-
-# a function for trespassing into others groups, Inspired by a Vazha
-# Not to be used , But Just to showcase his vazhatharam.
-# @Client.on_message(filters.command('invite') & filters.user(ADMINS))
-@Client.on_message(filters.command('invite') & filters.user(ADMINS))
-async def gen_invite(bot, message):
- if len(message.command) == 1:
- return await message.reply('Give me a chat id')
- chat = message.command[1]
- try:
- chat = int(chat)
- except:
- return await message.reply('Give Me A Valid Chat ID')
- try:
- link = await bot.create_chat_invite_link(chat)
- except ChatAdminRequired:
- return await message.reply("Invite Link Generation Failed, Iam Not Having Sufficient Rights")
- except Exception as e:
- return await message.reply(f'Error {e}')
- await message.reply(f'Here is your Invite Link {link.invite_link}')
-
-@Client.on_message(filters.command('ban') & filters.user(ADMINS))
-async def ban_a_user(bot, message):
- # https://t.me/GetTGLink/4185
- if len(message.command) == 1:
- return await message.reply('Give me a user id / username')
- r = message.text.split(None)
- if len(r) > 2:
- reason = message.text.split(None, 2)[2]
- chat = message.text.split(None, 2)[1]
- else:
- chat = message.command[1]
- reason = "No reason Provided"
- try:
- chat = int(chat)
- except:
- pass
- try:
- k = await bot.get_users(chat)
- except PeerIdInvalid:
- return await message.reply("This is an invalid user, make sure ia have met him before.")
- except IndexError:
- return await message.reply("This might be a channel, make sure its a user.")
- except Exception as e:
- return await message.reply(f'Error - {e}')
- else:
- jar = await db.get_ban_status(k.id)
- if jar['is_banned']:
- return await message.reply(f"{k.mention} is already banned\nReason: {jar['ban_reason']}")
- await db.ban_user(k.id, reason)
- temp.BANNED_USERS.append(k.id)
- await message.reply(f"Successfully banned {k.mention}")
-
-
-
-@Client.on_message(filters.command('unban') & filters.user(ADMINS))
-async def unban_a_user(bot, message):
- if len(message.command) == 1:
- return await message.reply('Give me a user id / username')
- r = message.text.split(None)
- if len(r) > 2:
- reason = message.text.split(None, 2)[2]
- chat = message.text.split(None, 2)[1]
- else:
- chat = message.command[1]
- reason = "No reason Provided"
- try:
- chat = int(chat)
- except:
- pass
- try:
- k = await bot.get_users(chat)
- except PeerIdInvalid:
- return await message.reply("This is an invalid user, make sure ia have met him before.")
- except IndexError:
- return await message.reply("Thismight be a channel, make sure its a user.")
- except Exception as e:
- return await message.reply(f'Error - {e}')
- else:
- jar = await db.get_ban_status(k.id)
- if not jar['is_banned']:
- return await message.reply(f"{k.mention} is not yet banned.")
- await db.remove_ban(k.id)
- temp.BANNED_USERS.remove(k.id)
- await message.reply(f"Successfully unbanned {k.mention}")
-
-
-
-@Client.on_message(filters.command('users') & filters.user(ADMINS))
-async def list_users(bot, message):
- # https://t.me/GetTGLink/4184
- raju = await message.reply('Getting List Of Users')
- users = await db.get_all_users()
- out = "Users Saved In DB Are:\n\n"
- async for user in users:
- out += f"{user['name']}"
- if user['ban_status']['is_banned']:
- out += '( Banned User )'
- out += '\n'
- try:
- await raju.edit_text(out)
- except MessageTooLong:
- with open('users.txt', 'w+') as outfile:
- outfile.write(out)
- await message.reply_document('users.txt', caption="List Of Users")
-
-@Client.on_message(filters.command('chats') & filters.user(ADMINS))
-async def list_chats(bot, message):
- raju = await message.reply('Getting List Of chats')
- chats = await db.get_all_chats()
- out = "Chats Saved In DB Are:\n\n"
- async for chat in chats:
- out += f"**Title:** `{chat['title']}`\n**- ID:** `{chat['id']}`"
- if chat['chat_status']['is_disabled']:
- out += '( Disabled Chat )'
- out += '\n'
- try:
- await raju.edit_text(out)
- except MessageTooLong:
- with open('chats.txt', 'w+') as outfile:
- outfile.write(out)
- await message.reply_document('chats.txt', caption="List Of Chats")
From 5709c24d12e88f80ef35fede007eb36a44ac2921 Mon Sep 17 00:00:00 2001
From: AFSAL <138692053+CyberTG@users.noreply.github.com>
Date: Sat, 16 Sep 2023 16:41:38 +0530
Subject: [PATCH 125/237] Update requirements.txt
---
requirements.txt | 21 ++-------------------
1 file changed, 2 insertions(+), 19 deletions(-)
diff --git a/requirements.txt b/requirements.txt
index 8a65141..94e1682 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -8,29 +8,12 @@ requests
bs4
git+https://github.com/Joelkb/cinemagoer
Heroku3
-search_engine_parser
-wget
-aiofiles
-ffmpeg-python
-ffmpeg
-youtube_search
-youtube_search_python
-youtube-search-python==1.4.6
-yt-dlp
-youtube-dl
-youtube_search
+#ffmpeg-python
+3ffmpeg
requests
aiohttp==3.7.4
-gTTS
-googletrans==3.1.0a0
-telegraph
-PyPDF2
-ujson
-pyshorteners
-countryinfo
datetime
pytz
-dnspython
aiohttp
python-math
Pillow
From 19c42e2441067b0644fb5fcc808a0354a49e8cb3 Mon Sep 17 00:00:00 2001
From: AFSAL <138692053+CyberTG@users.noreply.github.com>
Date: Sat, 16 Sep 2023 16:41:54 +0530
Subject: [PATCH 126/237] Update requirements.txt
---
requirements.txt | 2 --
1 file changed, 2 deletions(-)
diff --git a/requirements.txt b/requirements.txt
index 94e1682..bf434cf 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -8,8 +8,6 @@ requests
bs4
git+https://github.com/Joelkb/cinemagoer
Heroku3
-#ffmpeg-python
-3ffmpeg
requests
aiohttp==3.7.4
datetime
From d9d3e22b3880268ece1d06fad8bcf807715b81a0 Mon Sep 17 00:00:00 2001
From: Soul pc <119080077+soulpc@users.noreply.github.com>
Date: Sat, 16 Sep 2023 18:09:56 +0530
Subject: [PATCH 127/237] Update Script.py
---
Script.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Script.py b/Script.py
index be68775..6bc2b27 100644
--- a/Script.py
+++ b/Script.py
@@ -271,7 +271,7 @@ class script(object):
⚠️ ഇവിടെ നിന്നും വേറെ എവിടേലും മാറ്റിയതിന് ശേഷം ഡൗൺലോഡ് ചെയ്യുക... !!!
-കോപ്പി റൈറ്റ് ഉള്ളത് കൊണ്ട് ഈ ഒരു ഫയൽ 1 മിനിറ്റ് കൊണ്ട് ഇവിടെ നിന്നും ഡിലേറ്റാവും...!!!
+കോപ്പി റൈറ്റ് ഉള്ളത് കൊണ്ട് ഈ ഒരു ഫയൽ 10 മിനിറ്റ് കൊണ്ട് ഇവിടെ നിന്നും ഡിലേറ്റാവും...!!!
╔════ ᴊᴏɪɴ ᴡɪᴛʜ ᴜs ════╗
♻️ 𝙅𝙊𝙄𝙉 :- OTT UPDATES
From 342ca27ebf05f74bc4b1919b091243c4bc09fb6d Mon Sep 17 00:00:00 2001
From: Soul pc <119080077+soulpc@users.noreply.github.com>
Date: Sat, 16 Sep 2023 18:11:28 +0530
Subject: [PATCH 128/237] Update commands.py
---
plugins/commands.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/plugins/commands.py b/plugins/commands.py
index 3dc0647..ee6e7d4 100644
--- a/plugins/commands.py
+++ b/plugins/commands.py
@@ -43,7 +43,7 @@ async def start(client, message):
if len(message.command) != 2:
buttons = [[
InlineKeyboardButton("👥 𝗚𝗥𝗢𝗨𝗣 - 𝟭", url=f"https://t.me/ARAKAL_THERAVAD_MOVIES"),
- InlineKeyboardButton("👥𝗚𝗥𝗢𝗨𝗣 - 𝟮", url=f"https://t.me/ARAKAL_THERAVAD_MOVIES")
+ InlineKeyboardButton("👥𝗚𝗥𝗢𝗨𝗣 - 𝟮", url=f"https://t.me/ARAKAL_THERAVAD_GROUP_02")
],[
InlineKeyboardButton("🖥 𝗡𝗘𝗪 𝗢𝗧𝗧 𝗨𝗣𝗗𝗔𝗧𝗘𝗦 🖥", url="https://t.me/oTTGArakalTheravadMovies")
],[
From 89f69cb2dd6d737909773daaa51fb86147a8eb0f Mon Sep 17 00:00:00 2001
From: Soul pc <119080077+soulpc@users.noreply.github.com>
Date: Sat, 16 Sep 2023 18:24:12 +0530
Subject: [PATCH 129/237] Create index.py
---
plugins/plugins/index.py | 185 +++++++++++++++++++++++++++++++++++++++
1 file changed, 185 insertions(+)
create mode 100644 plugins/plugins/index.py
diff --git a/plugins/plugins/index.py b/plugins/plugins/index.py
new file mode 100644
index 0000000..df5cf10
--- /dev/null
+++ b/plugins/plugins/index.py
@@ -0,0 +1,185 @@
+import logging
+import asyncio
+from pyrogram import Client, filters, enums
+from pyrogram.errors import FloodWait
+from pyrogram.errors.exceptions.bad_request_400 import ChannelInvalid, ChatAdminRequired, UsernameInvalid, UsernameNotModified
+from info import ADMINS
+from info import INDEX_REQ_CHANNEL as LOG_CHANNEL
+from database.ia_filterdb import save_file
+from pyrogram.types import InlineKeyboardMarkup, InlineKeyboardButton
+from utils import temp
+import re
+logger = logging.getLogger(__name__)
+logger.setLevel(logging.INFO)
+lock = asyncio.Lock()
+
+
+@Client.on_callback_query(filters.regex(r'^index'))
+async def index_files(bot, query):
+ if query.data.startswith('index_cancel'):
+ temp.CANCEL = True
+ return await query.answer("Cancelling Indexing")
+ _, raju, chat, lst_msg_id, from_user = query.data.split("#")
+ if raju == 'reject':
+ await query.message.delete()
+ await bot.send_message(int(from_user),
+ f'Your Submission for indexing {chat} has been decliened by our moderators.',
+ reply_to_message_id=int(lst_msg_id))
+ return
+
+ if lock.locked():
+ return await query.answer('Wait until previous process complete.', show_alert=True)
+ msg = query.message
+
+ await query.answer('Processing...⏳', show_alert=True)
+ if int(from_user) not in ADMINS:
+ await bot.send_message(int(from_user),
+ f'Your Submission for indexing {chat} has been accepted by our moderators and will be added soon.',
+ reply_to_message_id=int(lst_msg_id))
+ await msg.edit(
+ "Starting Indexing",
+ reply_markup=InlineKeyboardMarkup(
+ [[InlineKeyboardButton('Cancel', callback_data='index_cancel')]]
+ )
+ )
+ try:
+ chat = int(chat)
+ except:
+ chat = chat
+ await index_files_to_db(int(lst_msg_id), chat, msg, bot)
+
+
+@Client.on_message((filters.forwarded | (filters.regex("(https://)?(t\.me/|telegram\.me/|telegram\.dog/)(c/)?(\d+|[a-zA-Z_0-9]+)/(\d+)$")) & filters.text ) & filters.private & filters.incoming)
+async def send_for_index(bot, message):
+ if message.text:
+ regex = re.compile("(https://)?(t\.me/|telegram\.me/|telegram\.dog/)(c/)?(\d+|[a-zA-Z_0-9]+)/(\d+)$")
+ match = regex.match(message.text)
+ if not match:
+ return await message.reply('Invalid link')
+ chat_id = match.group(4)
+ last_msg_id = int(match.group(5))
+ if chat_id.isnumeric():
+ chat_id = int(("-100" + chat_id))
+ elif message.forward_from_chat.type == enums.ChatType.CHANNEL:
+ last_msg_id = message.forward_from_message_id
+ chat_id = message.forward_from_chat.username or message.forward_from_chat.id
+ else:
+ return
+ try:
+ await bot.get_chat(chat_id)
+ except ChannelInvalid:
+ return await message.reply('This may be a private channel / group. Make me an admin over there to index the files.')
+ except (UsernameInvalid, UsernameNotModified):
+ return await message.reply('Invalid Link specified.')
+ except Exception as e:
+ logger.exception(e)
+ return await message.reply(f'Errors - {e}')
+ try:
+ k = await bot.get_messages(chat_id, last_msg_id)
+ except:
+ return await message.reply('Make Sure That Iam An Admin In The Channel, if channel is private')
+ if k.empty:
+ return await message.reply('This may be group and iam not a admin of the group.')
+
+ if message.from_user.id in ADMINS:
+ buttons = [
+ [
+ InlineKeyboardButton('Yes',
+ callback_data=f'index#accept#{chat_id}#{last_msg_id}#{message.from_user.id}')
+ ],
+ [
+ InlineKeyboardButton('close', callback_data='close_data'),
+ ]
+ ]
+ reply_markup = InlineKeyboardMarkup(buttons)
+ return await message.reply(
+ f'Do you Want To Index This Channel/ Group ?\n\nChat ID/ Username: {chat_id}\nLast Message ID: {last_msg_id}',
+ reply_markup=reply_markup)
+
+ if type(chat_id) is int:
+ try:
+ link = (await bot.create_chat_invite_link(chat_id)).invite_link
+ except ChatAdminRequired:
+ return await message.reply('Make sure iam an admin in the chat and have permission to invite users.')
+ else:
+ link = f"@{message.forward_from_chat.username}"
+ buttons = [
+ [
+ InlineKeyboardButton('Accept Index',
+ callback_data=f'index#accept#{chat_id}#{last_msg_id}#{message.from_user.id}')
+ ],
+ [
+ InlineKeyboardButton('Reject Index',
+ callback_data=f'index#reject#{chat_id}#{message.id}#{message.from_user.id}'),
+ ]
+ ]
+ reply_markup = InlineKeyboardMarkup(buttons)
+ await bot.send_message(LOG_CHANNEL,
+ f'#IndexRequest\n\nBy : {message.from_user.mention} ({message.from_user.id})\nChat ID/ Username - {chat_id}\nLast Message ID - {last_msg_id}\nInviteLink - {link}',
+ reply_markup=reply_markup)
+ await message.reply('ThankYou For the Contribution, Wait For My Moderators to verify the files.')
+
+
+@Client.on_message(filters.command('setskip') & filters.user(ADMINS))
+async def set_skip_number(bot, message):
+ if ' ' in message.text:
+ _, skip = message.text.split(" ")
+ try:
+ skip = int(skip)
+ except:
+ return await message.reply("Skip number should be an integer.")
+ await message.reply(f"Successfully set SKIP number as {skip}")
+ temp.CURRENT = int(skip)
+ else:
+ await message.reply("Give me a skip number")
+
+
+async def index_files_to_db(lst_msg_id, chat, msg, bot):
+ total_files = 0
+ duplicate = 0
+ errors = 0
+ deleted = 0
+ no_media = 0
+ unsupported = 0
+ async with lock:
+ try:
+ current = temp.CURRENT
+ temp.CANCEL = False
+ async for message in bot.iter_messages(chat, lst_msg_id, temp.CURRENT):
+ if temp.CANCEL:
+ await msg.edit(f"Successfully Cancelled!!\n\nSaved {total_files} files to dataBase!\nDuplicate Files Skipped: {duplicate}\nDeleted Messages Skipped: {deleted}\nNon-Media messages skipped: {no_media + unsupported}(Unsupported Media - `{unsupported}` )\nErrors Occurred: {errors}")
+ break
+ current += 1
+ if current % 20 == 0:
+ can = [[InlineKeyboardButton('Cancel', callback_data='index_cancel')]]
+ reply = InlineKeyboardMarkup(can)
+ await msg.edit_text(
+ text=f"Total messages fetched: {current}\nTotal messages saved: {total_files}\nDuplicate Files Skipped: {duplicate}\nDeleted Messages Skipped: {deleted}\nNon-Media messages skipped: {no_media + unsupported}(Unsupported Media - `{unsupported}` )\nErrors Occurred: {errors}",
+ reply_markup=reply)
+ if message.empty:
+ deleted += 1
+ continue
+ elif not message.media:
+ no_media += 1
+ continue
+ elif message.media not in [enums.MessageMediaType.VIDEO, enums.MessageMediaType.AUDIO, enums.MessageMediaType.DOCUMENT]:
+ unsupported += 1
+ continue
+ media = getattr(message, message.media.value, None)
+ if not media:
+ unsupported += 1
+ continue
+ media.file_type = message.media.value
+ media.caption = message.caption
+ aynav, vnay = await save_file(media)
+ if aynav:
+ total_files += 1
+ elif vnay == 0:
+ duplicate += 1
+ elif vnay == 2:
+ errors += 1
+ except Exception as e:
+ logger.exception(e)
+ await msg.edit(f'Error: {e}')
+ else:
+ await msg.edit(f'Succesfully saved {total_files} to dataBase!\nDuplicate Files Skipped: {duplicate}\nDeleted Messages Skipped: {deleted}\nNon-Media messages skipped: {no_media + unsupported}(Unsupported Media - `{unsupported}` )\nErrors Occurred: {errors}')
From 59fc12c0ba441d505ac024e0eb4a6f5f0bc4fa2d Mon Sep 17 00:00:00 2001
From: Soul pc <119080077+soulpc@users.noreply.github.com>
Date: Sat, 16 Sep 2023 18:26:28 +0530
Subject: [PATCH 130/237] Create index.py
---
plugins/index.py | 185 +++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 185 insertions(+)
create mode 100644 plugins/index.py
diff --git a/plugins/index.py b/plugins/index.py
new file mode 100644
index 0000000..df5cf10
--- /dev/null
+++ b/plugins/index.py
@@ -0,0 +1,185 @@
+import logging
+import asyncio
+from pyrogram import Client, filters, enums
+from pyrogram.errors import FloodWait
+from pyrogram.errors.exceptions.bad_request_400 import ChannelInvalid, ChatAdminRequired, UsernameInvalid, UsernameNotModified
+from info import ADMINS
+from info import INDEX_REQ_CHANNEL as LOG_CHANNEL
+from database.ia_filterdb import save_file
+from pyrogram.types import InlineKeyboardMarkup, InlineKeyboardButton
+from utils import temp
+import re
+logger = logging.getLogger(__name__)
+logger.setLevel(logging.INFO)
+lock = asyncio.Lock()
+
+
+@Client.on_callback_query(filters.regex(r'^index'))
+async def index_files(bot, query):
+ if query.data.startswith('index_cancel'):
+ temp.CANCEL = True
+ return await query.answer("Cancelling Indexing")
+ _, raju, chat, lst_msg_id, from_user = query.data.split("#")
+ if raju == 'reject':
+ await query.message.delete()
+ await bot.send_message(int(from_user),
+ f'Your Submission for indexing {chat} has been decliened by our moderators.',
+ reply_to_message_id=int(lst_msg_id))
+ return
+
+ if lock.locked():
+ return await query.answer('Wait until previous process complete.', show_alert=True)
+ msg = query.message
+
+ await query.answer('Processing...⏳', show_alert=True)
+ if int(from_user) not in ADMINS:
+ await bot.send_message(int(from_user),
+ f'Your Submission for indexing {chat} has been accepted by our moderators and will be added soon.',
+ reply_to_message_id=int(lst_msg_id))
+ await msg.edit(
+ "Starting Indexing",
+ reply_markup=InlineKeyboardMarkup(
+ [[InlineKeyboardButton('Cancel', callback_data='index_cancel')]]
+ )
+ )
+ try:
+ chat = int(chat)
+ except:
+ chat = chat
+ await index_files_to_db(int(lst_msg_id), chat, msg, bot)
+
+
+@Client.on_message((filters.forwarded | (filters.regex("(https://)?(t\.me/|telegram\.me/|telegram\.dog/)(c/)?(\d+|[a-zA-Z_0-9]+)/(\d+)$")) & filters.text ) & filters.private & filters.incoming)
+async def send_for_index(bot, message):
+ if message.text:
+ regex = re.compile("(https://)?(t\.me/|telegram\.me/|telegram\.dog/)(c/)?(\d+|[a-zA-Z_0-9]+)/(\d+)$")
+ match = regex.match(message.text)
+ if not match:
+ return await message.reply('Invalid link')
+ chat_id = match.group(4)
+ last_msg_id = int(match.group(5))
+ if chat_id.isnumeric():
+ chat_id = int(("-100" + chat_id))
+ elif message.forward_from_chat.type == enums.ChatType.CHANNEL:
+ last_msg_id = message.forward_from_message_id
+ chat_id = message.forward_from_chat.username or message.forward_from_chat.id
+ else:
+ return
+ try:
+ await bot.get_chat(chat_id)
+ except ChannelInvalid:
+ return await message.reply('This may be a private channel / group. Make me an admin over there to index the files.')
+ except (UsernameInvalid, UsernameNotModified):
+ return await message.reply('Invalid Link specified.')
+ except Exception as e:
+ logger.exception(e)
+ return await message.reply(f'Errors - {e}')
+ try:
+ k = await bot.get_messages(chat_id, last_msg_id)
+ except:
+ return await message.reply('Make Sure That Iam An Admin In The Channel, if channel is private')
+ if k.empty:
+ return await message.reply('This may be group and iam not a admin of the group.')
+
+ if message.from_user.id in ADMINS:
+ buttons = [
+ [
+ InlineKeyboardButton('Yes',
+ callback_data=f'index#accept#{chat_id}#{last_msg_id}#{message.from_user.id}')
+ ],
+ [
+ InlineKeyboardButton('close', callback_data='close_data'),
+ ]
+ ]
+ reply_markup = InlineKeyboardMarkup(buttons)
+ return await message.reply(
+ f'Do you Want To Index This Channel/ Group ?\n\nChat ID/ Username: {chat_id}\nLast Message ID: {last_msg_id}',
+ reply_markup=reply_markup)
+
+ if type(chat_id) is int:
+ try:
+ link = (await bot.create_chat_invite_link(chat_id)).invite_link
+ except ChatAdminRequired:
+ return await message.reply('Make sure iam an admin in the chat and have permission to invite users.')
+ else:
+ link = f"@{message.forward_from_chat.username}"
+ buttons = [
+ [
+ InlineKeyboardButton('Accept Index',
+ callback_data=f'index#accept#{chat_id}#{last_msg_id}#{message.from_user.id}')
+ ],
+ [
+ InlineKeyboardButton('Reject Index',
+ callback_data=f'index#reject#{chat_id}#{message.id}#{message.from_user.id}'),
+ ]
+ ]
+ reply_markup = InlineKeyboardMarkup(buttons)
+ await bot.send_message(LOG_CHANNEL,
+ f'#IndexRequest\n\nBy : {message.from_user.mention} ({message.from_user.id})\nChat ID/ Username - {chat_id}\nLast Message ID - {last_msg_id}\nInviteLink - {link}',
+ reply_markup=reply_markup)
+ await message.reply('ThankYou For the Contribution, Wait For My Moderators to verify the files.')
+
+
+@Client.on_message(filters.command('setskip') & filters.user(ADMINS))
+async def set_skip_number(bot, message):
+ if ' ' in message.text:
+ _, skip = message.text.split(" ")
+ try:
+ skip = int(skip)
+ except:
+ return await message.reply("Skip number should be an integer.")
+ await message.reply(f"Successfully set SKIP number as {skip}")
+ temp.CURRENT = int(skip)
+ else:
+ await message.reply("Give me a skip number")
+
+
+async def index_files_to_db(lst_msg_id, chat, msg, bot):
+ total_files = 0
+ duplicate = 0
+ errors = 0
+ deleted = 0
+ no_media = 0
+ unsupported = 0
+ async with lock:
+ try:
+ current = temp.CURRENT
+ temp.CANCEL = False
+ async for message in bot.iter_messages(chat, lst_msg_id, temp.CURRENT):
+ if temp.CANCEL:
+ await msg.edit(f"Successfully Cancelled!!\n\nSaved {total_files} files to dataBase!\nDuplicate Files Skipped: {duplicate}\nDeleted Messages Skipped: {deleted}\nNon-Media messages skipped: {no_media + unsupported}(Unsupported Media - `{unsupported}` )\nErrors Occurred: {errors}")
+ break
+ current += 1
+ if current % 20 == 0:
+ can = [[InlineKeyboardButton('Cancel', callback_data='index_cancel')]]
+ reply = InlineKeyboardMarkup(can)
+ await msg.edit_text(
+ text=f"Total messages fetched: {current}\nTotal messages saved: {total_files}\nDuplicate Files Skipped: {duplicate}\nDeleted Messages Skipped: {deleted}\nNon-Media messages skipped: {no_media + unsupported}(Unsupported Media - `{unsupported}` )\nErrors Occurred: {errors}",
+ reply_markup=reply)
+ if message.empty:
+ deleted += 1
+ continue
+ elif not message.media:
+ no_media += 1
+ continue
+ elif message.media not in [enums.MessageMediaType.VIDEO, enums.MessageMediaType.AUDIO, enums.MessageMediaType.DOCUMENT]:
+ unsupported += 1
+ continue
+ media = getattr(message, message.media.value, None)
+ if not media:
+ unsupported += 1
+ continue
+ media.file_type = message.media.value
+ media.caption = message.caption
+ aynav, vnay = await save_file(media)
+ if aynav:
+ total_files += 1
+ elif vnay == 0:
+ duplicate += 1
+ elif vnay == 2:
+ errors += 1
+ except Exception as e:
+ logger.exception(e)
+ await msg.edit(f'Error: {e}')
+ else:
+ await msg.edit(f'Succesfully saved {total_files} to dataBase!\nDuplicate Files Skipped: {duplicate}\nDeleted Messages Skipped: {deleted}\nNon-Media messages skipped: {no_media + unsupported}(Unsupported Media - `{unsupported}` )\nErrors Occurred: {errors}')
From dfb58c10bebc97437e97481de9b8afb787bac977 Mon Sep 17 00:00:00 2001
From: Soul pc <119080077+soulpc@users.noreply.github.com>
Date: Sat, 16 Sep 2023 18:29:41 +0530
Subject: [PATCH 131/237] Create inline.py
---
plugins/inline.py | 113 ++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 113 insertions(+)
create mode 100644 plugins/inline.py
diff --git a/plugins/inline.py b/plugins/inline.py
new file mode 100644
index 0000000..f02e468
--- /dev/null
+++ b/plugins/inline.py
@@ -0,0 +1,113 @@
+import logging
+from pyrogram import Client, emoji, filters
+from pyrogram.errors.exceptions.bad_request_400 import QueryIdInvalid
+from pyrogram.types import InlineKeyboardButton, InlineKeyboardMarkup, InlineQueryResultCachedDocument, InlineQuery
+from database.ia_filterdb import get_search_results
+from utils import is_subscribed, get_size, temp
+from info import CACHE_TIME, AUTH_USERS, AUTH_CHANNEL, CUSTOM_FILE_CAPTION, REQ_CHANNEL
+
+logger = logging.getLogger(__name__)
+cache_time = 0 if AUTH_USERS or AUTH_CHANNEL else CACHE_TIME
+
+
+async def inline_users(query: InlineQuery):
+ if AUTH_USERS:
+ if query.from_user and query.from_user.id in AUTH_USERS:
+ return True
+ else:
+ return False
+ if query.from_user and query.from_user.id not in temp.BANNED_USERS:
+ return True
+ return False
+
+
+@Client.on_inline_query()
+async def answer(bot, query):
+ """Show search results for given inline query"""
+
+ if not await inline_users(query):
+ await query.answer(results=[],
+ cache_time=0,
+ switch_pm_text='okDa',
+ switch_pm_parameter="hehe")
+ return
+
+ if (AUTH_CHANNEL or REQ_CHANNEL) and not await is_subscribed(bot, query):
+ await query.answer(results=[],
+ cache_time=0,
+ switch_pm_text='You have to subscribe my channel to use the bot',
+ switch_pm_parameter="subscribe")
+ return
+
+ results = []
+ if '|' in query.query:
+ string, file_type = query.query.split('|', maxsplit=1)
+ string = string.strip()
+ file_type = file_type.strip().lower()
+ else:
+ string = query.query.strip()
+ file_type = None
+
+ offset = int(query.offset or 0)
+ reply_markup = get_reply_markup(query=string)
+ files, next_offset, total = await get_search_results(string,
+ file_type=file_type,
+ max_results=10,
+ offset=offset)
+
+ for file in files:
+ title = file.file_name
+ size = get_size(file.file_size)
+ f_caption = file.caption
+ if CUSTOM_FILE_CAPTION:
+ try:
+ f_caption = CUSTOM_FILE_CAPTION.format(file_name='' if title is None else title,
+ file_size='' if size is None else size,
+ file_caption='' if f_caption is None else f_caption)
+ except Exception as e:
+ logger.exception(e)
+ f_caption = f_caption
+ if f_caption is None:
+ f_caption = f"{file.file_name}"
+ results.append(
+ InlineQueryResultCachedDocument(
+ title=file.file_name,
+ document_file_id=file.file_id,
+ caption=f_caption,
+ description=f'Size: {get_size(file.file_size)}\nType: {file.file_type}',
+ reply_markup=reply_markup))
+
+ if results:
+ switch_pm_text = f"{emoji.FILE_FOLDER} Results - {total}"
+ if string:
+ switch_pm_text += f" for {string}"
+ try:
+ await query.answer(results=results,
+ is_personal=True,
+ cache_time=cache_time,
+ switch_pm_text=switch_pm_text,
+ switch_pm_parameter="start",
+ next_offset=str(next_offset))
+ except QueryIdInvalid:
+ pass
+ except Exception as e:
+ logging.exception(str(e))
+ else:
+ switch_pm_text = f'{emoji.CROSS_MARK} No results'
+ if string:
+ switch_pm_text += f' for "{string}"'
+
+ await query.answer(results=[],
+ is_personal=True,
+ cache_time=cache_time,
+ switch_pm_text=switch_pm_text,
+ switch_pm_parameter="okay")
+
+
+def get_reply_markup(query):
+ buttons = [
+ [
+ InlineKeyboardButton('Search again', switch_inline_query_current_chat=query)
+ ]
+ ]
+ return InlineKeyboardMarkup(buttons)
From f4c419f790354f63f6646b14c82ef183a213bc28 Mon Sep 17 00:00:00 2001
From: Soul pc <119080077+soulpc@users.noreply.github.com>
Date: Sat, 16 Sep 2023 19:02:23 +0530
Subject: [PATCH 132/237] Create delete_files.py
---
plugins/delete_files.py | 50 +++++++++++++++++++++++++++++++++++++++++
1 file changed, 50 insertions(+)
create mode 100644 plugins/delete_files.py
diff --git a/plugins/delete_files.py b/plugins/delete_files.py
new file mode 100644
index 0000000..dda816f
--- /dev/null
+++ b/plugins/delete_files.py
@@ -0,0 +1,50 @@
+#https://github.com/Joelkb/DQ-the-file-donor
+
+import re
+import logging
+from pyrogram import Client, filters
+from info import DELETE_CHANNELS
+from database.ia_filterdb import Media, unpack_new_file_id
+
+logger = logging.getLogger(__name__)
+
+media_filter = filters.document | filters.video | filters.audio
+
+
+@Client.on_message(filters.chat(DELETE_CHANNELS) & media_filter)
+async def deletemultiplemedia(bot, message):
+ """Delete Multiple files from database"""
+
+ for file_type in ("document", "video", "audio"):
+ media = getattr(message, file_type, None)
+ if media is not None:
+ break
+ else:
+ return
+
+ file_id, file_ref = unpack_new_file_id(media.file_id)
+
+ result = await Media.collection.delete_one({
+ '_id': file_id,
+ })
+ if result.deleted_count:
+ logger.info('File is successfully deleted from database.')
+ else:
+ file_name = re.sub(r"(_|\-|\.|\+)", " ", str(media.file_name))
+ result = await Media.collection.delete_many({
+ 'file_name': file_name,
+ 'file_size': media.file_size,
+ 'mime_type': media.mime_type
+ })
+ if result.deleted_count:
+ logger.info('File is successfully deleted from database.')
+ else:
+ result = await Media.collection.delete_many({
+ 'file_name': media.file_name,
+ 'file_size': media.file_size,
+ 'mime_type': media.mime_type
+ })
+ if result.deleted_count:
+ logger.info('File is successfully deleted from database.')
+ else:
+ logger.info('File not found in database.')
From 194ce3ee0e079f38b6ac2d05f619c57be8bc011d Mon Sep 17 00:00:00 2001
From: Soul pc <119080077+soulpc@users.noreply.github.com>
Date: Sat, 16 Sep 2023 19:37:02 +0530
Subject: [PATCH 133/237] Update inline.py
---
plugins/inline.py | 112 ----------------------------------------------
1 file changed, 112 deletions(-)
diff --git a/plugins/inline.py b/plugins/inline.py
index f02e468..8b13789 100644
--- a/plugins/inline.py
+++ b/plugins/inline.py
@@ -1,113 +1 @@
-import logging
-from pyrogram import Client, emoji, filters
-from pyrogram.errors.exceptions.bad_request_400 import QueryIdInvalid
-from pyrogram.types import InlineKeyboardButton, InlineKeyboardMarkup, InlineQueryResultCachedDocument, InlineQuery
-from database.ia_filterdb import get_search_results
-from utils import is_subscribed, get_size, temp
-from info import CACHE_TIME, AUTH_USERS, AUTH_CHANNEL, CUSTOM_FILE_CAPTION, REQ_CHANNEL
-logger = logging.getLogger(__name__)
-cache_time = 0 if AUTH_USERS or AUTH_CHANNEL else CACHE_TIME
-
-
-async def inline_users(query: InlineQuery):
- if AUTH_USERS:
- if query.from_user and query.from_user.id in AUTH_USERS:
- return True
- else:
- return False
- if query.from_user and query.from_user.id not in temp.BANNED_USERS:
- return True
- return False
-
-
-@Client.on_inline_query()
-async def answer(bot, query):
- """Show search results for given inline query"""
-
- if not await inline_users(query):
- await query.answer(results=[],
- cache_time=0,
- switch_pm_text='okDa',
- switch_pm_parameter="hehe")
- return
-
- if (AUTH_CHANNEL or REQ_CHANNEL) and not await is_subscribed(bot, query):
- await query.answer(results=[],
- cache_time=0,
- switch_pm_text='You have to subscribe my channel to use the bot',
- switch_pm_parameter="subscribe")
- return
-
- results = []
- if '|' in query.query:
- string, file_type = query.query.split('|', maxsplit=1)
- string = string.strip()
- file_type = file_type.strip().lower()
- else:
- string = query.query.strip()
- file_type = None
-
- offset = int(query.offset or 0)
- reply_markup = get_reply_markup(query=string)
- files, next_offset, total = await get_search_results(string,
- file_type=file_type,
- max_results=10,
- offset=offset)
-
- for file in files:
- title = file.file_name
- size = get_size(file.file_size)
- f_caption = file.caption
- if CUSTOM_FILE_CAPTION:
- try:
- f_caption = CUSTOM_FILE_CAPTION.format(file_name='' if title is None else title,
- file_size='' if size is None else size,
- file_caption='' if f_caption is None else f_caption)
- except Exception as e:
- logger.exception(e)
- f_caption = f_caption
- if f_caption is None:
- f_caption = f"{file.file_name}"
- results.append(
- InlineQueryResultCachedDocument(
- title=file.file_name,
- document_file_id=file.file_id,
- caption=f_caption,
- description=f'Size: {get_size(file.file_size)}\nType: {file.file_type}',
- reply_markup=reply_markup))
-
- if results:
- switch_pm_text = f"{emoji.FILE_FOLDER} Results - {total}"
- if string:
- switch_pm_text += f" for {string}"
- try:
- await query.answer(results=results,
- is_personal=True,
- cache_time=cache_time,
- switch_pm_text=switch_pm_text,
- switch_pm_parameter="start",
- next_offset=str(next_offset))
- except QueryIdInvalid:
- pass
- except Exception as e:
- logging.exception(str(e))
- else:
- switch_pm_text = f'{emoji.CROSS_MARK} No results'
- if string:
- switch_pm_text += f' for "{string}"'
-
- await query.answer(results=[],
- is_personal=True,
- cache_time=cache_time,
- switch_pm_text=switch_pm_text,
- switch_pm_parameter="okay")
-
-
-def get_reply_markup(query):
- buttons = [
- [
- InlineKeyboardButton('Search again', switch_inline_query_current_chat=query)
- ]
- ]
- return InlineKeyboardMarkup(buttons)
From e9318a79db1214a5e76b281cb99f5e343ce9f2b7 Mon Sep 17 00:00:00 2001
From: Soul pc <119080077+soulpc@users.noreply.github.com>
Date: Sat, 16 Sep 2023 19:37:36 +0530
Subject: [PATCH 134/237] Update commands.py
---
plugins/commands.py | 274 --------------------------------------------
1 file changed, 274 deletions(-)
diff --git a/plugins/commands.py b/plugins/commands.py
index ee6e7d4..8b13789 100644
--- a/plugins/commands.py
+++ b/plugins/commands.py
@@ -1,275 +1 @@
-import os
-import logging
-import random
-import asyncio
-from Script import script
-from pyrogram import Client, filters, enums
-from pyrogram.errors import ChatAdminRequired, FloodWait
-from pyrogram.types import InlineKeyboardButton, InlineKeyboardMarkup
-from database.ia_filterdb import Media, get_file_details, unpack_new_file_id
-from database.users_chats_db import db
-from info import CHANNELS, ADMINS, AUTH_CHANNEL, LOG_CHANNEL, PICS, BATCH_FILE_CAPTION, CUSTOM_FILE_CAPTION, PROTECT_CONTENT, MSG_ALRT, MAIN_CHANNEL
-from utils import get_settings, get_size, is_subscribed, save_group_settings, temp
-from database.connections_mdb import active_connection
-import re
-import json
-import base64
-logger = logging.getLogger(__name__)
-BATCH_FILES = {}
-
-@Client.on_message(filters.command("start") & filters.incoming)
-async def start(client, message):
- if message.chat.type in [enums.ChatType.GROUP, enums.ChatType.SUPERGROUP]:
- buttons = [
- [
- InlineKeyboardButton('🤖 Updates', url=(MAIN_CHANNEL))
- ],
- [
- InlineKeyboardButton('ʜᴇʟᴘ', url=f"https://t.me/{temp.U_NAME}?start=help"),
- ]
- ]
- reply_markup = InlineKeyboardMarkup(buttons)
- await message.reply(script.START_TXT.format(message.from_user.mention if message.from_user else message.chat.title, temp.U_NAME, temp.B_NAME), reply_markup=reply_markup)
- await asyncio.sleep(2) # 😢 https://github.com/EvamariaTG/EvaMaria/blob/master/plugins/p_ttishow.py#L17 😬 wait a bit, before checking.
- if not await db.get_chat(message.chat.id):
- total=await client.get_chat_members_count(message.chat.id)
- await client.send_message(LOG_CHANNEL, script.LOG_TEXT_G.format(message.chat.title, message.chat.id, total, "Unknown"))
- await db.add_chat(message.chat.id, message.chat.title)
- return
- if not await db.is_user_exist(message.from_user.id):
- await db.add_user(message.from_user.id, message.from_user.first_name)
- await client.send_message(LOG_CHANNEL, script.LOG_TEXT_P.format(message.from_user.id, message.from_user.mention))
- if len(message.command) != 2:
- buttons = [[
- InlineKeyboardButton("👥 𝗚𝗥𝗢𝗨𝗣 - 𝟭", url=f"https://t.me/ARAKAL_THERAVAD_MOVIES"),
- InlineKeyboardButton("👥𝗚𝗥𝗢𝗨𝗣 - 𝟮", url=f"https://t.me/ARAKAL_THERAVAD_GROUP_02")
- ],[
- InlineKeyboardButton("🖥 𝗡𝗘𝗪 𝗢𝗧𝗧 𝗨𝗣𝗗𝗔𝗧𝗘𝗦 🖥", url="https://t.me/oTTGArakalTheravadMovies")
- ],[
- InlineKeyboardButton("⭕️𝗚𝗘𝗧 𝗢𝗨𝗥 𝗖𝗛𝗔𝗡𝗡𝗘𝗟 𝗟𝗜𝗡𝗞𝗦 ⭕️", url="https://t.me/ARAKAL_THERAVAD_GROUP_LINKS")
- ]]
- reply_markup = InlineKeyboardMarkup(buttons)
- # m=await message.reply_sticker("CAACAgUAAxkBAAINdmL9uWnC3ptj9YnTjFU4YGr5dtzwAAIEAAPBJDExieUdbguzyBAeBA")
- # await asyncio.sleep(1)
- # await m.delete()
- await message.reply_photo(
- photo=random.choice(PICS),
- caption=script.SUR_TXT.format(message.from_user.mention, temp.U_NAME, temp.B_NAME),
- reply_markup=reply_markup,
- parse_mode=enums.ParseMode.HTML
- )
- return
- if AUTH_CHANNEL and not await is_subscribed(client, message):
- try:
- invite_link = await client.create_chat_invite_link(int(AUTH_CHANNEL))
- except ChatAdminRequired:
- logger.error("Make sure Bot is admin in Forcesub channel")
- return
- btn = [
- [
- InlineKeyboardButton(
- "🤖 Join Updates Channel", url=invite_link.invite_link
- )
- ]
- ]
-
- if message.command[1] != "subscribe":
- try:
- kk, file_id = message.command[1].split("_", 1)
- pre = 'checksubp' if kk == 'filep' else 'checksub'
- btn.append([InlineKeyboardButton(" 🔄 Try Again", callback_data=f"{pre}#{file_id}")])
- except (IndexError, ValueError):
- btn.append([InlineKeyboardButton(" 🔄 Try Again", url=f"https://t.me/{temp.U_NAME}?start={message.command[1]}")])
- await client.send_message(
- chat_id=message.from_user.id,
- text="**Please Join My Updates Channel to use this Bot!**",
- reply_markup=InlineKeyboardMarkup(btn),
- parse_mode=enums.ParseMode.MARKDOWN
- )
- return
- if len(message.command) == 2 and message.command[1] in ["subscribe", "error", "okay", "help"]:
- buttons = [[
- InlineKeyboardButton('sᴜʀᴘʀɪsᴇ', callback_data='start')
- ]]
- reply_markup = InlineKeyboardMarkup(buttons)
- await message.reply_photo(
- photo=random.choice(PICS),
- caption=script.SUR_TXT.format(message.from_user.mention, temp.U_NAME, temp.B_NAME),
- reply_markup=reply_markup,
- parse_mode=enums.ParseMode.HTML
- )
- return
- data = message.command[1]
- try:
- pre, file_id = data.split('_', 1)
- except:
- file_id = data
- pre = ""
- if data.split("-", 1)[0] == "BATCH":
- sts = await message.reply("Please wait")
- file_id = data.split("-", 1)[1]
- msgs = BATCH_FILES.get(file_id)
- if not msgs:
- file = await client.download_media(file_id)
- try:
- with open(file) as file_data:
- msgs=json.loads(file_data.read())
- except:
- await sts.edit("FAILED")
- return await client.send_message(LOG_CHANNEL, "UNABLE TO OPEN FILE.")
- os.remove(file)
- BATCH_FILES[file_id] = msgs
- for msg in msgs:
- title = msg.get("title")
- size=get_size(int(msg.get("size", 0)))
- f_caption=msg.get("caption", "")
- if BATCH_FILE_CAPTION:
- try:
- f_caption=BATCH_FILE_CAPTION.format(file_name= '' if title is None else title, file_size='' if size is None else size, file_caption='' if f_caption is None else f_caption)
- except Exception as e:
- logger.exception(e)
- f_caption=f_caption
- if f_caption is None:
- f_caption = f"{title}"
- try:
- await client.send_cached_media(
- chat_id=message.from_user.id,
- file_id=msg.get("file_id"),
- caption=f_caption,
- protect_content=msg.get('protect', False),
- )
- except FloodWait as e:
- await asyncio.sleep(e.x)
- logger.warning(f"Floodwait of {e.x} sec.")
- await client.send_cached_media(
- chat_id=message.from_user.id,
- file_id=msg.get("file_id"),
- caption=f_caption,
- protect_content=msg.get('protect', False),
- )
- except Exception as e:
- logger.warning(e, exc_info=True)
- continue
- await asyncio.sleep(1)
- await sts.delete()
- return
- elif data.split("-", 1)[0] == "DSTORE":
- sts = await message.reply("Please wait")
- b_string = data.split("-", 1)[1]
- decoded = (base64.urlsafe_b64decode(b_string + "=" * (-len(b_string) % 4))).decode("ascii")
- try:
- f_msg_id, l_msg_id, f_chat_id, protect = decoded.split("_", 3)
- except:
- f_msg_id, l_msg_id, f_chat_id = decoded.split("_", 2)
- protect = "/pbatch" if PROTECT_CONTENT else "batch"
- diff = int(l_msg_id) - int(f_msg_id)
- async for msg in client.iter_messages(int(f_chat_id), int(l_msg_id), int(f_msg_id)):
- if msg.media:
- media = getattr(msg, msg.media)
- if BATCH_FILE_CAPTION:
- try:
- f_caption=BATCH_FILE_CAPTION.format(file_name=getattr(media, 'file_name', ''), file_size=getattr(media, 'file_size', ''), file_caption=getattr(msg, 'caption', ''))
- except Exception as e:
- logger.exception(e)
- f_caption = getattr(msg, 'caption', '')
- else:
- media = getattr(msg, msg.media)
- file_name = getattr(media, 'file_name', '')
- f_caption = getattr(msg, 'caption', file_name)
- try:
- await msg.copy(message.chat.id, caption=f_caption, protect_content=True if protect == "/pbatch" else False)
- except FloodWait as e:
- await asyncio.sleep(e.x)
- await msg.copy(message.chat.id, caption=f_caption, protect_content=True if protect == "/pbatch" else False)
- except Exception as e:
- logger.exception(e)
- continue
- elif msg.empty:
- continue
- else:
- try:
- await msg.copy(message.chat.id, protect_content=True if protect == "/pbatch" else False)
- except FloodWait as e:
- await asyncio.sleep(e.x)
- await msg.copy(message.chat.id, protect_content=True if protect == "/pbatch" else False)
- except Exception as e:
- logger.exception(e)
- continue
- await asyncio.sleep(1)
- return await sts.delete()
-
-
- files_ = await get_file_details(file_id)
- if not files_:
- pre, file_id = ((base64.urlsafe_b64decode(data + "=" * (-len(data) % 4))).decode("ascii")).split("_", 1)
- try:
- msg = await client.send_cached_media(
- chat_id=message.from_user.id,
- file_id=file_id,
- protect_content=True if pre == 'filep' else False,
- )
- filetype = msg.media
- file = getattr(msg, filetype)
- title = file.file_name
- size=get_size(file.file_size)
- f_caption = f"{title}"
- if CUSTOM_FILE_CAPTION:
- try:
- f_caption=CUSTOM_FILE_CAPTION.format(file_name= '' if title is None else title, file_size='' if size is None else size, file_caption='')
- except:
- return
- await msg.edit_caption(f_caption)
- return
- except:
- pass
- return await message.reply('No such file exist.')
- files = files_[0]
- title = files.file_name
- size=get_size(files.file_size)
- f_caption=files.caption
- if CUSTOM_FILE_CAPTION:
- try:
- f_caption=CUSTOM_FILE_CAPTION.format(file_name= '' if title is None else title, file_size='' if size is None else size, file_caption='' if f_caption is None else f_caption)
- except Exception as e:
- logger.exception(e)
- f_caption=f_caption
- if f_caption is None:
- f_caption = f"{files.file_name}"
- await client.send_cached_media(
- chat_id=message.from_user.id,
- file_id=file_id,
- caption=f_caption,
- reply_markup=InlineKeyboardMarkup( [ [ InlineKeyboardButton('🔰 JOIN ❗️C H A N N E L 🔰', url=(MAIN_CHANNEL)) ] ] ),
- protect_content=True if pre == 'filep' else False,
- )
-
-
-
-@Client.on_message(filters.command('deleteall') & filters.user(ADMINS))
-async def delete_all_index(bot, message):
- await message.reply_text(
- 'This will delete all indexed files.\nDo you want to continue??',
- reply_markup=InlineKeyboardMarkup(
- [
- [
- InlineKeyboardButton(
- text="YES", callback_data="autofilter_delete"
- )
- ],
- [
- InlineKeyboardButton(
- text="CANCEL", callback_data="close_data"
- )
- ],
- ]
- ),
- quote=True,
- )
-
-
-@Client.on_callback_query(filters.regex(r'^autofilter_delete'))
-async def delete_all_index_confirm(bot, message):
- await Media.collection.drop()
- await message.answer(MSG_ALRT)
- await message.message.edit('Succesfully Deleted All The Indexed Files.')
From 8c09b46d99ef170c534136eb154dc9e91881b146 Mon Sep 17 00:00:00 2001
From: Soul pc <119080077+soulpc@users.noreply.github.com>
Date: Sat, 16 Sep 2023 19:45:16 +0530
Subject: [PATCH 135/237] Update commands.py
---
plugins/commands.py | 17 +++++++++++++++++
1 file changed, 17 insertions(+)
diff --git a/plugins/commands.py b/plugins/commands.py
index 8b13789..4925b67 100644
--- a/plugins/commands.py
+++ b/plugins/commands.py
@@ -1 +1,18 @@
+import os
+import logging
+import random
+import asyncio
+from Script import script
+from pyrogram import Client, filters, enums
+from pyrogram.errors import ChatAdminRequired, FloodWait
+from pyrogram.types import InlineKeyboardButton, InlineKeyboardMarkup
+from database.ia_filterdb import Media, get_file_details, unpack_new_file_id
+from database.users_chats_db import db
+from info import CHANNELS, ADMINS, AUTH_CHANNEL, LOG_CHANNEL, PICS, BATCH_FILE_CAPTION, CUSTOM_FILE_CAPTION, PROTECT_CONTENT, MSG_ALRT, MAIN_CHANNEL
+from utils import get_settings, get_size, is_subscribed, save_group_settings, temp
+from database.connections_mdb import active_connection
+import re
+import json
+import base64
+logger = logging.getLogger(__name__)
From f4b75a10112c4fdfc0f9b99f07c1332e78bdb15a Mon Sep 17 00:00:00 2001
From: Soul pc <119080077+soulpc@users.noreply.github.com>
Date: Sat, 16 Sep 2023 19:46:24 +0530
Subject: [PATCH 136/237] Update commands.py
---
plugins/commands.py | 19 +++++++++++++++++++
1 file changed, 19 insertions(+)
diff --git a/plugins/commands.py b/plugins/commands.py
index 4925b67..700a083 100644
--- a/plugins/commands.py
+++ b/plugins/commands.py
@@ -16,3 +16,22 @@
import base64
logger = logging.getLogger(__name__)
+BATCH_FILES = {}
+
+@Client.on_message(filters.command("start") & filters.incoming)
+async def start(client, message):
+ if message.chat.type in [enums.ChatType.GROUP, enums.ChatType.SUPERGROUP]:
+ buttons = [
+ [
+ InlineKeyboardButton('🤖 Updates', url=(MAIN_CHANNEL))
+ ],
+ [
+ InlineKeyboardButton('ʜᴇʟᴘ', url=f"https://t.me/{temp.U_NAME}?start=help"),
+ ]
+ ]
+ reply_markup = InlineKeyboardMarkup(buttons)
+ await message.reply(script.START_TXT.format(message.from_user.mention if message.from_user else message.chat.title, temp.U_NAME, temp.B_NAME), reply_markup=reply_markup)
+ await asyncio.sleep(2) # 😢 https://github.com/EvamariaTG/EvaMaria/blob/master/plugins/p_ttishow.py#L17 😬 wait a bit, before checking.
+ if not await db.get_chat(message.chat.id):
+ total=await client.get_chat_members_count(message.chat.id)
+ await client.send_message(LOG_CHANNEL, script.LOG_TEXT_G.format(message.chat.title, message.chat.id, total, "Unknown"))
From ff9f7438f0974dc05f77bd762bc09292120856a9 Mon Sep 17 00:00:00 2001
From: Soul pc <119080077+soulpc@users.noreply.github.com>
Date: Sat, 16 Sep 2023 19:47:40 +0530
Subject: [PATCH 137/237] Update commands.py
---
plugins/commands.py | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/plugins/commands.py b/plugins/commands.py
index 700a083..4a80bc9 100644
--- a/plugins/commands.py
+++ b/plugins/commands.py
@@ -35,3 +35,16 @@ async def start(client, message):
if not await db.get_chat(message.chat.id):
total=await client.get_chat_members_count(message.chat.id)
await client.send_message(LOG_CHANNEL, script.LOG_TEXT_G.format(message.chat.title, message.chat.id, total, "Unknown"))
+await db.add_chat(message.chat.id, message.chat.title)
+ return
+ if not await db.is_user_exist(message.from_user.id):
+ await db.add_user(message.from_user.id, message.from_user.first_name)
+ await client.send_message(LOG_CHANNEL, script.LOG_TEXT_P.format(message.from_user.id, message.from_user.mention))
+ if len(message.command) != 2:
+ buttons = [[
+ InlineKeyboardButton("👥 𝗚𝗥𝗢𝗨𝗣 - 𝟭", url=f"https://t.me/ARAKAL_THERAVAD_MOVIES"),
+ InlineKeyboardButton("👥𝗚𝗥𝗢𝗨𝗣 - 𝟮", url=f"https://t.me/ARAKAL_THERAVAD_GROUP_02")
+ ],[
+ InlineKeyboardButton("🖥 𝗡𝗘𝗪 𝗢𝗧𝗧 𝗨𝗣𝗗𝗔𝗧𝗘𝗦 🖥", url="https://t.me/oTTGArakalTheravadMovies")
+ ],[
+ InlineKeyboardButton("⭕️𝗚𝗘𝗧 𝗢𝗨𝗥 𝗖𝗛𝗔𝗡𝗡𝗘𝗟 𝗟𝗜𝗡𝗞𝗦 ⭕️", url="https://t.me/ARAKAL_THERAVAD_GROUP_LINKS")
From 40718aadd6b14b3758c9541884b4b93df98a0b2e Mon Sep 17 00:00:00 2001
From: Soul pc <119080077+soulpc@users.noreply.github.com>
Date: Sat, 16 Sep 2023 19:50:28 +0530
Subject: [PATCH 138/237] Update commands.py
---
plugins/commands.py | 227 +++++++++++++++++++++++++++++++++++++++++++-
1 file changed, 226 insertions(+), 1 deletion(-)
diff --git a/plugins/commands.py b/plugins/commands.py
index 4a80bc9..ee6e7d4 100644
--- a/plugins/commands.py
+++ b/plugins/commands.py
@@ -35,7 +35,7 @@ async def start(client, message):
if not await db.get_chat(message.chat.id):
total=await client.get_chat_members_count(message.chat.id)
await client.send_message(LOG_CHANNEL, script.LOG_TEXT_G.format(message.chat.title, message.chat.id, total, "Unknown"))
-await db.add_chat(message.chat.id, message.chat.title)
+ await db.add_chat(message.chat.id, message.chat.title)
return
if not await db.is_user_exist(message.from_user.id):
await db.add_user(message.from_user.id, message.from_user.first_name)
@@ -48,3 +48,228 @@ async def start(client, message):
InlineKeyboardButton("🖥 𝗡𝗘𝗪 𝗢𝗧𝗧 𝗨𝗣𝗗𝗔𝗧𝗘𝗦 🖥", url="https://t.me/oTTGArakalTheravadMovies")
],[
InlineKeyboardButton("⭕️𝗚𝗘𝗧 𝗢𝗨𝗥 𝗖𝗛𝗔𝗡𝗡𝗘𝗟 𝗟𝗜𝗡𝗞𝗦 ⭕️", url="https://t.me/ARAKAL_THERAVAD_GROUP_LINKS")
+ ]]
+ reply_markup = InlineKeyboardMarkup(buttons)
+ # m=await message.reply_sticker("CAACAgUAAxkBAAINdmL9uWnC3ptj9YnTjFU4YGr5dtzwAAIEAAPBJDExieUdbguzyBAeBA")
+ # await asyncio.sleep(1)
+ # await m.delete()
+ await message.reply_photo(
+ photo=random.choice(PICS),
+ caption=script.SUR_TXT.format(message.from_user.mention, temp.U_NAME, temp.B_NAME),
+ reply_markup=reply_markup,
+ parse_mode=enums.ParseMode.HTML
+ )
+ return
+ if AUTH_CHANNEL and not await is_subscribed(client, message):
+ try:
+ invite_link = await client.create_chat_invite_link(int(AUTH_CHANNEL))
+ except ChatAdminRequired:
+ logger.error("Make sure Bot is admin in Forcesub channel")
+ return
+ btn = [
+ [
+ InlineKeyboardButton(
+ "🤖 Join Updates Channel", url=invite_link.invite_link
+ )
+ ]
+ ]
+
+ if message.command[1] != "subscribe":
+ try:
+ kk, file_id = message.command[1].split("_", 1)
+ pre = 'checksubp' if kk == 'filep' else 'checksub'
+ btn.append([InlineKeyboardButton(" 🔄 Try Again", callback_data=f"{pre}#{file_id}")])
+ except (IndexError, ValueError):
+ btn.append([InlineKeyboardButton(" 🔄 Try Again", url=f"https://t.me/{temp.U_NAME}?start={message.command[1]}")])
+ await client.send_message(
+ chat_id=message.from_user.id,
+ text="**Please Join My Updates Channel to use this Bot!**",
+ reply_markup=InlineKeyboardMarkup(btn),
+ parse_mode=enums.ParseMode.MARKDOWN
+ )
+ return
+ if len(message.command) == 2 and message.command[1] in ["subscribe", "error", "okay", "help"]:
+ buttons = [[
+ InlineKeyboardButton('sᴜʀᴘʀɪsᴇ', callback_data='start')
+ ]]
+ reply_markup = InlineKeyboardMarkup(buttons)
+ await message.reply_photo(
+ photo=random.choice(PICS),
+ caption=script.SUR_TXT.format(message.from_user.mention, temp.U_NAME, temp.B_NAME),
+ reply_markup=reply_markup,
+ parse_mode=enums.ParseMode.HTML
+ )
+ return
+ data = message.command[1]
+ try:
+ pre, file_id = data.split('_', 1)
+ except:
+ file_id = data
+ pre = ""
+ if data.split("-", 1)[0] == "BATCH":
+ sts = await message.reply("Please wait")
+ file_id = data.split("-", 1)[1]
+ msgs = BATCH_FILES.get(file_id)
+ if not msgs:
+ file = await client.download_media(file_id)
+ try:
+ with open(file) as file_data:
+ msgs=json.loads(file_data.read())
+ except:
+ await sts.edit("FAILED")
+ return await client.send_message(LOG_CHANNEL, "UNABLE TO OPEN FILE.")
+ os.remove(file)
+ BATCH_FILES[file_id] = msgs
+ for msg in msgs:
+ title = msg.get("title")
+ size=get_size(int(msg.get("size", 0)))
+ f_caption=msg.get("caption", "")
+ if BATCH_FILE_CAPTION:
+ try:
+ f_caption=BATCH_FILE_CAPTION.format(file_name= '' if title is None else title, file_size='' if size is None else size, file_caption='' if f_caption is None else f_caption)
+ except Exception as e:
+ logger.exception(e)
+ f_caption=f_caption
+ if f_caption is None:
+ f_caption = f"{title}"
+ try:
+ await client.send_cached_media(
+ chat_id=message.from_user.id,
+ file_id=msg.get("file_id"),
+ caption=f_caption,
+ protect_content=msg.get('protect', False),
+ )
+ except FloodWait as e:
+ await asyncio.sleep(e.x)
+ logger.warning(f"Floodwait of {e.x} sec.")
+ await client.send_cached_media(
+ chat_id=message.from_user.id,
+ file_id=msg.get("file_id"),
+ caption=f_caption,
+ protect_content=msg.get('protect', False),
+ )
+ except Exception as e:
+ logger.warning(e, exc_info=True)
+ continue
+ await asyncio.sleep(1)
+ await sts.delete()
+ return
+ elif data.split("-", 1)[0] == "DSTORE":
+ sts = await message.reply("Please wait")
+ b_string = data.split("-", 1)[1]
+ decoded = (base64.urlsafe_b64decode(b_string + "=" * (-len(b_string) % 4))).decode("ascii")
+ try:
+ f_msg_id, l_msg_id, f_chat_id, protect = decoded.split("_", 3)
+ except:
+ f_msg_id, l_msg_id, f_chat_id = decoded.split("_", 2)
+ protect = "/pbatch" if PROTECT_CONTENT else "batch"
+ diff = int(l_msg_id) - int(f_msg_id)
+ async for msg in client.iter_messages(int(f_chat_id), int(l_msg_id), int(f_msg_id)):
+ if msg.media:
+ media = getattr(msg, msg.media)
+ if BATCH_FILE_CAPTION:
+ try:
+ f_caption=BATCH_FILE_CAPTION.format(file_name=getattr(media, 'file_name', ''), file_size=getattr(media, 'file_size', ''), file_caption=getattr(msg, 'caption', ''))
+ except Exception as e:
+ logger.exception(e)
+ f_caption = getattr(msg, 'caption', '')
+ else:
+ media = getattr(msg, msg.media)
+ file_name = getattr(media, 'file_name', '')
+ f_caption = getattr(msg, 'caption', file_name)
+ try:
+ await msg.copy(message.chat.id, caption=f_caption, protect_content=True if protect == "/pbatch" else False)
+ except FloodWait as e:
+ await asyncio.sleep(e.x)
+ await msg.copy(message.chat.id, caption=f_caption, protect_content=True if protect == "/pbatch" else False)
+ except Exception as e:
+ logger.exception(e)
+ continue
+ elif msg.empty:
+ continue
+ else:
+ try:
+ await msg.copy(message.chat.id, protect_content=True if protect == "/pbatch" else False)
+ except FloodWait as e:
+ await asyncio.sleep(e.x)
+ await msg.copy(message.chat.id, protect_content=True if protect == "/pbatch" else False)
+ except Exception as e:
+ logger.exception(e)
+ continue
+ await asyncio.sleep(1)
+ return await sts.delete()
+
+
+ files_ = await get_file_details(file_id)
+ if not files_:
+ pre, file_id = ((base64.urlsafe_b64decode(data + "=" * (-len(data) % 4))).decode("ascii")).split("_", 1)
+ try:
+ msg = await client.send_cached_media(
+ chat_id=message.from_user.id,
+ file_id=file_id,
+ protect_content=True if pre == 'filep' else False,
+ )
+ filetype = msg.media
+ file = getattr(msg, filetype)
+ title = file.file_name
+ size=get_size(file.file_size)
+ f_caption = f"{title}"
+ if CUSTOM_FILE_CAPTION:
+ try:
+ f_caption=CUSTOM_FILE_CAPTION.format(file_name= '' if title is None else title, file_size='' if size is None else size, file_caption='')
+ except:
+ return
+ await msg.edit_caption(f_caption)
+ return
+ except:
+ pass
+ return await message.reply('No such file exist.')
+ files = files_[0]
+ title = files.file_name
+ size=get_size(files.file_size)
+ f_caption=files.caption
+ if CUSTOM_FILE_CAPTION:
+ try:
+ f_caption=CUSTOM_FILE_CAPTION.format(file_name= '' if title is None else title, file_size='' if size is None else size, file_caption='' if f_caption is None else f_caption)
+ except Exception as e:
+ logger.exception(e)
+ f_caption=f_caption
+ if f_caption is None:
+ f_caption = f"{files.file_name}"
+ await client.send_cached_media(
+ chat_id=message.from_user.id,
+ file_id=file_id,
+ caption=f_caption,
+ reply_markup=InlineKeyboardMarkup( [ [ InlineKeyboardButton('🔰 JOIN ❗️C H A N N E L 🔰', url=(MAIN_CHANNEL)) ] ] ),
+ protect_content=True if pre == 'filep' else False,
+ )
+
+
+
+@Client.on_message(filters.command('deleteall') & filters.user(ADMINS))
+async def delete_all_index(bot, message):
+ await message.reply_text(
+ 'This will delete all indexed files.\nDo you want to continue??',
+ reply_markup=InlineKeyboardMarkup(
+ [
+ [
+ InlineKeyboardButton(
+ text="YES", callback_data="autofilter_delete"
+ )
+ ],
+ [
+ InlineKeyboardButton(
+ text="CANCEL", callback_data="close_data"
+ )
+ ],
+ ]
+ ),
+ quote=True,
+ )
+
+
+@Client.on_callback_query(filters.regex(r'^autofilter_delete'))
+async def delete_all_index_confirm(bot, message):
+ await Media.collection.drop()
+ await message.answer(MSG_ALRT)
+ await message.message.edit('Succesfully Deleted All The Indexed Files.')
From ced90ca0c9d758bcc0617da8cfaaf3237ee4529f Mon Sep 17 00:00:00 2001
From: Soul pc <119080077+soulpc@users.noreply.github.com>
Date: Sat, 16 Sep 2023 20:23:37 +0530
Subject: [PATCH 139/237] Update commands.py
---
plugins/commands.py | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/plugins/commands.py b/plugins/commands.py
index ee6e7d4..ce4b7de 100644
--- a/plugins/commands.py
+++ b/plugins/commands.py
@@ -44,7 +44,10 @@ async def start(client, message):
buttons = [[
InlineKeyboardButton("👥 𝗚𝗥𝗢𝗨𝗣 - 𝟭", url=f"https://t.me/ARAKAL_THERAVAD_MOVIES"),
InlineKeyboardButton("👥𝗚𝗥𝗢𝗨𝗣 - 𝟮", url=f"https://t.me/ARAKAL_THERAVAD_GROUP_02")
- ],[
+ ],[
+ InlineKeyboardButton("👥 𝗚𝗥𝗢𝗨𝗣 - 𝟭", url=f"https://t.me/ARAKAL_THERAVAD_MOVIES"),
+ InlineKeyboardButton("👥𝗚𝗥𝗢𝗨𝗣 - 𝟮", url=f"https://t.me/ARAKAL_THERAVAD_GROUP_02")
+ ],[
InlineKeyboardButton("🖥 𝗡𝗘𝗪 𝗢𝗧𝗧 𝗨𝗣𝗗𝗔𝗧𝗘𝗦 🖥", url="https://t.me/oTTGArakalTheravadMovies")
],[
InlineKeyboardButton("⭕️𝗚𝗘𝗧 𝗢𝗨𝗥 𝗖𝗛𝗔𝗡𝗡𝗘𝗟 𝗟𝗜𝗡𝗞𝗦 ⭕️", url="https://t.me/ARAKAL_THERAVAD_GROUP_LINKS")
From 5acc0b3c9b28b93d91931bda28b87f7de566f16c Mon Sep 17 00:00:00 2001
From: Soul pc <119080077+soulpc@users.noreply.github.com>
Date: Sun, 17 Sep 2023 08:13:31 +0530
Subject: [PATCH 140/237] Update commands.py
---
plugins/commands.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/plugins/commands.py b/plugins/commands.py
index ce4b7de..1c10427 100644
--- a/plugins/commands.py
+++ b/plugins/commands.py
@@ -45,8 +45,8 @@ async def start(client, message):
InlineKeyboardButton("👥 𝗚𝗥𝗢𝗨𝗣 - 𝟭", url=f"https://t.me/ARAKAL_THERAVAD_MOVIES"),
InlineKeyboardButton("👥𝗚𝗥𝗢𝗨𝗣 - 𝟮", url=f"https://t.me/ARAKAL_THERAVAD_GROUP_02")
],[
- InlineKeyboardButton("👥 𝗚𝗥𝗢𝗨𝗣 - 𝟭", url=f"https://t.me/ARAKAL_THERAVAD_MOVIES"),
- InlineKeyboardButton("👥𝗚𝗥𝗢𝗨𝗣 - 𝟮", url=f"https://t.me/ARAKAL_THERAVAD_GROUP_02")
+ InlineKeyboardButton("👥 𝗚𝗥𝗢𝗨𝗣 - 𝟯", url=f"https://t.me/ARAKAL_THERAVAD_GROUP_03"),
+ InlineKeyboardButton("👥𝗚𝗥𝗢𝗨𝗣 - 𝟰", url=f"https://t.me/ARAKAL_THERAVAD_GROUP_04")
],[
InlineKeyboardButton("🖥 𝗡𝗘𝗪 𝗢𝗧𝗧 𝗨𝗣𝗗𝗔𝗧𝗘𝗦 🖥", url="https://t.me/oTTGArakalTheravadMovies")
],[
From 7a1d70cc3592a90ba60179062ae71deea9120eb0 Mon Sep 17 00:00:00 2001
From: Soul pc <119080077+soulpc@users.noreply.github.com>
Date: Mon, 18 Sep 2023 10:12:09 +0530
Subject: [PATCH 141/237] Delete plugins/plugins directory
---
plugins/plugins/index.py | 185 ---------------------------------------
1 file changed, 185 deletions(-)
delete mode 100644 plugins/plugins/index.py
diff --git a/plugins/plugins/index.py b/plugins/plugins/index.py
deleted file mode 100644
index df5cf10..0000000
--- a/plugins/plugins/index.py
+++ /dev/null
@@ -1,185 +0,0 @@
-import logging
-import asyncio
-from pyrogram import Client, filters, enums
-from pyrogram.errors import FloodWait
-from pyrogram.errors.exceptions.bad_request_400 import ChannelInvalid, ChatAdminRequired, UsernameInvalid, UsernameNotModified
-from info import ADMINS
-from info import INDEX_REQ_CHANNEL as LOG_CHANNEL
-from database.ia_filterdb import save_file
-from pyrogram.types import InlineKeyboardMarkup, InlineKeyboardButton
-from utils import temp
-import re
-logger = logging.getLogger(__name__)
-logger.setLevel(logging.INFO)
-lock = asyncio.Lock()
-
-
-@Client.on_callback_query(filters.regex(r'^index'))
-async def index_files(bot, query):
- if query.data.startswith('index_cancel'):
- temp.CANCEL = True
- return await query.answer("Cancelling Indexing")
- _, raju, chat, lst_msg_id, from_user = query.data.split("#")
- if raju == 'reject':
- await query.message.delete()
- await bot.send_message(int(from_user),
- f'Your Submission for indexing {chat} has been decliened by our moderators.',
- reply_to_message_id=int(lst_msg_id))
- return
-
- if lock.locked():
- return await query.answer('Wait until previous process complete.', show_alert=True)
- msg = query.message
-
- await query.answer('Processing...⏳', show_alert=True)
- if int(from_user) not in ADMINS:
- await bot.send_message(int(from_user),
- f'Your Submission for indexing {chat} has been accepted by our moderators and will be added soon.',
- reply_to_message_id=int(lst_msg_id))
- await msg.edit(
- "Starting Indexing",
- reply_markup=InlineKeyboardMarkup(
- [[InlineKeyboardButton('Cancel', callback_data='index_cancel')]]
- )
- )
- try:
- chat = int(chat)
- except:
- chat = chat
- await index_files_to_db(int(lst_msg_id), chat, msg, bot)
-
-
-@Client.on_message((filters.forwarded | (filters.regex("(https://)?(t\.me/|telegram\.me/|telegram\.dog/)(c/)?(\d+|[a-zA-Z_0-9]+)/(\d+)$")) & filters.text ) & filters.private & filters.incoming)
-async def send_for_index(bot, message):
- if message.text:
- regex = re.compile("(https://)?(t\.me/|telegram\.me/|telegram\.dog/)(c/)?(\d+|[a-zA-Z_0-9]+)/(\d+)$")
- match = regex.match(message.text)
- if not match:
- return await message.reply('Invalid link')
- chat_id = match.group(4)
- last_msg_id = int(match.group(5))
- if chat_id.isnumeric():
- chat_id = int(("-100" + chat_id))
- elif message.forward_from_chat.type == enums.ChatType.CHANNEL:
- last_msg_id = message.forward_from_message_id
- chat_id = message.forward_from_chat.username or message.forward_from_chat.id
- else:
- return
- try:
- await bot.get_chat(chat_id)
- except ChannelInvalid:
- return await message.reply('This may be a private channel / group. Make me an admin over there to index the files.')
- except (UsernameInvalid, UsernameNotModified):
- return await message.reply('Invalid Link specified.')
- except Exception as e:
- logger.exception(e)
- return await message.reply(f'Errors - {e}')
- try:
- k = await bot.get_messages(chat_id, last_msg_id)
- except:
- return await message.reply('Make Sure That Iam An Admin In The Channel, if channel is private')
- if k.empty:
- return await message.reply('This may be group and iam not a admin of the group.')
-
- if message.from_user.id in ADMINS:
- buttons = [
- [
- InlineKeyboardButton('Yes',
- callback_data=f'index#accept#{chat_id}#{last_msg_id}#{message.from_user.id}')
- ],
- [
- InlineKeyboardButton('close', callback_data='close_data'),
- ]
- ]
- reply_markup = InlineKeyboardMarkup(buttons)
- return await message.reply(
- f'Do you Want To Index This Channel/ Group ?\n\nChat ID/ Username: {chat_id}\nLast Message ID: {last_msg_id}',
- reply_markup=reply_markup)
-
- if type(chat_id) is int:
- try:
- link = (await bot.create_chat_invite_link(chat_id)).invite_link
- except ChatAdminRequired:
- return await message.reply('Make sure iam an admin in the chat and have permission to invite users.')
- else:
- link = f"@{message.forward_from_chat.username}"
- buttons = [
- [
- InlineKeyboardButton('Accept Index',
- callback_data=f'index#accept#{chat_id}#{last_msg_id}#{message.from_user.id}')
- ],
- [
- InlineKeyboardButton('Reject Index',
- callback_data=f'index#reject#{chat_id}#{message.id}#{message.from_user.id}'),
- ]
- ]
- reply_markup = InlineKeyboardMarkup(buttons)
- await bot.send_message(LOG_CHANNEL,
- f'#IndexRequest\n\nBy : {message.from_user.mention} ({message.from_user.id})\nChat ID/ Username - {chat_id}\nLast Message ID - {last_msg_id}\nInviteLink - {link}',
- reply_markup=reply_markup)
- await message.reply('ThankYou For the Contribution, Wait For My Moderators to verify the files.')
-
-
-@Client.on_message(filters.command('setskip') & filters.user(ADMINS))
-async def set_skip_number(bot, message):
- if ' ' in message.text:
- _, skip = message.text.split(" ")
- try:
- skip = int(skip)
- except:
- return await message.reply("Skip number should be an integer.")
- await message.reply(f"Successfully set SKIP number as {skip}")
- temp.CURRENT = int(skip)
- else:
- await message.reply("Give me a skip number")
-
-
-async def index_files_to_db(lst_msg_id, chat, msg, bot):
- total_files = 0
- duplicate = 0
- errors = 0
- deleted = 0
- no_media = 0
- unsupported = 0
- async with lock:
- try:
- current = temp.CURRENT
- temp.CANCEL = False
- async for message in bot.iter_messages(chat, lst_msg_id, temp.CURRENT):
- if temp.CANCEL:
- await msg.edit(f"Successfully Cancelled!!\n\nSaved {total_files} files to dataBase!\nDuplicate Files Skipped: {duplicate}\nDeleted Messages Skipped: {deleted}\nNon-Media messages skipped: {no_media + unsupported}(Unsupported Media - `{unsupported}` )\nErrors Occurred: {errors}")
- break
- current += 1
- if current % 20 == 0:
- can = [[InlineKeyboardButton('Cancel', callback_data='index_cancel')]]
- reply = InlineKeyboardMarkup(can)
- await msg.edit_text(
- text=f"Total messages fetched: {current}\nTotal messages saved: {total_files}\nDuplicate Files Skipped: {duplicate}\nDeleted Messages Skipped: {deleted}\nNon-Media messages skipped: {no_media + unsupported}(Unsupported Media - `{unsupported}` )\nErrors Occurred: {errors}",
- reply_markup=reply)
- if message.empty:
- deleted += 1
- continue
- elif not message.media:
- no_media += 1
- continue
- elif message.media not in [enums.MessageMediaType.VIDEO, enums.MessageMediaType.AUDIO, enums.MessageMediaType.DOCUMENT]:
- unsupported += 1
- continue
- media = getattr(message, message.media.value, None)
- if not media:
- unsupported += 1
- continue
- media.file_type = message.media.value
- media.caption = message.caption
- aynav, vnay = await save_file(media)
- if aynav:
- total_files += 1
- elif vnay == 0:
- duplicate += 1
- elif vnay == 2:
- errors += 1
- except Exception as e:
- logger.exception(e)
- await msg.edit(f'Error: {e}')
- else:
- await msg.edit(f'Succesfully saved {total_files} to dataBase!\nDuplicate Files Skipped: {duplicate}\nDeleted Messages Skipped: {deleted}\nNon-Media messages skipped: {no_media + unsupported}(Unsupported Media - `{unsupported}` )\nErrors Occurred: {errors}')
From 900454bee0bff9fb12a67de63ed93c8d80c7e0b2 Mon Sep 17 00:00:00 2001
From: Soul pc <119080077+soulpc@users.noreply.github.com>
Date: Mon, 18 Sep 2023 10:12:25 +0530
Subject: [PATCH 142/237] Delete plugins/delete_files.py
---
plugins/delete_files.py | 50 -----------------------------------------
1 file changed, 50 deletions(-)
delete mode 100644 plugins/delete_files.py
diff --git a/plugins/delete_files.py b/plugins/delete_files.py
deleted file mode 100644
index dda816f..0000000
--- a/plugins/delete_files.py
+++ /dev/null
@@ -1,50 +0,0 @@
-#https://github.com/Joelkb/DQ-the-file-donor
-
-import re
-import logging
-from pyrogram import Client, filters
-from info import DELETE_CHANNELS
-from database.ia_filterdb import Media, unpack_new_file_id
-
-logger = logging.getLogger(__name__)
-
-media_filter = filters.document | filters.video | filters.audio
-
-
-@Client.on_message(filters.chat(DELETE_CHANNELS) & media_filter)
-async def deletemultiplemedia(bot, message):
- """Delete Multiple files from database"""
-
- for file_type in ("document", "video", "audio"):
- media = getattr(message, file_type, None)
- if media is not None:
- break
- else:
- return
-
- file_id, file_ref = unpack_new_file_id(media.file_id)
-
- result = await Media.collection.delete_one({
- '_id': file_id,
- })
- if result.deleted_count:
- logger.info('File is successfully deleted from database.')
- else:
- file_name = re.sub(r"(_|\-|\.|\+)", " ", str(media.file_name))
- result = await Media.collection.delete_many({
- 'file_name': file_name,
- 'file_size': media.file_size,
- 'mime_type': media.mime_type
- })
- if result.deleted_count:
- logger.info('File is successfully deleted from database.')
- else:
- result = await Media.collection.delete_many({
- 'file_name': media.file_name,
- 'file_size': media.file_size,
- 'mime_type': media.mime_type
- })
- if result.deleted_count:
- logger.info('File is successfully deleted from database.')
- else:
- logger.info('File not found in database.')
From dd09c4520fa7bdc9ec99ebded2af05627c39864f Mon Sep 17 00:00:00 2001
From: Soul pc <119080077+soulpc@users.noreply.github.com>
Date: Wed, 20 Sep 2023 17:20:56 +0530
Subject: [PATCH 143/237] Create delete_files.py
---
plugins/delete_files.py | 50 +++++++++++++++++++++++++++++++++++++++++
1 file changed, 50 insertions(+)
create mode 100644 plugins/delete_files.py
diff --git a/plugins/delete_files.py b/plugins/delete_files.py
new file mode 100644
index 0000000..dda816f
--- /dev/null
+++ b/plugins/delete_files.py
@@ -0,0 +1,50 @@
+#https://github.com/Joelkb/DQ-the-file-donor
+
+import re
+import logging
+from pyrogram import Client, filters
+from info import DELETE_CHANNELS
+from database.ia_filterdb import Media, unpack_new_file_id
+
+logger = logging.getLogger(__name__)
+
+media_filter = filters.document | filters.video | filters.audio
+
+
+@Client.on_message(filters.chat(DELETE_CHANNELS) & media_filter)
+async def deletemultiplemedia(bot, message):
+ """Delete Multiple files from database"""
+
+ for file_type in ("document", "video", "audio"):
+ media = getattr(message, file_type, None)
+ if media is not None:
+ break
+ else:
+ return
+
+ file_id, file_ref = unpack_new_file_id(media.file_id)
+
+ result = await Media.collection.delete_one({
+ '_id': file_id,
+ })
+ if result.deleted_count:
+ logger.info('File is successfully deleted from database.')
+ else:
+ file_name = re.sub(r"(_|\-|\.|\+)", " ", str(media.file_name))
+ result = await Media.collection.delete_many({
+ 'file_name': file_name,
+ 'file_size': media.file_size,
+ 'mime_type': media.mime_type
+ })
+ if result.deleted_count:
+ logger.info('File is successfully deleted from database.')
+ else:
+ result = await Media.collection.delete_many({
+ 'file_name': media.file_name,
+ 'file_size': media.file_size,
+ 'mime_type': media.mime_type
+ })
+ if result.deleted_count:
+ logger.info('File is successfully deleted from database.')
+ else:
+ logger.info('File not found in database.')
From d66206845152a6d99239aa1a517275a0fac66b71 Mon Sep 17 00:00:00 2001
From: Soul pc <119080077+soulpc@users.noreply.github.com>
Date: Wed, 20 Sep 2023 20:52:46 +0530
Subject: [PATCH 144/237] Create global_filter.py
---
plugins/global_filter.py | 148 +++++++++++++++++++++++++++++++++++++++
1 file changed, 148 insertions(+)
create mode 100644 plugins/global_filter.py
diff --git a/plugins/global_filter.py b/plugins/global_filter.py
new file mode 100644
index 0000000..11a5337
--- /dev/null
+++ b/plugins/global_filter.py
@@ -0,0 +1,148 @@
+import io
+from pyrogram import filters, Client, enums
+from pyrogram.types import InlineKeyboardButton, InlineKeyboardMarkup
+from database.gfilters_mdb import(
+ add_gfilter,
+ get_gfilters,
+ delete_gfilter,
+ count_gfilters,
+ del_allg
+)
+
+from database.connections_mdb import active_connection
+from utils import get_file_id, gfilterparser, split_quotes
+from info import ADMINS
+
+
+@Client.on_message(filters.command(['gfilter', 'addg']) & filters.incoming & filters.user(ADMINS))
+async def addgfilter(client, message):
+ args = message.text.html.split(None, 1)
+
+ if len(args) < 2:
+ await message.reply_text("Command Incomplete :(", quote=True)
+ return
+
+ extracted = split_quotes(args[1])
+ text = extracted[0].lower()
+
+ if not message.reply_to_message and len(extracted) < 2:
+ await message.reply_text("Add some content to save your filter!", quote=True)
+ return
+
+ if (len(extracted) >= 2) and not message.reply_to_message:
+ reply_text, btn, alert = gfilterparser(extracted[1], text)
+ fileid = None
+ if not reply_text:
+ await message.reply_text("You cannot have buttons alone, give some text to go with it!", quote=True)
+ return
+
+ elif message.reply_to_message and message.reply_to_message.reply_markup:
+ try:
+ rm = message.reply_to_message.reply_markup
+ btn = rm.inline_keyboard
+ msg = get_file_id(message.reply_to_message)
+ if msg:
+ fileid = msg.file_id
+ reply_text = message.reply_to_message.caption.html
+ else:
+ reply_text = message.reply_to_message.text.html
+ fileid = None
+ alert = None
+ except:
+ reply_text = ""
+ btn = "[]"
+ fileid = None
+ alert = None
+
+ elif message.reply_to_message and message.reply_to_message.media:
+ try:
+ msg = get_file_id(message.reply_to_message)
+ fileid = msg.file_id if msg else None
+ reply_text, btn, alert = gfilterparser(extracted[1], text) if message.reply_to_message.sticker else gfilterparser(message.reply_to_message.caption.html, text)
+ except:
+ reply_text = ""
+ btn = "[]"
+ alert = None
+ elif message.reply_to_message and message.reply_to_message.text:
+ try:
+ fileid = None
+ reply_text, btn, alert = gfilterparser(message.reply_to_message.text.html, text)
+ except:
+ reply_text = ""
+ btn = "[]"
+ alert = None
+ else:
+ return
+
+ await add_gfilter('gfilters', text, reply_text, btn, fileid, alert)
+
+ await message.reply_text(
+ f"GFilter for `{text}` added",
+ quote=True,
+ parse_mode=enums.ParseMode.MARKDOWN
+ )
+
+
+@Client.on_message(filters.command(['viewgfilters', 'gfilters']) & filters.incoming & filters.user(ADMINS))
+async def get_all_gfilters(client, message):
+ texts = await get_gfilters('gfilters')
+ count = await count_gfilters('gfilters')
+ if count:
+ gfilterlist = f"Total number of gfilters : {count}\n\n"
+
+ for text in texts:
+ keywords = " × `{}`\n".format(text)
+
+ gfilterlist += keywords
+
+ if len(gfilterlist) > 4096:
+ with io.BytesIO(str.encode(gfilterlist.replace("`", ""))) as keyword_file:
+ keyword_file.name = "keywords.txt"
+ await message.reply_document(
+ document=keyword_file,
+ quote=True
+ )
+ return
+ else:
+ gfilterlist = f"There are no active gfilters."
+
+ await message.reply_text(
+ text=gfilterlist,
+ quote=True,
+ parse_mode=enums.ParseMode.MARKDOWN
+ )
+
+@Client.on_message(filters.command('delg') & filters.incoming & filters.user(ADMINS))
+async def deletegfilter(client, message):
+ try:
+ cmd, text = message.text.split(" ", 1)
+ except:
+ await message.reply_text(
+ "Mention the gfiltername which you wanna delete!\n\n"
+ "/delg gfiltername\n\n"
+ "Use /viewgfilters to view all available gfilters",
+ quote=True
+ )
+ return
+
+ query = text.lower()
+
+ await delete_gfilter(message, query, 'gfilters')
+
+
+@Client.on_message(filters.command('delallg') & filters.user(ADMINS))
+async def delallgfill(client, message):
+ await message.reply_text(
+ f"Do you want to continue??",
+ reply_markup=InlineKeyboardMarkup([
+ [InlineKeyboardButton(text="YES",callback_data="gconforme")],
+ [InlineKeyboardButton(text="CANCEL",callback_data="close_data")]
+ ]),
+ quote=True
+ )
+
+
+@Client.on_callback_query(filters.regex("gconforme"))
+async def dellacbd(client, message):
+ await del_allg(message.message, 'gfilters')
+ return await message.reply("👍 Done")
From d9805f67356b37cf456b013a86e598cb1be78d05 Mon Sep 17 00:00:00 2001
From: Soul pc <119080077+soulpc@users.noreply.github.com>
Date: Wed, 20 Sep 2023 20:53:17 +0530
Subject: [PATCH 145/237] Delete plugins/inline.py
---
plugins/inline.py | 1 -
1 file changed, 1 deletion(-)
delete mode 100644 plugins/inline.py
diff --git a/plugins/inline.py b/plugins/inline.py
deleted file mode 100644
index 8b13789..0000000
--- a/plugins/inline.py
+++ /dev/null
@@ -1 +0,0 @@
-
From b737dd1456cdec7e54b352fc20f70b51ebd655d7 Mon Sep 17 00:00:00 2001
From: Soul pc <119080077+soulpc@users.noreply.github.com>
Date: Wed, 20 Sep 2023 21:18:08 +0530
Subject: [PATCH 146/237] Create filters.py
---
plugins/filters.py | 272 +++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 272 insertions(+)
create mode 100644 plugins/filters.py
diff --git a/plugins/filters.py b/plugins/filters.py
new file mode 100644
index 0000000..920a558
--- /dev/null
+++ b/plugins/filters.py
@@ -0,0 +1,272 @@
+import io
+from pyrogram import filters, Client, enums
+from pyrogram.types import InlineKeyboardButton, InlineKeyboardMarkup
+from database.filters_mdb import(
+ add_filter,
+ get_filters,
+ delete_filter,
+ count_filters
+)
+
+from database.connections_mdb import active_connection
+from utils import get_file_id, parser, split_quotes
+from info import ADMINS
+
+
+@Client.on_message(filters.command(['filter', 'add']) & filters.incoming)
+async def addfilter(client, message):
+ userid = message.from_user.id if message.from_user else None
+ if not userid:
+ return await message.reply(f"You are anonymous admin. Use /connect {message.chat.id} in PM")
+ chat_type = message.chat.type
+ args = message.text.html.split(None, 1)
+
+ if chat_type == enums.ChatType.PRIVATE:
+ grpid = await active_connection(str(userid))
+ if grpid is not None:
+ grp_id = grpid
+ try:
+ chat = await client.get_chat(grpid)
+ title = chat.title
+ except:
+ await message.reply_text("Make sure I'm present in your group!!", quote=True)
+ return
+ else:
+ await message.reply_text("I'm not connected to any groups!", quote=True)
+ return
+
+ elif chat_type in [enums.ChatType.GROUP, enums.ChatType.SUPERGROUP]:
+ grp_id = message.chat.id
+ title = message.chat.title
+
+ else:
+ return
+
+ st = await client.get_chat_member(grp_id, userid)
+ if (
+ st.status != enums.ChatMemberStatus.ADMINISTRATOR
+ and st.status != enums.ChatMemberStatus.OWNER
+ and str(userid) not in ADMINS
+ ):
+ return
+
+
+ if len(args) < 2:
+ await message.reply_text("Command Incomplete :(", quote=True)
+ return
+
+ extracted = split_quotes(args[1])
+ text = extracted[0].lower()
+
+ if not message.reply_to_message and len(extracted) < 2:
+ await message.reply_text("Add some content to save your filter!", quote=True)
+ return
+
+ if (len(extracted) >= 2) and not message.reply_to_message:
+ reply_text, btn, alert = parser(extracted[1], text)
+ fileid = None
+ if not reply_text:
+ await message.reply_text("You cannot have buttons alone, give some text to go with it!", quote=True)
+ return
+
+ elif message.reply_to_message and message.reply_to_message.reply_markup:
+ try:
+ rm = message.reply_to_message.reply_markup
+ btn = rm.inline_keyboard
+ msg = get_file_id(message.reply_to_message)
+ if msg:
+ fileid = msg.file_id
+ reply_text = message.reply_to_message.caption.html
+ else:
+ reply_text = message.reply_to_message.text.html
+ fileid = None
+ alert = None
+ except:
+ reply_text = ""
+ btn = "[]"
+ fileid = None
+ alert = None
+
+ elif message.reply_to_message and message.reply_to_message.media:
+ try:
+ msg = get_file_id(message.reply_to_message)
+ fileid = msg.file_id if msg else None
+ reply_text, btn, alert = parser(extracted[1], text) if message.reply_to_message.sticker else parser(message.reply_to_message.caption.html, text)
+ except:
+ reply_text = ""
+ btn = "[]"
+ alert = None
+ elif message.reply_to_message and message.reply_to_message.text:
+ try:
+ fileid = None
+ reply_text, btn, alert = parser(message.reply_to_message.text.html, text)
+ except:
+ reply_text = ""
+ btn = "[]"
+ alert = None
+ else:
+ return
+
+ await add_filter(grp_id, text, reply_text, btn, fileid, alert)
+
+ await message.reply_text(
+ f"Filter for `{text}` added in **{title}**",
+ quote=True,
+ parse_mode=enums.ParseMode.MARKDOWN
+ )
+
+
+@Client.on_message(filters.command(['viewfilters', 'filters']) & filters.incoming)
+async def get_all(client, message):
+
+ chat_type = message.chat.type
+ userid = message.from_user.id if message.from_user else None
+ if not userid:
+ return await message.reply(f"You are anonymous admin. Use /connect {message.chat.id} in PM")
+ if chat_type == enums.ChatType.PRIVATE:
+ grpid = await active_connection(str(userid))
+ if grpid is not None:
+ grp_id = grpid
+ try:
+ chat = await client.get_chat(grpid)
+ title = chat.title
+ except:
+ await message.reply_text("Make sure I'm present in your group!!", quote=True)
+ return
+ else:
+ await message.reply_text("I'm not connected to any groups!", quote=True)
+ return
+
+ elif chat_type in [enums.ChatType.GROUP, enums.ChatType.SUPERGROUP]:
+ grp_id = message.chat.id
+ title = message.chat.title
+
+ else:
+ return
+
+ st = await client.get_chat_member(grp_id, userid)
+ if (
+ st.status != enums.ChatMemberStatus.ADMINISTRATOR
+ and st.status != enums.ChatMemberStatus.OWNER
+ and str(userid) not in ADMINS
+ ):
+ return
+
+ texts = await get_filters(grp_id)
+ count = await count_filters(grp_id)
+ if count:
+ filterlist = f"Total number of filters in **{title}** : {count}\n\n"
+
+ for text in texts:
+ keywords = " × `{}`\n".format(text)
+
+ filterlist += keywords
+
+ if len(filterlist) > 4096:
+ with io.BytesIO(str.encode(filterlist.replace("`", ""))) as keyword_file:
+ keyword_file.name = "keywords.txt"
+ await message.reply_document(
+ document=keyword_file,
+ quote=True
+ )
+ return
+ else:
+ filterlist = f"There are no active filters in **{title}**"
+
+ await message.reply_text(
+ text=filterlist,
+ quote=True,
+ parse_mode=enums.ParseMode.MARKDOWN
+ )
+
+@Client.on_message(filters.command('del') & filters.incoming)
+async def deletefilter(client, message):
+ userid = message.from_user.id if message.from_user else None
+ if not userid:
+ return await message.reply(f"You are anonymous admin. Use /connect {message.chat.id} in PM")
+ chat_type = message.chat.type
+
+ if chat_type == enums.ChatType.PRIVATE:
+ grpid = await active_connection(str(userid))
+ if grpid is not None:
+ grp_id = grpid
+ try:
+ chat = await client.get_chat(grpid)
+ title = chat.title
+ except:
+ await message.reply_text("Make sure I'm present in your group!!", quote=True)
+ return
+ else:
+ await message.reply_text("I'm not connected to any groups!", quote=True)
+ return
+
+ elif chat_type in [enums.ChatType.GROUP, enums.ChatType.SUPERGROUP]:
+ grp_id = message.chat.id
+ title = message.chat.title
+
+ else:
+ return
+
+ st = await client.get_chat_member(grp_id, userid)
+ if (
+ st.status != enums.ChatMemberStatus.ADMINISTRATOR
+ and st.status != enums.ChatMemberStatus.OWNER
+ and str(userid) not in ADMINS
+ ):
+ return
+
+ try:
+ cmd, text = message.text.split(" ", 1)
+ except:
+ await message.reply_text(
+ "Mention the filtername which you wanna delete!\n\n"
+ "/del filtername\n\n"
+ "Use /viewfilters to view all available filters",
+ quote=True
+ )
+ return
+
+ query = text.lower()
+
+ await delete_filter(message, query, grp_id)
+
+
+@Client.on_message(filters.command('delall') & filters.incoming)
+async def delallconfirm(client, message):
+ userid = message.from_user.id if message.from_user else None
+ if not userid:
+ return await message.reply(f"You are anonymous admin. Use /connect {message.chat.id} in PM")
+ chat_type = message.chat.type
+
+ if chat_type == enums.ChatType.PRIVATE:
+ grpid = await active_connection(str(userid))
+ if grpid is not None:
+ grp_id = grpid
+ try:
+ chat = await client.get_chat(grpid)
+ title = chat.title
+ except:
+ await message.reply_text("Make sure I'm present in your group!!", quote=True)
+ return
+ else:
+ await message.reply_text("I'm not connected to any groups!", quote=True)
+ return
+
+ elif chat_type in [enums.ChatType.GROUP, enums.ChatType.SUPERGROUP]:
+ grp_id = message.chat.id
+ title = message.chat.title
+
+ else:
+ return
+
+
+ st = await client.get_chat_member(grp_id, userid)
+ if (st.status == enums.ChatMemberStatus.OWNER) or (str(userid) in ADMINS):
+ await message.reply_text(
+ f"This will delete all filters from '{title}'.\nDo you want to continue??",
+ reply_markup=InlineKeyboardMarkup([
+ [InlineKeyboardButton(text="YES",callback_data="delallconfirm")],
+ [InlineKeyboardButton(text="CANCEL",callback_data="delallcancel")]
+ ]),
+ quote=True
+ )
From 3ddad1bdc721d52209c80aead2e784024bffd080 Mon Sep 17 00:00:00 2001
From: Soul pc <119080077+soulpc@users.noreply.github.com>
Date: Wed, 20 Sep 2023 21:21:54 +0530
Subject: [PATCH 147/237] Delete plugins/delete_files.py
---
plugins/delete_files.py | 50 -----------------------------------------
1 file changed, 50 deletions(-)
delete mode 100644 plugins/delete_files.py
diff --git a/plugins/delete_files.py b/plugins/delete_files.py
deleted file mode 100644
index dda816f..0000000
--- a/plugins/delete_files.py
+++ /dev/null
@@ -1,50 +0,0 @@
-#https://github.com/Joelkb/DQ-the-file-donor
-
-import re
-import logging
-from pyrogram import Client, filters
-from info import DELETE_CHANNELS
-from database.ia_filterdb import Media, unpack_new_file_id
-
-logger = logging.getLogger(__name__)
-
-media_filter = filters.document | filters.video | filters.audio
-
-
-@Client.on_message(filters.chat(DELETE_CHANNELS) & media_filter)
-async def deletemultiplemedia(bot, message):
- """Delete Multiple files from database"""
-
- for file_type in ("document", "video", "audio"):
- media = getattr(message, file_type, None)
- if media is not None:
- break
- else:
- return
-
- file_id, file_ref = unpack_new_file_id(media.file_id)
-
- result = await Media.collection.delete_one({
- '_id': file_id,
- })
- if result.deleted_count:
- logger.info('File is successfully deleted from database.')
- else:
- file_name = re.sub(r"(_|\-|\.|\+)", " ", str(media.file_name))
- result = await Media.collection.delete_many({
- 'file_name': file_name,
- 'file_size': media.file_size,
- 'mime_type': media.mime_type
- })
- if result.deleted_count:
- logger.info('File is successfully deleted from database.')
- else:
- result = await Media.collection.delete_many({
- 'file_name': media.file_name,
- 'file_size': media.file_size,
- 'mime_type': media.mime_type
- })
- if result.deleted_count:
- logger.info('File is successfully deleted from database.')
- else:
- logger.info('File not found in database.')
From e519ad6156c17778baca4fe711d285b38fbb4d6a Mon Sep 17 00:00:00 2001
From: Soul pc <119080077+soulpc@users.noreply.github.com>
Date: Wed, 20 Sep 2023 21:22:11 +0530
Subject: [PATCH 148/237] Delete plugins/filters.py
---
plugins/filters.py | 272 ---------------------------------------------
1 file changed, 272 deletions(-)
delete mode 100644 plugins/filters.py
diff --git a/plugins/filters.py b/plugins/filters.py
deleted file mode 100644
index 920a558..0000000
--- a/plugins/filters.py
+++ /dev/null
@@ -1,272 +0,0 @@
-import io
-from pyrogram import filters, Client, enums
-from pyrogram.types import InlineKeyboardButton, InlineKeyboardMarkup
-from database.filters_mdb import(
- add_filter,
- get_filters,
- delete_filter,
- count_filters
-)
-
-from database.connections_mdb import active_connection
-from utils import get_file_id, parser, split_quotes
-from info import ADMINS
-
-
-@Client.on_message(filters.command(['filter', 'add']) & filters.incoming)
-async def addfilter(client, message):
- userid = message.from_user.id if message.from_user else None
- if not userid:
- return await message.reply(f"You are anonymous admin. Use /connect {message.chat.id} in PM")
- chat_type = message.chat.type
- args = message.text.html.split(None, 1)
-
- if chat_type == enums.ChatType.PRIVATE:
- grpid = await active_connection(str(userid))
- if grpid is not None:
- grp_id = grpid
- try:
- chat = await client.get_chat(grpid)
- title = chat.title
- except:
- await message.reply_text("Make sure I'm present in your group!!", quote=True)
- return
- else:
- await message.reply_text("I'm not connected to any groups!", quote=True)
- return
-
- elif chat_type in [enums.ChatType.GROUP, enums.ChatType.SUPERGROUP]:
- grp_id = message.chat.id
- title = message.chat.title
-
- else:
- return
-
- st = await client.get_chat_member(grp_id, userid)
- if (
- st.status != enums.ChatMemberStatus.ADMINISTRATOR
- and st.status != enums.ChatMemberStatus.OWNER
- and str(userid) not in ADMINS
- ):
- return
-
-
- if len(args) < 2:
- await message.reply_text("Command Incomplete :(", quote=True)
- return
-
- extracted = split_quotes(args[1])
- text = extracted[0].lower()
-
- if not message.reply_to_message and len(extracted) < 2:
- await message.reply_text("Add some content to save your filter!", quote=True)
- return
-
- if (len(extracted) >= 2) and not message.reply_to_message:
- reply_text, btn, alert = parser(extracted[1], text)
- fileid = None
- if not reply_text:
- await message.reply_text("You cannot have buttons alone, give some text to go with it!", quote=True)
- return
-
- elif message.reply_to_message and message.reply_to_message.reply_markup:
- try:
- rm = message.reply_to_message.reply_markup
- btn = rm.inline_keyboard
- msg = get_file_id(message.reply_to_message)
- if msg:
- fileid = msg.file_id
- reply_text = message.reply_to_message.caption.html
- else:
- reply_text = message.reply_to_message.text.html
- fileid = None
- alert = None
- except:
- reply_text = ""
- btn = "[]"
- fileid = None
- alert = None
-
- elif message.reply_to_message and message.reply_to_message.media:
- try:
- msg = get_file_id(message.reply_to_message)
- fileid = msg.file_id if msg else None
- reply_text, btn, alert = parser(extracted[1], text) if message.reply_to_message.sticker else parser(message.reply_to_message.caption.html, text)
- except:
- reply_text = ""
- btn = "[]"
- alert = None
- elif message.reply_to_message and message.reply_to_message.text:
- try:
- fileid = None
- reply_text, btn, alert = parser(message.reply_to_message.text.html, text)
- except:
- reply_text = ""
- btn = "[]"
- alert = None
- else:
- return
-
- await add_filter(grp_id, text, reply_text, btn, fileid, alert)
-
- await message.reply_text(
- f"Filter for `{text}` added in **{title}**",
- quote=True,
- parse_mode=enums.ParseMode.MARKDOWN
- )
-
-
-@Client.on_message(filters.command(['viewfilters', 'filters']) & filters.incoming)
-async def get_all(client, message):
-
- chat_type = message.chat.type
- userid = message.from_user.id if message.from_user else None
- if not userid:
- return await message.reply(f"You are anonymous admin. Use /connect {message.chat.id} in PM")
- if chat_type == enums.ChatType.PRIVATE:
- grpid = await active_connection(str(userid))
- if grpid is not None:
- grp_id = grpid
- try:
- chat = await client.get_chat(grpid)
- title = chat.title
- except:
- await message.reply_text("Make sure I'm present in your group!!", quote=True)
- return
- else:
- await message.reply_text("I'm not connected to any groups!", quote=True)
- return
-
- elif chat_type in [enums.ChatType.GROUP, enums.ChatType.SUPERGROUP]:
- grp_id = message.chat.id
- title = message.chat.title
-
- else:
- return
-
- st = await client.get_chat_member(grp_id, userid)
- if (
- st.status != enums.ChatMemberStatus.ADMINISTRATOR
- and st.status != enums.ChatMemberStatus.OWNER
- and str(userid) not in ADMINS
- ):
- return
-
- texts = await get_filters(grp_id)
- count = await count_filters(grp_id)
- if count:
- filterlist = f"Total number of filters in **{title}** : {count}\n\n"
-
- for text in texts:
- keywords = " × `{}`\n".format(text)
-
- filterlist += keywords
-
- if len(filterlist) > 4096:
- with io.BytesIO(str.encode(filterlist.replace("`", ""))) as keyword_file:
- keyword_file.name = "keywords.txt"
- await message.reply_document(
- document=keyword_file,
- quote=True
- )
- return
- else:
- filterlist = f"There are no active filters in **{title}**"
-
- await message.reply_text(
- text=filterlist,
- quote=True,
- parse_mode=enums.ParseMode.MARKDOWN
- )
-
-@Client.on_message(filters.command('del') & filters.incoming)
-async def deletefilter(client, message):
- userid = message.from_user.id if message.from_user else None
- if not userid:
- return await message.reply(f"You are anonymous admin. Use /connect {message.chat.id} in PM")
- chat_type = message.chat.type
-
- if chat_type == enums.ChatType.PRIVATE:
- grpid = await active_connection(str(userid))
- if grpid is not None:
- grp_id = grpid
- try:
- chat = await client.get_chat(grpid)
- title = chat.title
- except:
- await message.reply_text("Make sure I'm present in your group!!", quote=True)
- return
- else:
- await message.reply_text("I'm not connected to any groups!", quote=True)
- return
-
- elif chat_type in [enums.ChatType.GROUP, enums.ChatType.SUPERGROUP]:
- grp_id = message.chat.id
- title = message.chat.title
-
- else:
- return
-
- st = await client.get_chat_member(grp_id, userid)
- if (
- st.status != enums.ChatMemberStatus.ADMINISTRATOR
- and st.status != enums.ChatMemberStatus.OWNER
- and str(userid) not in ADMINS
- ):
- return
-
- try:
- cmd, text = message.text.split(" ", 1)
- except:
- await message.reply_text(
- "Mention the filtername which you wanna delete!\n\n"
- "/del filtername\n\n"
- "Use /viewfilters to view all available filters",
- quote=True
- )
- return
-
- query = text.lower()
-
- await delete_filter(message, query, grp_id)
-
-
-@Client.on_message(filters.command('delall') & filters.incoming)
-async def delallconfirm(client, message):
- userid = message.from_user.id if message.from_user else None
- if not userid:
- return await message.reply(f"You are anonymous admin. Use /connect {message.chat.id} in PM")
- chat_type = message.chat.type
-
- if chat_type == enums.ChatType.PRIVATE:
- grpid = await active_connection(str(userid))
- if grpid is not None:
- grp_id = grpid
- try:
- chat = await client.get_chat(grpid)
- title = chat.title
- except:
- await message.reply_text("Make sure I'm present in your group!!", quote=True)
- return
- else:
- await message.reply_text("I'm not connected to any groups!", quote=True)
- return
-
- elif chat_type in [enums.ChatType.GROUP, enums.ChatType.SUPERGROUP]:
- grp_id = message.chat.id
- title = message.chat.title
-
- else:
- return
-
-
- st = await client.get_chat_member(grp_id, userid)
- if (st.status == enums.ChatMemberStatus.OWNER) or (str(userid) in ADMINS):
- await message.reply_text(
- f"This will delete all filters from '{title}'.\nDo you want to continue??",
- reply_markup=InlineKeyboardMarkup([
- [InlineKeyboardButton(text="YES",callback_data="delallconfirm")],
- [InlineKeyboardButton(text="CANCEL",callback_data="delallcancel")]
- ]),
- quote=True
- )
From 9c87e74539c56be14f94c09505ae1e415a57a7e9 Mon Sep 17 00:00:00 2001
From: Soul pc <119080077+soulpc@users.noreply.github.com>
Date: Wed, 20 Sep 2023 21:22:56 +0530
Subject: [PATCH 149/237] Delete plugins/global_filter.py
---
plugins/global_filter.py | 148 ---------------------------------------
1 file changed, 148 deletions(-)
delete mode 100644 plugins/global_filter.py
diff --git a/plugins/global_filter.py b/plugins/global_filter.py
deleted file mode 100644
index 11a5337..0000000
--- a/plugins/global_filter.py
+++ /dev/null
@@ -1,148 +0,0 @@
-import io
-from pyrogram import filters, Client, enums
-from pyrogram.types import InlineKeyboardButton, InlineKeyboardMarkup
-from database.gfilters_mdb import(
- add_gfilter,
- get_gfilters,
- delete_gfilter,
- count_gfilters,
- del_allg
-)
-
-from database.connections_mdb import active_connection
-from utils import get_file_id, gfilterparser, split_quotes
-from info import ADMINS
-
-
-@Client.on_message(filters.command(['gfilter', 'addg']) & filters.incoming & filters.user(ADMINS))
-async def addgfilter(client, message):
- args = message.text.html.split(None, 1)
-
- if len(args) < 2:
- await message.reply_text("Command Incomplete :(", quote=True)
- return
-
- extracted = split_quotes(args[1])
- text = extracted[0].lower()
-
- if not message.reply_to_message and len(extracted) < 2:
- await message.reply_text("Add some content to save your filter!", quote=True)
- return
-
- if (len(extracted) >= 2) and not message.reply_to_message:
- reply_text, btn, alert = gfilterparser(extracted[1], text)
- fileid = None
- if not reply_text:
- await message.reply_text("You cannot have buttons alone, give some text to go with it!", quote=True)
- return
-
- elif message.reply_to_message and message.reply_to_message.reply_markup:
- try:
- rm = message.reply_to_message.reply_markup
- btn = rm.inline_keyboard
- msg = get_file_id(message.reply_to_message)
- if msg:
- fileid = msg.file_id
- reply_text = message.reply_to_message.caption.html
- else:
- reply_text = message.reply_to_message.text.html
- fileid = None
- alert = None
- except:
- reply_text = ""
- btn = "[]"
- fileid = None
- alert = None
-
- elif message.reply_to_message and message.reply_to_message.media:
- try:
- msg = get_file_id(message.reply_to_message)
- fileid = msg.file_id if msg else None
- reply_text, btn, alert = gfilterparser(extracted[1], text) if message.reply_to_message.sticker else gfilterparser(message.reply_to_message.caption.html, text)
- except:
- reply_text = ""
- btn = "[]"
- alert = None
- elif message.reply_to_message and message.reply_to_message.text:
- try:
- fileid = None
- reply_text, btn, alert = gfilterparser(message.reply_to_message.text.html, text)
- except:
- reply_text = ""
- btn = "[]"
- alert = None
- else:
- return
-
- await add_gfilter('gfilters', text, reply_text, btn, fileid, alert)
-
- await message.reply_text(
- f"GFilter for `{text}` added",
- quote=True,
- parse_mode=enums.ParseMode.MARKDOWN
- )
-
-
-@Client.on_message(filters.command(['viewgfilters', 'gfilters']) & filters.incoming & filters.user(ADMINS))
-async def get_all_gfilters(client, message):
- texts = await get_gfilters('gfilters')
- count = await count_gfilters('gfilters')
- if count:
- gfilterlist = f"Total number of gfilters : {count}\n\n"
-
- for text in texts:
- keywords = " × `{}`\n".format(text)
-
- gfilterlist += keywords
-
- if len(gfilterlist) > 4096:
- with io.BytesIO(str.encode(gfilterlist.replace("`", ""))) as keyword_file:
- keyword_file.name = "keywords.txt"
- await message.reply_document(
- document=keyword_file,
- quote=True
- )
- return
- else:
- gfilterlist = f"There are no active gfilters."
-
- await message.reply_text(
- text=gfilterlist,
- quote=True,
- parse_mode=enums.ParseMode.MARKDOWN
- )
-
-@Client.on_message(filters.command('delg') & filters.incoming & filters.user(ADMINS))
-async def deletegfilter(client, message):
- try:
- cmd, text = message.text.split(" ", 1)
- except:
- await message.reply_text(
- "Mention the gfiltername which you wanna delete!\n\n"
- "/delg gfiltername\n\n"
- "Use /viewgfilters to view all available gfilters",
- quote=True
- )
- return
-
- query = text.lower()
-
- await delete_gfilter(message, query, 'gfilters')
-
-
-@Client.on_message(filters.command('delallg') & filters.user(ADMINS))
-async def delallgfill(client, message):
- await message.reply_text(
- f"Do you want to continue??",
- reply_markup=InlineKeyboardMarkup([
- [InlineKeyboardButton(text="YES",callback_data="gconforme")],
- [InlineKeyboardButton(text="CANCEL",callback_data="close_data")]
- ]),
- quote=True
- )
-
-
-@Client.on_callback_query(filters.regex("gconforme"))
-async def dellacbd(client, message):
- await del_allg(message.message, 'gfilters')
- return await message.reply("👍 Done")
From ce7810a52c0a668bc46f6e8b412055e190a5b296 Mon Sep 17 00:00:00 2001
From: Soul pc <119080077+soulpc@users.noreply.github.com>
Date: Sun, 24 Sep 2023 18:54:19 +0530
Subject: [PATCH 150/237] Update Script.py
---
Script.py | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/Script.py b/Script.py
index 6bc2b27..32e1490 100644
--- a/Script.py
+++ b/Script.py
@@ -10,7 +10,7 @@ class script(object):
ABOUT_TXT = """ 𝙼𝚈 𝙽𝙰𝙼𝙴: {}
𝙲𝚁𝙴𝙰𝚃𝙾𝚁: ARAKAL_THERAVAD_MOVIES.𝙲𝙾𝙼
- 𝚃𝙷𝙰𝙽𝙺𝚂 𝚃𝙾: ARAKAL_THERAVAD_MOVIES
+ 𝚃𝙷𝙰𝙽𝙺𝚂 𝚃𝙾: ARAKAL_THERAVAD_MOVIES
𝙳𝙴𝚅: ARAKAL_THERAVAD_MOVIES
𝙻𝙸𝙱𝚁𝙰𝚁𝚈: ARAKAL_THERAVAD_MOVIES
𝙻𝙰𝙽𝙶𝚄𝙰𝙶𝙴: ARAKAL_THERAVAD_MOVIES
@@ -274,7 +274,7 @@ class script(object):
കോപ്പി റൈറ്റ് ഉള്ളത് കൊണ്ട് ഈ ഒരു ഫയൽ 10 മിനിറ്റ് കൊണ്ട് ഇവിടെ നിന്നും ഡിലേറ്റാവും...!!!
╔════ ᴊᴏɪɴ ᴡɪᴛʜ ᴜs ════╗
-♻️ 𝙅𝙊𝙄𝙉 :- OTT UPDATES
+♻️ 𝙅𝙊𝙄𝙉 :- OTT UPDATES
♻️ 𝙅𝙊𝙄𝙉 :- CHANNEL
♻️ 𝙅𝙊𝙄𝙉 :- GROUP
╚════ ᴊᴏɪɴ ᴡɪᴛʜ ᴜs ════╝
@@ -307,7 +307,7 @@ class script(object):
╔════ ᴊᴏɪɴ ᴡɪᴛʜ ᴜs ════╗
▫️ ᴄʜᴀɴɴᴇʟ
-▫️ sᴜᴘᴘᴏʀᴛ ɢʀᴏᴜᴘ
+▫️ sᴜᴘᴘᴏʀᴛ ɢʀᴏᴜᴘ
╚════ ᴊᴏɪɴ ᴡɪᴛʜ ᴜs ════╝"""
RESTART_TXT = """
@@ -328,7 +328,7 @@ class script(object):
1️⃣ സിനിമയുടെ സ്പെല്ലിങ്ങ് ഗൂഗിളിൽ ഉള്ളത് പോലെ ആണോ നിങ്ങൾ അടിച്ചത് എന്ന് ഉറപ്പ് വരുത്തുക..!!
- 2️⃣ നിങ്ങൾ ചോദിച്ച സിനിമ OTT റിലീസ് ആയതാണോ എന്ന് @oTTGArakalTheravadMovies യിൽ ചെക്ക് ചെയ്യുക..!!
+ 2️⃣ നിങ്ങൾ ചോദിച്ച സിനിമ OTT റിലീസ് ആയതാണോ എന്ന് @https:@OTT_ARAKAL_THERAVAD_MOVIES യിൽ ചെക്ക് ചെയ്യുക..!!
3️⃣ മൂവിക്ക് വേണ്ടി മെസ്സേജ് അയക്കുമ്പോൾ മൂവിയുടെ പേര് ഇറങ്ങിയ വർഷം മാത്രം അയക്കുക..!!
@@ -343,7 +343,7 @@ class script(object):
1️⃣ സിനിമയുടെ സ്പെല്ലിങ്ങ് ഗൂഗിളിൽ ഉള്ളത് പോലെ ആണോ നിങ്ങൾ അടിച്ചത് എന്ന് ഉറപ്പ് വരുത്തുക..!!
- 2️⃣ നിങ്ങൾ ചോദിച്ച സിനിമ OTT റിലീസ് ആയതാണോ എന്ന് @oTTGArakalTheravadMovies യിൽ ചെക്ക് ചെയ്യുക..!!
+ 2️⃣ നിങ്ങൾ ചോദിച്ച സിനിമ OTT റിലീസ് ആയതാണോ എന്ന് @OTT_ARAKAL_THERAVAD_MOVIES യിൽ ചെക്ക് ചെയ്യുക..!!
3️⃣ മൂവിക്ക് വേണ്ടി മെസ്സേജ് അയക്കുമ്പോൾ മൂവിയുടെ പേര് ഇറങ്ങിയ വർഷം മാത്രം അയക്കുക..!!"""
From a12d09cd6db4ea9db2b305ec7178affe0ab8943c Mon Sep 17 00:00:00 2001
From: Soul pc <119080077+soulpc@users.noreply.github.com>
Date: Sun, 24 Sep 2023 18:55:59 +0530
Subject: [PATCH 151/237] Update info.py
---
info.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/info.py b/info.py
index f39f405..d61da76 100644
--- a/info.py
+++ b/info.py
@@ -100,7 +100,7 @@ def __init__(self):
PORT = os.environ.get("PORT", "8080")
MAX_BTN = int(environ.get('MAX_BTN', "7"))
S_GROUP = environ.get('S_GROUP',"https://t.me/ARAKAL_THERAVAD_MOVIES")
-MAIN_CHANNEL = environ.get('MAIN_CHANNEL',"https://t.me/oTTGArakalTheravadMovies")
+MAIN_CHANNEL = environ.get('MAIN_CHANNEL',"https://t.me/OTT_ARAKAL_THERAVAD_MOVIES")
FILE_FORWARD = environ.get('FILE_FORWARD',"https://t.me/Grupo_filles")
MSG_ALRT = environ.get('MSG_ALRT', '𝑪𝑯𝑬𝑪𝑲 & 𝑻𝑹𝒀 𝑨𝑳𝑳 𝑴𝒀 𝑭𝑬𝑨𝑻𝑼𝑹𝑬𝑺')
FILE_CHANNEL = int(environ.get('FILE_CHANNEL', '-1001765119767'))
From db86c65de47c2a924e3a5604b6602f28ba2e5957 Mon Sep 17 00:00:00 2001
From: Soul pc <119080077+soulpc@users.noreply.github.com>
Date: Sun, 24 Sep 2023 21:21:39 +0530
Subject: [PATCH 152/237] Update commands.py
---
plugins/commands.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/plugins/commands.py b/plugins/commands.py
index 1c10427..24b624f 100644
--- a/plugins/commands.py
+++ b/plugins/commands.py
@@ -48,7 +48,7 @@ async def start(client, message):
InlineKeyboardButton("👥 𝗚𝗥𝗢𝗨𝗣 - 𝟯", url=f"https://t.me/ARAKAL_THERAVAD_GROUP_03"),
InlineKeyboardButton("👥𝗚𝗥𝗢𝗨𝗣 - 𝟰", url=f"https://t.me/ARAKAL_THERAVAD_GROUP_04")
],[
- InlineKeyboardButton("🖥 𝗡𝗘𝗪 𝗢𝗧𝗧 𝗨𝗣𝗗𝗔𝗧𝗘𝗦 🖥", url="https://t.me/oTTGArakalTheravadMovies")
+ InlineKeyboardButton("🖥 𝗡𝗘𝗪 𝗢𝗧𝗧 𝗨𝗣𝗗𝗔𝗧𝗘𝗦 🖥", url="https://t.me/OTT_ARAKAL_THERAVAD_MOVIES")
],[
InlineKeyboardButton("⭕️𝗚𝗘𝗧 𝗢𝗨𝗥 𝗖𝗛𝗔𝗡𝗡𝗘𝗟 𝗟𝗜𝗡𝗞𝗦 ⭕️", url="https://t.me/ARAKAL_THERAVAD_GROUP_LINKS")
]]
From 22b123c105fda70634a4b9d63db11097803118ef Mon Sep 17 00:00:00 2001
From: Soul pc <119080077+soulpc@users.noreply.github.com>
Date: Tue, 26 Sep 2023 07:40:10 +0530
Subject: [PATCH 153/237] Create delete_files.py
---
plugins/delete_files.py | 50 +++++++++++++++++++++++++++++++++++++++++
1 file changed, 50 insertions(+)
create mode 100644 plugins/delete_files.py
diff --git a/plugins/delete_files.py b/plugins/delete_files.py
new file mode 100644
index 0000000..dda816f
--- /dev/null
+++ b/plugins/delete_files.py
@@ -0,0 +1,50 @@
+#https://github.com/Joelkb/DQ-the-file-donor
+
+import re
+import logging
+from pyrogram import Client, filters
+from info import DELETE_CHANNELS
+from database.ia_filterdb import Media, unpack_new_file_id
+
+logger = logging.getLogger(__name__)
+
+media_filter = filters.document | filters.video | filters.audio
+
+
+@Client.on_message(filters.chat(DELETE_CHANNELS) & media_filter)
+async def deletemultiplemedia(bot, message):
+ """Delete Multiple files from database"""
+
+ for file_type in ("document", "video", "audio"):
+ media = getattr(message, file_type, None)
+ if media is not None:
+ break
+ else:
+ return
+
+ file_id, file_ref = unpack_new_file_id(media.file_id)
+
+ result = await Media.collection.delete_one({
+ '_id': file_id,
+ })
+ if result.deleted_count:
+ logger.info('File is successfully deleted from database.')
+ else:
+ file_name = re.sub(r"(_|\-|\.|\+)", " ", str(media.file_name))
+ result = await Media.collection.delete_many({
+ 'file_name': file_name,
+ 'file_size': media.file_size,
+ 'mime_type': media.mime_type
+ })
+ if result.deleted_count:
+ logger.info('File is successfully deleted from database.')
+ else:
+ result = await Media.collection.delete_many({
+ 'file_name': media.file_name,
+ 'file_size': media.file_size,
+ 'mime_type': media.mime_type
+ })
+ if result.deleted_count:
+ logger.info('File is successfully deleted from database.')
+ else:
+ logger.info('File not found in database.')
From 75007f5a36d8095303d65e4ef0f3e94108591998 Mon Sep 17 00:00:00 2001
From: Soul pc <119080077+soulpc@users.noreply.github.com>
Date: Tue, 26 Sep 2023 07:55:42 +0530
Subject: [PATCH 154/237] Delete plugins/delete_files.py
---
plugins/delete_files.py | 50 -----------------------------------------
1 file changed, 50 deletions(-)
delete mode 100644 plugins/delete_files.py
diff --git a/plugins/delete_files.py b/plugins/delete_files.py
deleted file mode 100644
index dda816f..0000000
--- a/plugins/delete_files.py
+++ /dev/null
@@ -1,50 +0,0 @@
-#https://github.com/Joelkb/DQ-the-file-donor
-
-import re
-import logging
-from pyrogram import Client, filters
-from info import DELETE_CHANNELS
-from database.ia_filterdb import Media, unpack_new_file_id
-
-logger = logging.getLogger(__name__)
-
-media_filter = filters.document | filters.video | filters.audio
-
-
-@Client.on_message(filters.chat(DELETE_CHANNELS) & media_filter)
-async def deletemultiplemedia(bot, message):
- """Delete Multiple files from database"""
-
- for file_type in ("document", "video", "audio"):
- media = getattr(message, file_type, None)
- if media is not None:
- break
- else:
- return
-
- file_id, file_ref = unpack_new_file_id(media.file_id)
-
- result = await Media.collection.delete_one({
- '_id': file_id,
- })
- if result.deleted_count:
- logger.info('File is successfully deleted from database.')
- else:
- file_name = re.sub(r"(_|\-|\.|\+)", " ", str(media.file_name))
- result = await Media.collection.delete_many({
- 'file_name': file_name,
- 'file_size': media.file_size,
- 'mime_type': media.mime_type
- })
- if result.deleted_count:
- logger.info('File is successfully deleted from database.')
- else:
- result = await Media.collection.delete_many({
- 'file_name': media.file_name,
- 'file_size': media.file_size,
- 'mime_type': media.mime_type
- })
- if result.deleted_count:
- logger.info('File is successfully deleted from database.')
- else:
- logger.info('File not found in database.')
From 2530718081860eee64eaf13a2f9b6e1ad9e4a480 Mon Sep 17 00:00:00 2001
From: Soul pc <119080077+soulpc@users.noreply.github.com>
Date: Tue, 26 Sep 2023 09:09:39 +0530
Subject: [PATCH 155/237] Update info.py
---
info.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/info.py b/info.py
index d61da76..2524d41 100644
--- a/info.py
+++ b/info.py
@@ -50,7 +50,7 @@ def __init__(self):
USE_CAPTION_FILTER = bool(environ.get('USE_CAPTION_FILTER', False))
PICS = (environ.get('PICS', 'https://telegra.ph/file/2992a480cae2bc0de1c39.jpg https://telegra.ph/file/76e7b5e94430b84a3d2b2.jpg https://telegra.ph/file/3544a8773740b0412c9dd.jpg https://telegra.ph/file/4b1c7004ea8bd3fed8df9.jpg https://telegra.ph/file/a02e47d932adc336740fa.jpg')).split()
NOR_IMG = environ.get('NOR_IMG', "https://telegra.ph/file/c37370e277b219836b5a1.jpg")
-SPELL_IMG = environ.get('SPELL_IMG',"https://telegra.ph/file/b58f576fed14cd645d2cf.jpg")
+SPELL_IMG = environ.get('SPELL_IMG',"https://telegra.ph/file/f044938bb933f4f7ace82.jpg")
# Welcome area
MELCOW_IMG = environ.get('MELCOW_IMG',"https://telegra.ph/file/e54cae941b9b81f13eb71.jpg")
From cb6f66bc3d221bfcc0e6e375e10e99d874d02b85 Mon Sep 17 00:00:00 2001
From: Soul pc <119080077+soulpc@users.noreply.github.com>
Date: Wed, 27 Sep 2023 15:43:45 +0530
Subject: [PATCH 156/237] Update Script.py
---
Script.py | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/Script.py b/Script.py
index 32e1490..eb677f8 100644
--- a/Script.py
+++ b/Script.py
@@ -284,8 +284,7 @@ class script(object):
𝙷𝙴𝙻𝙻𝙾 {},
ഞാൻ ഒരു 𝐆𝐑𝐎𝐔𝐏 𝐌𝐀𝐍𝐀𝐆𝐈𝐍𝐆 𝐁𝐎𝐓 ആണ്, എന്നെ നിങ്ങളുടെ ഗ്രൂപ്പിൽ ആഡ് ചെയ്യാൻ നോക്കി സമയം കളയണ്ട, എന്നെ 𝗔𝗥𝗔𝗞𝗔𝗟 𝗧𝗛𝗘𝗥𝗔𝗩𝗔𝗗 𝗠𝗢𝗩𝗜𝗘𝗦 𝗧𝗘𝗔𝗠 ഗ്രൂപ്പിൽ മാത്രമേ ആഡ് ചെയ്യാൻ കഴിയൂ...!!!
-
-"""
+"""
IMDB_TEMPLATE_TXT = """
🔖 ᴛɪᴛʟᴇ :{title}
From a2982db4525d0cd1e0e4767faa0d5c089f838017 Mon Sep 17 00:00:00 2001
From: Soul pc <119080077+soulpc@users.noreply.github.com>
Date: Fri, 29 Sep 2023 08:40:41 +0530
Subject: [PATCH 157/237] Add files via upload
---
plugins/delete_files.py | 50 +++++++++++++++++++++++++++++++++++++++++
1 file changed, 50 insertions(+)
create mode 100644 plugins/delete_files.py
diff --git a/plugins/delete_files.py b/plugins/delete_files.py
new file mode 100644
index 0000000..dda816f
--- /dev/null
+++ b/plugins/delete_files.py
@@ -0,0 +1,50 @@
+#https://github.com/Joelkb/DQ-the-file-donor
+
+import re
+import logging
+from pyrogram import Client, filters
+from info import DELETE_CHANNELS
+from database.ia_filterdb import Media, unpack_new_file_id
+
+logger = logging.getLogger(__name__)
+
+media_filter = filters.document | filters.video | filters.audio
+
+
+@Client.on_message(filters.chat(DELETE_CHANNELS) & media_filter)
+async def deletemultiplemedia(bot, message):
+ """Delete Multiple files from database"""
+
+ for file_type in ("document", "video", "audio"):
+ media = getattr(message, file_type, None)
+ if media is not None:
+ break
+ else:
+ return
+
+ file_id, file_ref = unpack_new_file_id(media.file_id)
+
+ result = await Media.collection.delete_one({
+ '_id': file_id,
+ })
+ if result.deleted_count:
+ logger.info('File is successfully deleted from database.')
+ else:
+ file_name = re.sub(r"(_|\-|\.|\+)", " ", str(media.file_name))
+ result = await Media.collection.delete_many({
+ 'file_name': file_name,
+ 'file_size': media.file_size,
+ 'mime_type': media.mime_type
+ })
+ if result.deleted_count:
+ logger.info('File is successfully deleted from database.')
+ else:
+ result = await Media.collection.delete_many({
+ 'file_name': media.file_name,
+ 'file_size': media.file_size,
+ 'mime_type': media.mime_type
+ })
+ if result.deleted_count:
+ logger.info('File is successfully deleted from database.')
+ else:
+ logger.info('File not found in database.')
From bc061ee53be6dfabd77115d96b14b5a03f29bd5b Mon Sep 17 00:00:00 2001
From: Soul pc <119080077+soulpc@users.noreply.github.com>
Date: Thu, 5 Oct 2023 21:52:08 +0530
Subject: [PATCH 158/237] Delete plugins/delete_files.py
---
plugins/delete_files.py | 50 -----------------------------------------
1 file changed, 50 deletions(-)
delete mode 100644 plugins/delete_files.py
diff --git a/plugins/delete_files.py b/plugins/delete_files.py
deleted file mode 100644
index dda816f..0000000
--- a/plugins/delete_files.py
+++ /dev/null
@@ -1,50 +0,0 @@
-#https://github.com/Joelkb/DQ-the-file-donor
-
-import re
-import logging
-from pyrogram import Client, filters
-from info import DELETE_CHANNELS
-from database.ia_filterdb import Media, unpack_new_file_id
-
-logger = logging.getLogger(__name__)
-
-media_filter = filters.document | filters.video | filters.audio
-
-
-@Client.on_message(filters.chat(DELETE_CHANNELS) & media_filter)
-async def deletemultiplemedia(bot, message):
- """Delete Multiple files from database"""
-
- for file_type in ("document", "video", "audio"):
- media = getattr(message, file_type, None)
- if media is not None:
- break
- else:
- return
-
- file_id, file_ref = unpack_new_file_id(media.file_id)
-
- result = await Media.collection.delete_one({
- '_id': file_id,
- })
- if result.deleted_count:
- logger.info('File is successfully deleted from database.')
- else:
- file_name = re.sub(r"(_|\-|\.|\+)", " ", str(media.file_name))
- result = await Media.collection.delete_many({
- 'file_name': file_name,
- 'file_size': media.file_size,
- 'mime_type': media.mime_type
- })
- if result.deleted_count:
- logger.info('File is successfully deleted from database.')
- else:
- result = await Media.collection.delete_many({
- 'file_name': media.file_name,
- 'file_size': media.file_size,
- 'mime_type': media.mime_type
- })
- if result.deleted_count:
- logger.info('File is successfully deleted from database.')
- else:
- logger.info('File not found in database.')
From 789c39dcb522208c9c558c688a08da70fe02f08e Mon Sep 17 00:00:00 2001
From: Soul pc <119080077+soulpc@users.noreply.github.com>
Date: Fri, 6 Oct 2023 23:12:00 +0530
Subject: [PATCH 159/237] Add files via upload
---
plugins/approve.py | 27 +++++++++++++++++++++++++++
1 file changed, 27 insertions(+)
create mode 100644 plugins/approve.py
diff --git a/plugins/approve.py b/plugins/approve.py
new file mode 100644
index 0000000..3a3fd1b
--- /dev/null
+++ b/plugins/approve.py
@@ -0,0 +1,27 @@
+from pyrogram import Client
+from pyrogram.types import InlineKeyboardButton, InlineKeyboardMarkup
+from pyrogram.errors import UserIsBlocked, PeerIdInvalid
+
+
+@Client.on_chat_join_request()
+async def accept_request(client, r):
+
+ rm = InlineKeyboardMarkup([[
+ InlineKeyboardButton("🎭 𝘑𝘖𝘐𝘕 𝘍𝘖𝘙 𝘔𝘖𝘝𝘐𝘌𝘚 🎭", url=f"https://t.me/OTT_ARAKAL_THERAVAD_MOVIES")
+ ]])
+
+ try:
+ await client.send_photo(
+ r.from_user.id,
+ 'https://telegra.ph/file/03a7b834ccabe5017f6b5.jpg',
+ f"**𝖧𝖾𝗅𝗅𝗈 {r.from_user.mention} 👻, 𝖶𝖾𝗅𝖼𝗈𝗆𝖾 𝖳𝗈 {r.chat.title}\n𝖸𝗈𝗎𝗋 𝖱𝖾𝗊𝗎𝖾𝗌𝗍 𝖧𝖺𝗌 𝖡𝖾𝖾𝗇 𝖠𝗉𝗉𝗋𝗈𝗏𝖾𝖽...!!!**",
+ reply_markup=rm)
+
+ except UserIsBlocked:
+ print("User blocked the bot")
+ except PeerIdInvalid:
+ print("Err")
+ except Exception as e:
+ print(f"#Error\n{str(e)}")
+
+ await r.approve()
From 5cfb8d28a43d7f4b2e096c0d00357ecc33ce3eb5 Mon Sep 17 00:00:00 2001
From: Soul pc <119080077+soulpc@users.noreply.github.com>
Date: Mon, 9 Oct 2023 08:25:01 +0530
Subject: [PATCH 160/237] Add files via upload
---
plugins/delete_files.py | 50 +++++++
plugins/filters.py | 272 +++++++++++++++++++++++++++++++++++++++
plugins/global_filter.py | 148 +++++++++++++++++++++
3 files changed, 470 insertions(+)
create mode 100644 plugins/delete_files.py
create mode 100644 plugins/filters.py
create mode 100644 plugins/global_filter.py
diff --git a/plugins/delete_files.py b/plugins/delete_files.py
new file mode 100644
index 0000000..dda816f
--- /dev/null
+++ b/plugins/delete_files.py
@@ -0,0 +1,50 @@
+#https://github.com/Joelkb/DQ-the-file-donor
+
+import re
+import logging
+from pyrogram import Client, filters
+from info import DELETE_CHANNELS
+from database.ia_filterdb import Media, unpack_new_file_id
+
+logger = logging.getLogger(__name__)
+
+media_filter = filters.document | filters.video | filters.audio
+
+
+@Client.on_message(filters.chat(DELETE_CHANNELS) & media_filter)
+async def deletemultiplemedia(bot, message):
+ """Delete Multiple files from database"""
+
+ for file_type in ("document", "video", "audio"):
+ media = getattr(message, file_type, None)
+ if media is not None:
+ break
+ else:
+ return
+
+ file_id, file_ref = unpack_new_file_id(media.file_id)
+
+ result = await Media.collection.delete_one({
+ '_id': file_id,
+ })
+ if result.deleted_count:
+ logger.info('File is successfully deleted from database.')
+ else:
+ file_name = re.sub(r"(_|\-|\.|\+)", " ", str(media.file_name))
+ result = await Media.collection.delete_many({
+ 'file_name': file_name,
+ 'file_size': media.file_size,
+ 'mime_type': media.mime_type
+ })
+ if result.deleted_count:
+ logger.info('File is successfully deleted from database.')
+ else:
+ result = await Media.collection.delete_many({
+ 'file_name': media.file_name,
+ 'file_size': media.file_size,
+ 'mime_type': media.mime_type
+ })
+ if result.deleted_count:
+ logger.info('File is successfully deleted from database.')
+ else:
+ logger.info('File not found in database.')
diff --git a/plugins/filters.py b/plugins/filters.py
new file mode 100644
index 0000000..ae0eaaa
--- /dev/null
+++ b/plugins/filters.py
@@ -0,0 +1,272 @@
+import io
+from pyrogram import filters, Client, enums
+from pyrogram.types import InlineKeyboardButton, InlineKeyboardMarkup
+from database.filters_mdb import(
+ add_filter,
+ get_filters,
+ delete_filter,
+ count_filters
+)
+
+from database.connections_mdb import active_connection
+from utils import get_file_id, parser, split_quotes
+from info import ADMINS
+
+
+@Client.on_message(filters.command(['filter', 'add']) & filters.incoming)
+async def addfilter(client, message):
+ userid = message.from_user.id if message.from_user else None
+ if not userid:
+ return await message.reply(f"You are anonymous admin. Use /connect {message.chat.id} in PM")
+ chat_type = message.chat.type
+ args = message.text.html.split(None, 1)
+
+ if chat_type == enums.ChatType.PRIVATE:
+ grpid = await active_connection(str(userid))
+ if grpid is not None:
+ grp_id = grpid
+ try:
+ chat = await client.get_chat(grpid)
+ title = chat.title
+ except:
+ await message.reply_text("Make sure I'm present in your group!!", quote=True)
+ return
+ else:
+ await message.reply_text("I'm not connected to any groups!", quote=True)
+ return
+
+ elif chat_type in [enums.ChatType.GROUP, enums.ChatType.SUPERGROUP]:
+ grp_id = message.chat.id
+ title = message.chat.title
+
+ else:
+ return
+
+ st = await client.get_chat_member(grp_id, userid)
+ if (
+ st.status != enums.ChatMemberStatus.ADMINISTRATOR
+ and st.status != enums.ChatMemberStatus.OWNER
+ and str(userid) not in ADMINS
+ ):
+ return
+
+
+ if len(args) < 2:
+ await message.reply_text("Command Incomplete :(", quote=True)
+ return
+
+ extracted = split_quotes(args[1])
+ text = extracted[0].lower()
+
+ if not message.reply_to_message and len(extracted) < 2:
+ await message.reply_text("Add some content to save your filter!", quote=True)
+ return
+
+ if (len(extracted) >= 2) and not message.reply_to_message:
+ reply_text, btn, alert = parser(extracted[1], text)
+ fileid = None
+ if not reply_text:
+ await message.reply_text("You cannot have buttons alone, give some text to go with it!", quote=True)
+ return
+
+ elif message.reply_to_message and message.reply_to_message.reply_markup:
+ try:
+ rm = message.reply_to_message.reply_markup
+ btn = rm.inline_keyboard
+ msg = get_file_id(message.reply_to_message)
+ if msg:
+ fileid = msg.file_id
+ reply_text = message.reply_to_message.caption.html
+ else:
+ reply_text = message.reply_to_message.text.html
+ fileid = None
+ alert = None
+ except:
+ reply_text = ""
+ btn = "[]"
+ fileid = None
+ alert = None
+
+ elif message.reply_to_message and message.reply_to_message.media:
+ try:
+ msg = get_file_id(message.reply_to_message)
+ fileid = msg.file_id if msg else None
+ reply_text, btn, alert = parser(extracted[1], text) if message.reply_to_message.sticker else parser(message.reply_to_message.caption.html, text)
+ except:
+ reply_text = ""
+ btn = "[]"
+ alert = None
+ elif message.reply_to_message and message.reply_to_message.text:
+ try:
+ fileid = None
+ reply_text, btn, alert = parser(message.reply_to_message.text.html, text)
+ except:
+ reply_text = ""
+ btn = "[]"
+ alert = None
+ else:
+ return
+
+ await add_filter(grp_id, text, reply_text, btn, fileid, alert)
+
+ await message.reply_text(
+ f"Filter for `{text}` added in **{title}**",
+ quote=True,
+ parse_mode=enums.ParseMode.MARKDOWN
+ )
+
+
+@Client.on_message(filters.command(['viewfilters', 'filters']) & filters.incoming)
+async def get_all(client, message):
+
+ chat_type = message.chat.type
+ userid = message.from_user.id if message.from_user else None
+ if not userid:
+ return await message.reply(f"You are anonymous admin. Use /connect {message.chat.id} in PM")
+ if chat_type == enums.ChatType.PRIVATE:
+ grpid = await active_connection(str(userid))
+ if grpid is not None:
+ grp_id = grpid
+ try:
+ chat = await client.get_chat(grpid)
+ title = chat.title
+ except:
+ await message.reply_text("Make sure I'm present in your group!!", quote=True)
+ return
+ else:
+ await message.reply_text("I'm not connected to any groups!", quote=True)
+ return
+
+ elif chat_type in [enums.ChatType.GROUP, enums.ChatType.SUPERGROUP]:
+ grp_id = message.chat.id
+ title = message.chat.title
+
+ else:
+ return
+
+ st = await client.get_chat_member(grp_id, userid)
+ if (
+ st.status != enums.ChatMemberStatus.ADMINISTRATOR
+ and st.status != enums.ChatMemberStatus.OWNER
+ and str(userid) not in ADMINS
+ ):
+ return
+
+ texts = await get_filters(grp_id)
+ count = await count_filters(grp_id)
+ if count:
+ filterlist = f"Total number of filters in **{title}** : {count}\n\n"
+
+ for text in texts:
+ keywords = " × `{}`\n".format(text)
+
+ filterlist += keywords
+
+ if len(filterlist) > 4096:
+ with io.BytesIO(str.encode(filterlist.replace("`", ""))) as keyword_file:
+ keyword_file.name = "keywords.txt"
+ await message.reply_document(
+ document=keyword_file,
+ quote=True
+ )
+ return
+ else:
+ filterlist = f"There are no active filters in **{title}**"
+
+ await message.reply_text(
+ text=filterlist,
+ quote=True,
+ parse_mode=enums.ParseMode.MARKDOWN
+ )
+
+@Client.on_message(filters.command('del') & filters.incoming)
+async def deletefilter(client, message):
+ userid = message.from_user.id if message.from_user else None
+ if not userid:
+ return await message.reply(f"You are anonymous admin. Use /connect {message.chat.id} in PM")
+ chat_type = message.chat.type
+
+ if chat_type == enums.ChatType.PRIVATE:
+ grpid = await active_connection(str(userid))
+ if grpid is not None:
+ grp_id = grpid
+ try:
+ chat = await client.get_chat(grpid)
+ title = chat.title
+ except:
+ await message.reply_text("Make sure I'm present in your group!!", quote=True)
+ return
+ else:
+ await message.reply_text("I'm not connected to any groups!", quote=True)
+ return
+
+ elif chat_type in [enums.ChatType.GROUP, enums.ChatType.SUPERGROUP]:
+ grp_id = message.chat.id
+ title = message.chat.title
+
+ else:
+ return
+
+ st = await client.get_chat_member(grp_id, userid)
+ if (
+ st.status != enums.ChatMemberStatus.ADMINISTRATOR
+ and st.status != enums.ChatMemberStatus.OWNER
+ and str(userid) not in ADMINS
+ ):
+ return
+
+ try:
+ cmd, text = message.text.split(" ", 1)
+ except:
+ await message.reply_text(
+ "Mention the filtername which you wanna delete!\n\n"
+ "/del filtername\n\n"
+ "Use /viewfilters to view all available filters",
+ quote=True
+ )
+ return
+
+ query = text.lower()
+
+ await delete_filter(message, query, grp_id)
+
+
+@Client.on_message(filters.command('delall') & filters.incoming)
+async def delallconfirm(client, message):
+ userid = message.from_user.id if message.from_user else None
+ if not userid:
+ return await message.reply(f"You are anonymous admin. Use /connect {message.chat.id} in PM")
+ chat_type = message.chat.type
+
+ if chat_type == enums.ChatType.PRIVATE:
+ grpid = await active_connection(str(userid))
+ if grpid is not None:
+ grp_id = grpid
+ try:
+ chat = await client.get_chat(grpid)
+ title = chat.title
+ except:
+ await message.reply_text("Make sure I'm present in your group!!", quote=True)
+ return
+ else:
+ await message.reply_text("I'm not connected to any groups!", quote=True)
+ return
+
+ elif chat_type in [enums.ChatType.GROUP, enums.ChatType.SUPERGROUP]:
+ grp_id = message.chat.id
+ title = message.chat.title
+
+ else:
+ return
+
+
+ st = await client.get_chat_member(grp_id, userid)
+ if (st.status == enums.ChatMemberStatus.OWNER) or (str(userid) in ADMINS):
+ await message.reply_text(
+ f"This will delete all filters from '{title}'.\nDo you want to continue??",
+ reply_markup=InlineKeyboardMarkup([
+ [InlineKeyboardButton(text="YES",callback_data="delallconfirm")],
+ [InlineKeyboardButton(text="CANCEL",callback_data="delallcancel")]
+ ]),
+ quote=True
+ )
diff --git a/plugins/global_filter.py b/plugins/global_filter.py
new file mode 100644
index 0000000..11a5337
--- /dev/null
+++ b/plugins/global_filter.py
@@ -0,0 +1,148 @@
+import io
+from pyrogram import filters, Client, enums
+from pyrogram.types import InlineKeyboardButton, InlineKeyboardMarkup
+from database.gfilters_mdb import(
+ add_gfilter,
+ get_gfilters,
+ delete_gfilter,
+ count_gfilters,
+ del_allg
+)
+
+from database.connections_mdb import active_connection
+from utils import get_file_id, gfilterparser, split_quotes
+from info import ADMINS
+
+
+@Client.on_message(filters.command(['gfilter', 'addg']) & filters.incoming & filters.user(ADMINS))
+async def addgfilter(client, message):
+ args = message.text.html.split(None, 1)
+
+ if len(args) < 2:
+ await message.reply_text("Command Incomplete :(", quote=True)
+ return
+
+ extracted = split_quotes(args[1])
+ text = extracted[0].lower()
+
+ if not message.reply_to_message and len(extracted) < 2:
+ await message.reply_text("Add some content to save your filter!", quote=True)
+ return
+
+ if (len(extracted) >= 2) and not message.reply_to_message:
+ reply_text, btn, alert = gfilterparser(extracted[1], text)
+ fileid = None
+ if not reply_text:
+ await message.reply_text("You cannot have buttons alone, give some text to go with it!", quote=True)
+ return
+
+ elif message.reply_to_message and message.reply_to_message.reply_markup:
+ try:
+ rm = message.reply_to_message.reply_markup
+ btn = rm.inline_keyboard
+ msg = get_file_id(message.reply_to_message)
+ if msg:
+ fileid = msg.file_id
+ reply_text = message.reply_to_message.caption.html
+ else:
+ reply_text = message.reply_to_message.text.html
+ fileid = None
+ alert = None
+ except:
+ reply_text = ""
+ btn = "[]"
+ fileid = None
+ alert = None
+
+ elif message.reply_to_message and message.reply_to_message.media:
+ try:
+ msg = get_file_id(message.reply_to_message)
+ fileid = msg.file_id if msg else None
+ reply_text, btn, alert = gfilterparser(extracted[1], text) if message.reply_to_message.sticker else gfilterparser(message.reply_to_message.caption.html, text)
+ except:
+ reply_text = ""
+ btn = "[]"
+ alert = None
+ elif message.reply_to_message and message.reply_to_message.text:
+ try:
+ fileid = None
+ reply_text, btn, alert = gfilterparser(message.reply_to_message.text.html, text)
+ except:
+ reply_text = ""
+ btn = "[]"
+ alert = None
+ else:
+ return
+
+ await add_gfilter('gfilters', text, reply_text, btn, fileid, alert)
+
+ await message.reply_text(
+ f"GFilter for `{text}` added",
+ quote=True,
+ parse_mode=enums.ParseMode.MARKDOWN
+ )
+
+
+@Client.on_message(filters.command(['viewgfilters', 'gfilters']) & filters.incoming & filters.user(ADMINS))
+async def get_all_gfilters(client, message):
+ texts = await get_gfilters('gfilters')
+ count = await count_gfilters('gfilters')
+ if count:
+ gfilterlist = f"Total number of gfilters : {count}\n\n"
+
+ for text in texts:
+ keywords = " × `{}`\n".format(text)
+
+ gfilterlist += keywords
+
+ if len(gfilterlist) > 4096:
+ with io.BytesIO(str.encode(gfilterlist.replace("`", ""))) as keyword_file:
+ keyword_file.name = "keywords.txt"
+ await message.reply_document(
+ document=keyword_file,
+ quote=True
+ )
+ return
+ else:
+ gfilterlist = f"There are no active gfilters."
+
+ await message.reply_text(
+ text=gfilterlist,
+ quote=True,
+ parse_mode=enums.ParseMode.MARKDOWN
+ )
+
+@Client.on_message(filters.command('delg') & filters.incoming & filters.user(ADMINS))
+async def deletegfilter(client, message):
+ try:
+ cmd, text = message.text.split(" ", 1)
+ except:
+ await message.reply_text(
+ "Mention the gfiltername which you wanna delete!\n\n"
+ "/delg gfiltername\n\n"
+ "Use /viewgfilters to view all available gfilters",
+ quote=True
+ )
+ return
+
+ query = text.lower()
+
+ await delete_gfilter(message, query, 'gfilters')
+
+
+@Client.on_message(filters.command('delallg') & filters.user(ADMINS))
+async def delallgfill(client, message):
+ await message.reply_text(
+ f"Do you want to continue??",
+ reply_markup=InlineKeyboardMarkup([
+ [InlineKeyboardButton(text="YES",callback_data="gconforme")],
+ [InlineKeyboardButton(text="CANCEL",callback_data="close_data")]
+ ]),
+ quote=True
+ )
+
+
+@Client.on_callback_query(filters.regex("gconforme"))
+async def dellacbd(client, message):
+ await del_allg(message.message, 'gfilters')
+ return await message.reply("👍 Done")
From 6f0c29488730765b1389e69221d0d941746f8eb5 Mon Sep 17 00:00:00 2001
From: Soul pc <119080077+soulpc@users.noreply.github.com>
Date: Mon, 9 Oct 2023 08:31:29 +0530
Subject: [PATCH 161/237] Delete plugins/delete_files.py
---
plugins/delete_files.py | 50 -----------------------------------------
1 file changed, 50 deletions(-)
delete mode 100644 plugins/delete_files.py
diff --git a/plugins/delete_files.py b/plugins/delete_files.py
deleted file mode 100644
index dda816f..0000000
--- a/plugins/delete_files.py
+++ /dev/null
@@ -1,50 +0,0 @@
-#https://github.com/Joelkb/DQ-the-file-donor
-
-import re
-import logging
-from pyrogram import Client, filters
-from info import DELETE_CHANNELS
-from database.ia_filterdb import Media, unpack_new_file_id
-
-logger = logging.getLogger(__name__)
-
-media_filter = filters.document | filters.video | filters.audio
-
-
-@Client.on_message(filters.chat(DELETE_CHANNELS) & media_filter)
-async def deletemultiplemedia(bot, message):
- """Delete Multiple files from database"""
-
- for file_type in ("document", "video", "audio"):
- media = getattr(message, file_type, None)
- if media is not None:
- break
- else:
- return
-
- file_id, file_ref = unpack_new_file_id(media.file_id)
-
- result = await Media.collection.delete_one({
- '_id': file_id,
- })
- if result.deleted_count:
- logger.info('File is successfully deleted from database.')
- else:
- file_name = re.sub(r"(_|\-|\.|\+)", " ", str(media.file_name))
- result = await Media.collection.delete_many({
- 'file_name': file_name,
- 'file_size': media.file_size,
- 'mime_type': media.mime_type
- })
- if result.deleted_count:
- logger.info('File is successfully deleted from database.')
- else:
- result = await Media.collection.delete_many({
- 'file_name': media.file_name,
- 'file_size': media.file_size,
- 'mime_type': media.mime_type
- })
- if result.deleted_count:
- logger.info('File is successfully deleted from database.')
- else:
- logger.info('File not found in database.')
From ef622ba44325039613716a279103ff6062e48011 Mon Sep 17 00:00:00 2001
From: Soul pc <119080077+soulpc@users.noreply.github.com>
Date: Mon, 9 Oct 2023 08:31:40 +0530
Subject: [PATCH 162/237] Delete plugins/filters.py
---
plugins/filters.py | 272 ---------------------------------------------
1 file changed, 272 deletions(-)
delete mode 100644 plugins/filters.py
diff --git a/plugins/filters.py b/plugins/filters.py
deleted file mode 100644
index ae0eaaa..0000000
--- a/plugins/filters.py
+++ /dev/null
@@ -1,272 +0,0 @@
-import io
-from pyrogram import filters, Client, enums
-from pyrogram.types import InlineKeyboardButton, InlineKeyboardMarkup
-from database.filters_mdb import(
- add_filter,
- get_filters,
- delete_filter,
- count_filters
-)
-
-from database.connections_mdb import active_connection
-from utils import get_file_id, parser, split_quotes
-from info import ADMINS
-
-
-@Client.on_message(filters.command(['filter', 'add']) & filters.incoming)
-async def addfilter(client, message):
- userid = message.from_user.id if message.from_user else None
- if not userid:
- return await message.reply(f"You are anonymous admin. Use /connect {message.chat.id} in PM")
- chat_type = message.chat.type
- args = message.text.html.split(None, 1)
-
- if chat_type == enums.ChatType.PRIVATE:
- grpid = await active_connection(str(userid))
- if grpid is not None:
- grp_id = grpid
- try:
- chat = await client.get_chat(grpid)
- title = chat.title
- except:
- await message.reply_text("Make sure I'm present in your group!!", quote=True)
- return
- else:
- await message.reply_text("I'm not connected to any groups!", quote=True)
- return
-
- elif chat_type in [enums.ChatType.GROUP, enums.ChatType.SUPERGROUP]:
- grp_id = message.chat.id
- title = message.chat.title
-
- else:
- return
-
- st = await client.get_chat_member(grp_id, userid)
- if (
- st.status != enums.ChatMemberStatus.ADMINISTRATOR
- and st.status != enums.ChatMemberStatus.OWNER
- and str(userid) not in ADMINS
- ):
- return
-
-
- if len(args) < 2:
- await message.reply_text("Command Incomplete :(", quote=True)
- return
-
- extracted = split_quotes(args[1])
- text = extracted[0].lower()
-
- if not message.reply_to_message and len(extracted) < 2:
- await message.reply_text("Add some content to save your filter!", quote=True)
- return
-
- if (len(extracted) >= 2) and not message.reply_to_message:
- reply_text, btn, alert = parser(extracted[1], text)
- fileid = None
- if not reply_text:
- await message.reply_text("You cannot have buttons alone, give some text to go with it!", quote=True)
- return
-
- elif message.reply_to_message and message.reply_to_message.reply_markup:
- try:
- rm = message.reply_to_message.reply_markup
- btn = rm.inline_keyboard
- msg = get_file_id(message.reply_to_message)
- if msg:
- fileid = msg.file_id
- reply_text = message.reply_to_message.caption.html
- else:
- reply_text = message.reply_to_message.text.html
- fileid = None
- alert = None
- except:
- reply_text = ""
- btn = "[]"
- fileid = None
- alert = None
-
- elif message.reply_to_message and message.reply_to_message.media:
- try:
- msg = get_file_id(message.reply_to_message)
- fileid = msg.file_id if msg else None
- reply_text, btn, alert = parser(extracted[1], text) if message.reply_to_message.sticker else parser(message.reply_to_message.caption.html, text)
- except:
- reply_text = ""
- btn = "[]"
- alert = None
- elif message.reply_to_message and message.reply_to_message.text:
- try:
- fileid = None
- reply_text, btn, alert = parser(message.reply_to_message.text.html, text)
- except:
- reply_text = ""
- btn = "[]"
- alert = None
- else:
- return
-
- await add_filter(grp_id, text, reply_text, btn, fileid, alert)
-
- await message.reply_text(
- f"Filter for `{text}` added in **{title}**",
- quote=True,
- parse_mode=enums.ParseMode.MARKDOWN
- )
-
-
-@Client.on_message(filters.command(['viewfilters', 'filters']) & filters.incoming)
-async def get_all(client, message):
-
- chat_type = message.chat.type
- userid = message.from_user.id if message.from_user else None
- if not userid:
- return await message.reply(f"You are anonymous admin. Use /connect {message.chat.id} in PM")
- if chat_type == enums.ChatType.PRIVATE:
- grpid = await active_connection(str(userid))
- if grpid is not None:
- grp_id = grpid
- try:
- chat = await client.get_chat(grpid)
- title = chat.title
- except:
- await message.reply_text("Make sure I'm present in your group!!", quote=True)
- return
- else:
- await message.reply_text("I'm not connected to any groups!", quote=True)
- return
-
- elif chat_type in [enums.ChatType.GROUP, enums.ChatType.SUPERGROUP]:
- grp_id = message.chat.id
- title = message.chat.title
-
- else:
- return
-
- st = await client.get_chat_member(grp_id, userid)
- if (
- st.status != enums.ChatMemberStatus.ADMINISTRATOR
- and st.status != enums.ChatMemberStatus.OWNER
- and str(userid) not in ADMINS
- ):
- return
-
- texts = await get_filters(grp_id)
- count = await count_filters(grp_id)
- if count:
- filterlist = f"Total number of filters in **{title}** : {count}\n\n"
-
- for text in texts:
- keywords = " × `{}`\n".format(text)
-
- filterlist += keywords
-
- if len(filterlist) > 4096:
- with io.BytesIO(str.encode(filterlist.replace("`", ""))) as keyword_file:
- keyword_file.name = "keywords.txt"
- await message.reply_document(
- document=keyword_file,
- quote=True
- )
- return
- else:
- filterlist = f"There are no active filters in **{title}**"
-
- await message.reply_text(
- text=filterlist,
- quote=True,
- parse_mode=enums.ParseMode.MARKDOWN
- )
-
-@Client.on_message(filters.command('del') & filters.incoming)
-async def deletefilter(client, message):
- userid = message.from_user.id if message.from_user else None
- if not userid:
- return await message.reply(f"You are anonymous admin. Use /connect {message.chat.id} in PM")
- chat_type = message.chat.type
-
- if chat_type == enums.ChatType.PRIVATE:
- grpid = await active_connection(str(userid))
- if grpid is not None:
- grp_id = grpid
- try:
- chat = await client.get_chat(grpid)
- title = chat.title
- except:
- await message.reply_text("Make sure I'm present in your group!!", quote=True)
- return
- else:
- await message.reply_text("I'm not connected to any groups!", quote=True)
- return
-
- elif chat_type in [enums.ChatType.GROUP, enums.ChatType.SUPERGROUP]:
- grp_id = message.chat.id
- title = message.chat.title
-
- else:
- return
-
- st = await client.get_chat_member(grp_id, userid)
- if (
- st.status != enums.ChatMemberStatus.ADMINISTRATOR
- and st.status != enums.ChatMemberStatus.OWNER
- and str(userid) not in ADMINS
- ):
- return
-
- try:
- cmd, text = message.text.split(" ", 1)
- except:
- await message.reply_text(
- "Mention the filtername which you wanna delete!\n\n"
- "/del filtername\n\n"
- "Use /viewfilters to view all available filters",
- quote=True
- )
- return
-
- query = text.lower()
-
- await delete_filter(message, query, grp_id)
-
-
-@Client.on_message(filters.command('delall') & filters.incoming)
-async def delallconfirm(client, message):
- userid = message.from_user.id if message.from_user else None
- if not userid:
- return await message.reply(f"You are anonymous admin. Use /connect {message.chat.id} in PM")
- chat_type = message.chat.type
-
- if chat_type == enums.ChatType.PRIVATE:
- grpid = await active_connection(str(userid))
- if grpid is not None:
- grp_id = grpid
- try:
- chat = await client.get_chat(grpid)
- title = chat.title
- except:
- await message.reply_text("Make sure I'm present in your group!!", quote=True)
- return
- else:
- await message.reply_text("I'm not connected to any groups!", quote=True)
- return
-
- elif chat_type in [enums.ChatType.GROUP, enums.ChatType.SUPERGROUP]:
- grp_id = message.chat.id
- title = message.chat.title
-
- else:
- return
-
-
- st = await client.get_chat_member(grp_id, userid)
- if (st.status == enums.ChatMemberStatus.OWNER) or (str(userid) in ADMINS):
- await message.reply_text(
- f"This will delete all filters from '{title}'.\nDo you want to continue??",
- reply_markup=InlineKeyboardMarkup([
- [InlineKeyboardButton(text="YES",callback_data="delallconfirm")],
- [InlineKeyboardButton(text="CANCEL",callback_data="delallcancel")]
- ]),
- quote=True
- )
From 8e517a4b37ce4a803616c5ed6515a965be808024 Mon Sep 17 00:00:00 2001
From: Soul pc <119080077+soulpc@users.noreply.github.com>
Date: Mon, 9 Oct 2023 08:31:51 +0530
Subject: [PATCH 163/237] Delete plugins/global_filter.py
---
plugins/global_filter.py | 148 ---------------------------------------
1 file changed, 148 deletions(-)
delete mode 100644 plugins/global_filter.py
diff --git a/plugins/global_filter.py b/plugins/global_filter.py
deleted file mode 100644
index 11a5337..0000000
--- a/plugins/global_filter.py
+++ /dev/null
@@ -1,148 +0,0 @@
-import io
-from pyrogram import filters, Client, enums
-from pyrogram.types import InlineKeyboardButton, InlineKeyboardMarkup
-from database.gfilters_mdb import(
- add_gfilter,
- get_gfilters,
- delete_gfilter,
- count_gfilters,
- del_allg
-)
-
-from database.connections_mdb import active_connection
-from utils import get_file_id, gfilterparser, split_quotes
-from info import ADMINS
-
-
-@Client.on_message(filters.command(['gfilter', 'addg']) & filters.incoming & filters.user(ADMINS))
-async def addgfilter(client, message):
- args = message.text.html.split(None, 1)
-
- if len(args) < 2:
- await message.reply_text("Command Incomplete :(", quote=True)
- return
-
- extracted = split_quotes(args[1])
- text = extracted[0].lower()
-
- if not message.reply_to_message and len(extracted) < 2:
- await message.reply_text("Add some content to save your filter!", quote=True)
- return
-
- if (len(extracted) >= 2) and not message.reply_to_message:
- reply_text, btn, alert = gfilterparser(extracted[1], text)
- fileid = None
- if not reply_text:
- await message.reply_text("You cannot have buttons alone, give some text to go with it!", quote=True)
- return
-
- elif message.reply_to_message and message.reply_to_message.reply_markup:
- try:
- rm = message.reply_to_message.reply_markup
- btn = rm.inline_keyboard
- msg = get_file_id(message.reply_to_message)
- if msg:
- fileid = msg.file_id
- reply_text = message.reply_to_message.caption.html
- else:
- reply_text = message.reply_to_message.text.html
- fileid = None
- alert = None
- except:
- reply_text = ""
- btn = "[]"
- fileid = None
- alert = None
-
- elif message.reply_to_message and message.reply_to_message.media:
- try:
- msg = get_file_id(message.reply_to_message)
- fileid = msg.file_id if msg else None
- reply_text, btn, alert = gfilterparser(extracted[1], text) if message.reply_to_message.sticker else gfilterparser(message.reply_to_message.caption.html, text)
- except:
- reply_text = ""
- btn = "[]"
- alert = None
- elif message.reply_to_message and message.reply_to_message.text:
- try:
- fileid = None
- reply_text, btn, alert = gfilterparser(message.reply_to_message.text.html, text)
- except:
- reply_text = ""
- btn = "[]"
- alert = None
- else:
- return
-
- await add_gfilter('gfilters', text, reply_text, btn, fileid, alert)
-
- await message.reply_text(
- f"GFilter for `{text}` added",
- quote=True,
- parse_mode=enums.ParseMode.MARKDOWN
- )
-
-
-@Client.on_message(filters.command(['viewgfilters', 'gfilters']) & filters.incoming & filters.user(ADMINS))
-async def get_all_gfilters(client, message):
- texts = await get_gfilters('gfilters')
- count = await count_gfilters('gfilters')
- if count:
- gfilterlist = f"Total number of gfilters : {count}\n\n"
-
- for text in texts:
- keywords = " × `{}`\n".format(text)
-
- gfilterlist += keywords
-
- if len(gfilterlist) > 4096:
- with io.BytesIO(str.encode(gfilterlist.replace("`", ""))) as keyword_file:
- keyword_file.name = "keywords.txt"
- await message.reply_document(
- document=keyword_file,
- quote=True
- )
- return
- else:
- gfilterlist = f"There are no active gfilters."
-
- await message.reply_text(
- text=gfilterlist,
- quote=True,
- parse_mode=enums.ParseMode.MARKDOWN
- )
-
-@Client.on_message(filters.command('delg') & filters.incoming & filters.user(ADMINS))
-async def deletegfilter(client, message):
- try:
- cmd, text = message.text.split(" ", 1)
- except:
- await message.reply_text(
- "Mention the gfiltername which you wanna delete!\n\n"
- "/delg gfiltername\n\n"
- "Use /viewgfilters to view all available gfilters",
- quote=True
- )
- return
-
- query = text.lower()
-
- await delete_gfilter(message, query, 'gfilters')
-
-
-@Client.on_message(filters.command('delallg') & filters.user(ADMINS))
-async def delallgfill(client, message):
- await message.reply_text(
- f"Do you want to continue??",
- reply_markup=InlineKeyboardMarkup([
- [InlineKeyboardButton(text="YES",callback_data="gconforme")],
- [InlineKeyboardButton(text="CANCEL",callback_data="close_data")]
- ]),
- quote=True
- )
-
-
-@Client.on_callback_query(filters.regex("gconforme"))
-async def dellacbd(client, message):
- await del_allg(message.message, 'gfilters')
- return await message.reply("👍 Done")
From 65ce360c035ca308b98b6fc9365b13d74dcc2e67 Mon Sep 17 00:00:00 2001
From: Soul pc <119080077+soulpc@users.noreply.github.com>
Date: Tue, 10 Oct 2023 10:13:36 +0530
Subject: [PATCH 164/237] Update info.py
---
info.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/info.py b/info.py
index 2524d41..46a90e9 100644
--- a/info.py
+++ b/info.py
@@ -48,8 +48,8 @@ def __init__(self):
# Bot settings
CACHE_TIME = int(environ.get('CACHE_TIME', 600))
USE_CAPTION_FILTER = bool(environ.get('USE_CAPTION_FILTER', False))
-PICS = (environ.get('PICS', 'https://telegra.ph/file/2992a480cae2bc0de1c39.jpg https://telegra.ph/file/76e7b5e94430b84a3d2b2.jpg https://telegra.ph/file/3544a8773740b0412c9dd.jpg https://telegra.ph/file/4b1c7004ea8bd3fed8df9.jpg https://telegra.ph/file/a02e47d932adc336740fa.jpg')).split()
-NOR_IMG = environ.get('NOR_IMG', "https://telegra.ph/file/c37370e277b219836b5a1.jpg")
+PICS = (environ.get('PICS', 'https://telegra.ph/file/715d2668aadfb32cf55de.jpg https://telegra.ph/file/76e7b5e94430b84a3d2b2.jpg https://telegra.ph/file/3544a8773740b0412c9dd.jpg https://telegra.ph/file/4b1c7004ea8bd3fed8df9.jpg https://telegra.ph/file/a02e47d932adc336740fa.jpg')).split()
+NOR_IMG = environ.get('NOR_IMG', "https://telegra.ph/file/715d2668aadfb32cf55de.jpg")
SPELL_IMG = environ.get('SPELL_IMG',"https://telegra.ph/file/f044938bb933f4f7ace82.jpg")
# Welcome area
From 8ae1cb24664137f5d2c56c917d5b1d8c643cd7c8 Mon Sep 17 00:00:00 2001
From: Soul pc <119080077+soulpc@users.noreply.github.com>
Date: Tue, 10 Oct 2023 10:23:12 +0530
Subject: [PATCH 165/237] Update info.py
---
info.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/info.py b/info.py
index 46a90e9..a472521 100644
--- a/info.py
+++ b/info.py
@@ -50,7 +50,7 @@ def __init__(self):
USE_CAPTION_FILTER = bool(environ.get('USE_CAPTION_FILTER', False))
PICS = (environ.get('PICS', 'https://telegra.ph/file/715d2668aadfb32cf55de.jpg https://telegra.ph/file/76e7b5e94430b84a3d2b2.jpg https://telegra.ph/file/3544a8773740b0412c9dd.jpg https://telegra.ph/file/4b1c7004ea8bd3fed8df9.jpg https://telegra.ph/file/a02e47d932adc336740fa.jpg')).split()
NOR_IMG = environ.get('NOR_IMG', "https://telegra.ph/file/715d2668aadfb32cf55de.jpg")
-SPELL_IMG = environ.get('SPELL_IMG',"https://telegra.ph/file/f044938bb933f4f7ace82.jpg")
+SPELL_IMG = environ.get('SPELL_IMG',"https://telegra.ph/file/89b856e886483f9019094.jpg")
# Welcome area
MELCOW_IMG = environ.get('MELCOW_IMG',"https://telegra.ph/file/e54cae941b9b81f13eb71.jpg")
From 8a0d081a856c8242815e2964bf264374aa9294b4 Mon Sep 17 00:00:00 2001
From: Soul pc <119080077+soulpc@users.noreply.github.com>
Date: Tue, 10 Oct 2023 12:07:29 +0530
Subject: [PATCH 166/237] Update Script.py
---
Script.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Script.py b/Script.py
index eb677f8..60e9c77 100644
--- a/Script.py
+++ b/Script.py
@@ -327,7 +327,7 @@ class script(object):
1️⃣ സിനിമയുടെ സ്പെല്ലിങ്ങ് ഗൂഗിളിൽ ഉള്ളത് പോലെ ആണോ നിങ്ങൾ അടിച്ചത് എന്ന് ഉറപ്പ് വരുത്തുക..!!
- 2️⃣ നിങ്ങൾ ചോദിച്ച സിനിമ OTT റിലീസ് ആയതാണോ എന്ന് @https:@OTT_ARAKAL_THERAVAD_MOVIES യിൽ ചെക്ക് ചെയ്യുക..!!
+ 2️⃣ നിങ്ങൾ ചോദിച്ച സിനിമ OTT റിലീസ് ആയതാണോ എന്ന് @OTT_ARAKAL_THERAVAD_MOVIES യിൽ ചെക്ക് ചെയ്യുക..!!
3️⃣ മൂവിക്ക് വേണ്ടി മെസ്സേജ് അയക്കുമ്പോൾ മൂവിയുടെ പേര് ഇറങ്ങിയ വർഷം മാത്രം അയക്കുക..!!
From 635bc123c644edc5c3bd5c907496eaab46da45bf Mon Sep 17 00:00:00 2001
From: Soul pc <119080077+soulpc@users.noreply.github.com>
Date: Wed, 18 Oct 2023 15:48:27 +0530
Subject: [PATCH 167/237] Update Script.py
---
Script.py | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/Script.py b/Script.py
index 60e9c77..af8ff09 100644
--- a/Script.py
+++ b/Script.py
@@ -344,7 +344,9 @@ class script(object):
2️⃣ നിങ്ങൾ ചോദിച്ച സിനിമ OTT റിലീസ് ആയതാണോ എന്ന് @OTT_ARAKAL_THERAVAD_MOVIES യിൽ ചെക്ക് ചെയ്യുക..!!
-3️⃣ മൂവിക്ക് വേണ്ടി മെസ്സേജ് അയക്കുമ്പോൾ മൂവിയുടെ പേര് ഇറങ്ങിയ വർഷം മാത്രം അയക്കുക..!!"""
+3️⃣ മൂവിക്ക് വേണ്ടി മെസ്സേജ് അയക്കുമ്പോൾ മൂവിയുടെ പേര് ഇറങ്ങിയ വർഷം മാത്രം അയക്കുക..!!
+
+"4⃣ ‼ 𝖱𝖾𝗉𝗈𝗋𝗍 𝗍𝗈 𝖺𝖽𝗆𝗂𝗇 ▶ @ARAKAL_THERAVAD_MOVIES_02_bot """
I_CUD_NT = """ʜᴇʟʟᴏ {} ɪ ᴄᴏᴜʟᴅɴ'ᴛ ꜰɪɴᴅ ᴀɴʏᴛʜɪɴɢ ʀᴇʟᴀᴛᴇᴅ ᴛᴏ ᴛʜᴀᴛ.ᴄʜᴇᴄᴋ ʏᴏᴜʀ ꜱᴘᴇʟʟɪɴɢ."""
From c647653a752dbe4883c0f076389acb4380df1766 Mon Sep 17 00:00:00 2001
From: Soul pc <119080077+soulpc@users.noreply.github.com>
Date: Wed, 18 Oct 2023 16:34:16 +0530
Subject: [PATCH 168/237] Update commands.py
---
plugins/commands.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/plugins/commands.py b/plugins/commands.py
index 24b624f..ce32f5f 100644
--- a/plugins/commands.py
+++ b/plugins/commands.py
@@ -23,10 +23,10 @@ async def start(client, message):
if message.chat.type in [enums.ChatType.GROUP, enums.ChatType.SUPERGROUP]:
buttons = [
[
- InlineKeyboardButton('🤖 Updates', url=(MAIN_CHANNEL))
+ InlineKeyboardButton('🖥 𝗡𝗘𝗪 𝗢𝗧𝗧 𝗨𝗣𝗗𝗔𝗧𝗘𝗦 🖥', url=f'https://t.me/OTT_ARAKAL_THERAVAD_MOVIES')
],
[
- InlineKeyboardButton('ʜᴇʟᴘ', url=f"https://t.me/{temp.U_NAME}?start=help"),
+ InlineKeyboardButton('⭕️𝗚𝗘𝗧 𝗢𝗨𝗥 𝗖𝗛𝗔𝗡𝗡𝗘𝗟 𝗟𝗜𝗡𝗞𝗦 ⭕️', url="https://t.me/ARAKAL_THERAVAD_GROUP_LINKS"),
]
]
reply_markup = InlineKeyboardMarkup(buttons)
From 70cf994d5df614862afb1fbfd879c41430dbae61 Mon Sep 17 00:00:00 2001
From: Soul pc <119080077+soulpc@users.noreply.github.com>
Date: Fri, 20 Oct 2023 19:08:20 +0530
Subject: [PATCH 169/237] Update info.py
---
info.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/info.py b/info.py
index a472521..a056cf0 100644
--- a/info.py
+++ b/info.py
@@ -108,8 +108,8 @@ def __init__(self):
SUPPORT_CHAT = environ.get('SUPPORT_CHAT', 'Elsasupportgp')
AUTO_DELETE = is_enabled((environ.get('AUTO_DELETE', "True")), True)
P_TTI_SHOW_OFF = is_enabled((environ.get('P_TTI_SHOW_OFF', "False")), False)
-IMDB = is_enabled((environ.get('IMDB', "True")), True)
-SINGLE_BUTTON = is_enabled((environ.get('SINGLE_BUTTON', "False")), False)
+IMDB = is_enabled((environ.get('IMDB', "False")), False)
+SINGLE_BUTTON = is_enabled((environ.get('SINGLE_BUTTON', "true")), true)
CUSTOM_FILE_CAPTION = environ.get("CUSTOM_FILE_CAPTION", f"{script.CUSTOM_FILE_CAPTION}")
BATCH_FILE_CAPTION = environ.get("BATCH_FILE_CAPTION", CUSTOM_FILE_CAPTION)
IMDB_TEMPLATE = environ.get("IMDB_TEMPLATE", f"{script.IMDB_TEMPLATE_TXT}")
From 67b3b33d8acc28e5bc814881b072c077358af3db Mon Sep 17 00:00:00 2001
From: Soul pc <119080077+soulpc@users.noreply.github.com>
Date: Fri, 20 Oct 2023 21:22:35 +0530
Subject: [PATCH 170/237] Create delete_files.py
---
plugins/delete_files.py | 50 +++++++++++++++++++++++++++++++++++++++++
1 file changed, 50 insertions(+)
create mode 100644 plugins/delete_files.py
diff --git a/plugins/delete_files.py b/plugins/delete_files.py
new file mode 100644
index 0000000..dda816f
--- /dev/null
+++ b/plugins/delete_files.py
@@ -0,0 +1,50 @@
+#https://github.com/Joelkb/DQ-the-file-donor
+
+import re
+import logging
+from pyrogram import Client, filters
+from info import DELETE_CHANNELS
+from database.ia_filterdb import Media, unpack_new_file_id
+
+logger = logging.getLogger(__name__)
+
+media_filter = filters.document | filters.video | filters.audio
+
+
+@Client.on_message(filters.chat(DELETE_CHANNELS) & media_filter)
+async def deletemultiplemedia(bot, message):
+ """Delete Multiple files from database"""
+
+ for file_type in ("document", "video", "audio"):
+ media = getattr(message, file_type, None)
+ if media is not None:
+ break
+ else:
+ return
+
+ file_id, file_ref = unpack_new_file_id(media.file_id)
+
+ result = await Media.collection.delete_one({
+ '_id': file_id,
+ })
+ if result.deleted_count:
+ logger.info('File is successfully deleted from database.')
+ else:
+ file_name = re.sub(r"(_|\-|\.|\+)", " ", str(media.file_name))
+ result = await Media.collection.delete_many({
+ 'file_name': file_name,
+ 'file_size': media.file_size,
+ 'mime_type': media.mime_type
+ })
+ if result.deleted_count:
+ logger.info('File is successfully deleted from database.')
+ else:
+ result = await Media.collection.delete_many({
+ 'file_name': media.file_name,
+ 'file_size': media.file_size,
+ 'mime_type': media.mime_type
+ })
+ if result.deleted_count:
+ logger.info('File is successfully deleted from database.')
+ else:
+ logger.info('File not found in database.')
From cf191d4649390f8f6f41590be6e6eb370a05c466 Mon Sep 17 00:00:00 2001
From: Soul pc <119080077+soulpc@users.noreply.github.com>
Date: Sat, 21 Oct 2023 07:58:50 +0530
Subject: [PATCH 171/237] Update info.py
---
info.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/info.py b/info.py
index a056cf0..3823a3d 100644
--- a/info.py
+++ b/info.py
@@ -109,7 +109,7 @@ def __init__(self):
AUTO_DELETE = is_enabled((environ.get('AUTO_DELETE', "True")), True)
P_TTI_SHOW_OFF = is_enabled((environ.get('P_TTI_SHOW_OFF', "False")), False)
IMDB = is_enabled((environ.get('IMDB', "False")), False)
-SINGLE_BUTTON = is_enabled((environ.get('SINGLE_BUTTON', "true")), true)
+SINGLE_BUTTON = is_enabled((environ.get('SINGLE_BUTTON', "True")), True)
CUSTOM_FILE_CAPTION = environ.get("CUSTOM_FILE_CAPTION", f"{script.CUSTOM_FILE_CAPTION}")
BATCH_FILE_CAPTION = environ.get("BATCH_FILE_CAPTION", CUSTOM_FILE_CAPTION)
IMDB_TEMPLATE = environ.get("IMDB_TEMPLATE", f"{script.IMDB_TEMPLATE_TXT}")
From 136c88f8d17b34474981edcf73bc770a94a4b6b4 Mon Sep 17 00:00:00 2001
From: Soul pc <119080077+soulpc@users.noreply.github.com>
Date: Sat, 21 Oct 2023 08:05:53 +0530
Subject: [PATCH 172/237] Update commands.py
---
plugins/commands.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/plugins/commands.py b/plugins/commands.py
index ce32f5f..059ce7f 100644
--- a/plugins/commands.py
+++ b/plugins/commands.py
@@ -243,7 +243,7 @@ async def start(client, message):
chat_id=message.from_user.id,
file_id=file_id,
caption=f_caption,
- reply_markup=InlineKeyboardMarkup( [ [ InlineKeyboardButton('🔰 JOIN ❗️C H A N N E L 🔰', url=(MAIN_CHANNEL)) ] ] ),
+ reply_markup=InlineKeyboardMarkup( [ [ InlineKeyboardButton('🖥 𝗡𝗘𝗪 𝗢𝗧𝗧 𝗨𝗣𝗗𝗔𝗧𝗘𝗦 🖥', url=(MAIN_CHANNEL)) ] ] ),
protect_content=True if pre == 'filep' else False,
)
From b22f8f74b3a57401b23368234f20b53637f7cebf Mon Sep 17 00:00:00 2001
From: Soul pc <119080077+soulpc@users.noreply.github.com>
Date: Sat, 21 Oct 2023 08:08:55 +0530
Subject: [PATCH 173/237] Update delete_files.py
---
plugins/delete_files.py | 37 +++++++++++++++++++++++++++++++++++--
1 file changed, 35 insertions(+), 2 deletions(-)
diff --git a/plugins/delete_files.py b/plugins/delete_files.py
index dda816f..798f56f 100644
--- a/plugins/delete_files.py
+++ b/plugins/delete_files.py
@@ -1,50 +1,83 @@
-#https://github.com/Joelkb/DQ-the-file-donor
+#https://github.com/CrazyDeveloperTG/Doctor-Strange
import re
+
import logging
+
from pyrogram import Client, filters
+
from info import DELETE_CHANNELS
+
from database.ia_filterdb import Media, unpack_new_file_id
logger = logging.getLogger(__name__)
media_filter = filters.document | filters.video | filters.audio
-
@Client.on_message(filters.chat(DELETE_CHANNELS) & media_filter)
+
async def deletemultiplemedia(bot, message):
+
"""Delete Multiple files from database"""
for file_type in ("document", "video", "audio"):
+
media = getattr(message, file_type, None)
+
if media is not None:
+
break
+
else:
+
return
file_id, file_ref = unpack_new_file_id(media.file_id)
result = await Media.collection.delete_one({
+
'_id': file_id,
+
})
+
if result.deleted_count:
+
logger.info('File is successfully deleted from database.')
+
else:
+
file_name = re.sub(r"(_|\-|\.|\+)", " ", str(media.file_name))
+
result = await Media.collection.delete_many({
+
'file_name': file_name,
+
'file_size': media.file_size,
+
'mime_type': media.mime_type
+
})
+
if result.deleted_count:
+
logger.info('File is successfully deleted from database.')
+
else:
+
result = await Media.collection.delete_many({
+
'file_name': media.file_name,
+
'file_size': media.file_size,
+
'mime_type': media.mime_type
+
})
+
if result.deleted_count:
+
logger.info('File is successfully deleted from database.')
+
else:
+
logger.info('File not found in database.')
From f40c7216f00a98560e7067890b2ce1408f1936ec Mon Sep 17 00:00:00 2001
From: Soul pc <119080077+soulpc@users.noreply.github.com>
Date: Sat, 21 Oct 2023 08:15:34 +0530
Subject: [PATCH 174/237] Create inline.py
---
plugins/inline.py | 113 ++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 113 insertions(+)
create mode 100644 plugins/inline.py
diff --git a/plugins/inline.py b/plugins/inline.py
new file mode 100644
index 0000000..f02e468
--- /dev/null
+++ b/plugins/inline.py
@@ -0,0 +1,113 @@
+import logging
+from pyrogram import Client, emoji, filters
+from pyrogram.errors.exceptions.bad_request_400 import QueryIdInvalid
+from pyrogram.types import InlineKeyboardButton, InlineKeyboardMarkup, InlineQueryResultCachedDocument, InlineQuery
+from database.ia_filterdb import get_search_results
+from utils import is_subscribed, get_size, temp
+from info import CACHE_TIME, AUTH_USERS, AUTH_CHANNEL, CUSTOM_FILE_CAPTION, REQ_CHANNEL
+
+logger = logging.getLogger(__name__)
+cache_time = 0 if AUTH_USERS or AUTH_CHANNEL else CACHE_TIME
+
+
+async def inline_users(query: InlineQuery):
+ if AUTH_USERS:
+ if query.from_user and query.from_user.id in AUTH_USERS:
+ return True
+ else:
+ return False
+ if query.from_user and query.from_user.id not in temp.BANNED_USERS:
+ return True
+ return False
+
+
+@Client.on_inline_query()
+async def answer(bot, query):
+ """Show search results for given inline query"""
+
+ if not await inline_users(query):
+ await query.answer(results=[],
+ cache_time=0,
+ switch_pm_text='okDa',
+ switch_pm_parameter="hehe")
+ return
+
+ if (AUTH_CHANNEL or REQ_CHANNEL) and not await is_subscribed(bot, query):
+ await query.answer(results=[],
+ cache_time=0,
+ switch_pm_text='You have to subscribe my channel to use the bot',
+ switch_pm_parameter="subscribe")
+ return
+
+ results = []
+ if '|' in query.query:
+ string, file_type = query.query.split('|', maxsplit=1)
+ string = string.strip()
+ file_type = file_type.strip().lower()
+ else:
+ string = query.query.strip()
+ file_type = None
+
+ offset = int(query.offset or 0)
+ reply_markup = get_reply_markup(query=string)
+ files, next_offset, total = await get_search_results(string,
+ file_type=file_type,
+ max_results=10,
+ offset=offset)
+
+ for file in files:
+ title = file.file_name
+ size = get_size(file.file_size)
+ f_caption = file.caption
+ if CUSTOM_FILE_CAPTION:
+ try:
+ f_caption = CUSTOM_FILE_CAPTION.format(file_name='' if title is None else title,
+ file_size='' if size is None else size,
+ file_caption='' if f_caption is None else f_caption)
+ except Exception as e:
+ logger.exception(e)
+ f_caption = f_caption
+ if f_caption is None:
+ f_caption = f"{file.file_name}"
+ results.append(
+ InlineQueryResultCachedDocument(
+ title=file.file_name,
+ document_file_id=file.file_id,
+ caption=f_caption,
+ description=f'Size: {get_size(file.file_size)}\nType: {file.file_type}',
+ reply_markup=reply_markup))
+
+ if results:
+ switch_pm_text = f"{emoji.FILE_FOLDER} Results - {total}"
+ if string:
+ switch_pm_text += f" for {string}"
+ try:
+ await query.answer(results=results,
+ is_personal=True,
+ cache_time=cache_time,
+ switch_pm_text=switch_pm_text,
+ switch_pm_parameter="start",
+ next_offset=str(next_offset))
+ except QueryIdInvalid:
+ pass
+ except Exception as e:
+ logging.exception(str(e))
+ else:
+ switch_pm_text = f'{emoji.CROSS_MARK} No results'
+ if string:
+ switch_pm_text += f' for "{string}"'
+
+ await query.answer(results=[],
+ is_personal=True,
+ cache_time=cache_time,
+ switch_pm_text=switch_pm_text,
+ switch_pm_parameter="okay")
+
+
+def get_reply_markup(query):
+ buttons = [
+ [
+ InlineKeyboardButton('Search again', switch_inline_query_current_chat=query)
+ ]
+ ]
+ return InlineKeyboardMarkup(buttons)
From ee1cfd60fd9b144d9bab714abc319d276755a79b Mon Sep 17 00:00:00 2001
From: Soul pc <119080077+soulpc@users.noreply.github.com>
Date: Sat, 21 Oct 2023 08:17:10 +0530
Subject: [PATCH 175/237] Create global_filter.py
---
plugins/global_filter.py | 148 +++++++++++++++++++++++++++++++++++++++
1 file changed, 148 insertions(+)
create mode 100644 plugins/global_filter.py
diff --git a/plugins/global_filter.py b/plugins/global_filter.py
new file mode 100644
index 0000000..11a5337
--- /dev/null
+++ b/plugins/global_filter.py
@@ -0,0 +1,148 @@
+import io
+from pyrogram import filters, Client, enums
+from pyrogram.types import InlineKeyboardButton, InlineKeyboardMarkup
+from database.gfilters_mdb import(
+ add_gfilter,
+ get_gfilters,
+ delete_gfilter,
+ count_gfilters,
+ del_allg
+)
+
+from database.connections_mdb import active_connection
+from utils import get_file_id, gfilterparser, split_quotes
+from info import ADMINS
+
+
+@Client.on_message(filters.command(['gfilter', 'addg']) & filters.incoming & filters.user(ADMINS))
+async def addgfilter(client, message):
+ args = message.text.html.split(None, 1)
+
+ if len(args) < 2:
+ await message.reply_text("Command Incomplete :(", quote=True)
+ return
+
+ extracted = split_quotes(args[1])
+ text = extracted[0].lower()
+
+ if not message.reply_to_message and len(extracted) < 2:
+ await message.reply_text("Add some content to save your filter!", quote=True)
+ return
+
+ if (len(extracted) >= 2) and not message.reply_to_message:
+ reply_text, btn, alert = gfilterparser(extracted[1], text)
+ fileid = None
+ if not reply_text:
+ await message.reply_text("You cannot have buttons alone, give some text to go with it!", quote=True)
+ return
+
+ elif message.reply_to_message and message.reply_to_message.reply_markup:
+ try:
+ rm = message.reply_to_message.reply_markup
+ btn = rm.inline_keyboard
+ msg = get_file_id(message.reply_to_message)
+ if msg:
+ fileid = msg.file_id
+ reply_text = message.reply_to_message.caption.html
+ else:
+ reply_text = message.reply_to_message.text.html
+ fileid = None
+ alert = None
+ except:
+ reply_text = ""
+ btn = "[]"
+ fileid = None
+ alert = None
+
+ elif message.reply_to_message and message.reply_to_message.media:
+ try:
+ msg = get_file_id(message.reply_to_message)
+ fileid = msg.file_id if msg else None
+ reply_text, btn, alert = gfilterparser(extracted[1], text) if message.reply_to_message.sticker else gfilterparser(message.reply_to_message.caption.html, text)
+ except:
+ reply_text = ""
+ btn = "[]"
+ alert = None
+ elif message.reply_to_message and message.reply_to_message.text:
+ try:
+ fileid = None
+ reply_text, btn, alert = gfilterparser(message.reply_to_message.text.html, text)
+ except:
+ reply_text = ""
+ btn = "[]"
+ alert = None
+ else:
+ return
+
+ await add_gfilter('gfilters', text, reply_text, btn, fileid, alert)
+
+ await message.reply_text(
+ f"GFilter for `{text}` added",
+ quote=True,
+ parse_mode=enums.ParseMode.MARKDOWN
+ )
+
+
+@Client.on_message(filters.command(['viewgfilters', 'gfilters']) & filters.incoming & filters.user(ADMINS))
+async def get_all_gfilters(client, message):
+ texts = await get_gfilters('gfilters')
+ count = await count_gfilters('gfilters')
+ if count:
+ gfilterlist = f"Total number of gfilters : {count}\n\n"
+
+ for text in texts:
+ keywords = " × `{}`\n".format(text)
+
+ gfilterlist += keywords
+
+ if len(gfilterlist) > 4096:
+ with io.BytesIO(str.encode(gfilterlist.replace("`", ""))) as keyword_file:
+ keyword_file.name = "keywords.txt"
+ await message.reply_document(
+ document=keyword_file,
+ quote=True
+ )
+ return
+ else:
+ gfilterlist = f"There are no active gfilters."
+
+ await message.reply_text(
+ text=gfilterlist,
+ quote=True,
+ parse_mode=enums.ParseMode.MARKDOWN
+ )
+
+@Client.on_message(filters.command('delg') & filters.incoming & filters.user(ADMINS))
+async def deletegfilter(client, message):
+ try:
+ cmd, text = message.text.split(" ", 1)
+ except:
+ await message.reply_text(
+ "Mention the gfiltername which you wanna delete!\n\n"
+ "/delg gfiltername\n\n"
+ "Use /viewgfilters to view all available gfilters",
+ quote=True
+ )
+ return
+
+ query = text.lower()
+
+ await delete_gfilter(message, query, 'gfilters')
+
+
+@Client.on_message(filters.command('delallg') & filters.user(ADMINS))
+async def delallgfill(client, message):
+ await message.reply_text(
+ f"Do you want to continue??",
+ reply_markup=InlineKeyboardMarkup([
+ [InlineKeyboardButton(text="YES",callback_data="gconforme")],
+ [InlineKeyboardButton(text="CANCEL",callback_data="close_data")]
+ ]),
+ quote=True
+ )
+
+
+@Client.on_callback_query(filters.regex("gconforme"))
+async def dellacbd(client, message):
+ await del_allg(message.message, 'gfilters')
+ return await message.reply("👍 Done")
From 8f2096c89325b83ec2e284263c4144221f6854ce Mon Sep 17 00:00:00 2001
From: Soul pc <119080077+soulpc@users.noreply.github.com>
Date: Sat, 21 Oct 2023 08:19:16 +0530
Subject: [PATCH 176/237] Create filters.py
---
plugins/filters.py | 272 +++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 272 insertions(+)
create mode 100644 plugins/filters.py
diff --git a/plugins/filters.py b/plugins/filters.py
new file mode 100644
index 0000000..ae0eaaa
--- /dev/null
+++ b/plugins/filters.py
@@ -0,0 +1,272 @@
+import io
+from pyrogram import filters, Client, enums
+from pyrogram.types import InlineKeyboardButton, InlineKeyboardMarkup
+from database.filters_mdb import(
+ add_filter,
+ get_filters,
+ delete_filter,
+ count_filters
+)
+
+from database.connections_mdb import active_connection
+from utils import get_file_id, parser, split_quotes
+from info import ADMINS
+
+
+@Client.on_message(filters.command(['filter', 'add']) & filters.incoming)
+async def addfilter(client, message):
+ userid = message.from_user.id if message.from_user else None
+ if not userid:
+ return await message.reply(f"You are anonymous admin. Use /connect {message.chat.id} in PM")
+ chat_type = message.chat.type
+ args = message.text.html.split(None, 1)
+
+ if chat_type == enums.ChatType.PRIVATE:
+ grpid = await active_connection(str(userid))
+ if grpid is not None:
+ grp_id = grpid
+ try:
+ chat = await client.get_chat(grpid)
+ title = chat.title
+ except:
+ await message.reply_text("Make sure I'm present in your group!!", quote=True)
+ return
+ else:
+ await message.reply_text("I'm not connected to any groups!", quote=True)
+ return
+
+ elif chat_type in [enums.ChatType.GROUP, enums.ChatType.SUPERGROUP]:
+ grp_id = message.chat.id
+ title = message.chat.title
+
+ else:
+ return
+
+ st = await client.get_chat_member(grp_id, userid)
+ if (
+ st.status != enums.ChatMemberStatus.ADMINISTRATOR
+ and st.status != enums.ChatMemberStatus.OWNER
+ and str(userid) not in ADMINS
+ ):
+ return
+
+
+ if len(args) < 2:
+ await message.reply_text("Command Incomplete :(", quote=True)
+ return
+
+ extracted = split_quotes(args[1])
+ text = extracted[0].lower()
+
+ if not message.reply_to_message and len(extracted) < 2:
+ await message.reply_text("Add some content to save your filter!", quote=True)
+ return
+
+ if (len(extracted) >= 2) and not message.reply_to_message:
+ reply_text, btn, alert = parser(extracted[1], text)
+ fileid = None
+ if not reply_text:
+ await message.reply_text("You cannot have buttons alone, give some text to go with it!", quote=True)
+ return
+
+ elif message.reply_to_message and message.reply_to_message.reply_markup:
+ try:
+ rm = message.reply_to_message.reply_markup
+ btn = rm.inline_keyboard
+ msg = get_file_id(message.reply_to_message)
+ if msg:
+ fileid = msg.file_id
+ reply_text = message.reply_to_message.caption.html
+ else:
+ reply_text = message.reply_to_message.text.html
+ fileid = None
+ alert = None
+ except:
+ reply_text = ""
+ btn = "[]"
+ fileid = None
+ alert = None
+
+ elif message.reply_to_message and message.reply_to_message.media:
+ try:
+ msg = get_file_id(message.reply_to_message)
+ fileid = msg.file_id if msg else None
+ reply_text, btn, alert = parser(extracted[1], text) if message.reply_to_message.sticker else parser(message.reply_to_message.caption.html, text)
+ except:
+ reply_text = ""
+ btn = "[]"
+ alert = None
+ elif message.reply_to_message and message.reply_to_message.text:
+ try:
+ fileid = None
+ reply_text, btn, alert = parser(message.reply_to_message.text.html, text)
+ except:
+ reply_text = ""
+ btn = "[]"
+ alert = None
+ else:
+ return
+
+ await add_filter(grp_id, text, reply_text, btn, fileid, alert)
+
+ await message.reply_text(
+ f"Filter for `{text}` added in **{title}**",
+ quote=True,
+ parse_mode=enums.ParseMode.MARKDOWN
+ )
+
+
+@Client.on_message(filters.command(['viewfilters', 'filters']) & filters.incoming)
+async def get_all(client, message):
+
+ chat_type = message.chat.type
+ userid = message.from_user.id if message.from_user else None
+ if not userid:
+ return await message.reply(f"You are anonymous admin. Use /connect {message.chat.id} in PM")
+ if chat_type == enums.ChatType.PRIVATE:
+ grpid = await active_connection(str(userid))
+ if grpid is not None:
+ grp_id = grpid
+ try:
+ chat = await client.get_chat(grpid)
+ title = chat.title
+ except:
+ await message.reply_text("Make sure I'm present in your group!!", quote=True)
+ return
+ else:
+ await message.reply_text("I'm not connected to any groups!", quote=True)
+ return
+
+ elif chat_type in [enums.ChatType.GROUP, enums.ChatType.SUPERGROUP]:
+ grp_id = message.chat.id
+ title = message.chat.title
+
+ else:
+ return
+
+ st = await client.get_chat_member(grp_id, userid)
+ if (
+ st.status != enums.ChatMemberStatus.ADMINISTRATOR
+ and st.status != enums.ChatMemberStatus.OWNER
+ and str(userid) not in ADMINS
+ ):
+ return
+
+ texts = await get_filters(grp_id)
+ count = await count_filters(grp_id)
+ if count:
+ filterlist = f"Total number of filters in **{title}** : {count}\n\n"
+
+ for text in texts:
+ keywords = " × `{}`\n".format(text)
+
+ filterlist += keywords
+
+ if len(filterlist) > 4096:
+ with io.BytesIO(str.encode(filterlist.replace("`", ""))) as keyword_file:
+ keyword_file.name = "keywords.txt"
+ await message.reply_document(
+ document=keyword_file,
+ quote=True
+ )
+ return
+ else:
+ filterlist = f"There are no active filters in **{title}**"
+
+ await message.reply_text(
+ text=filterlist,
+ quote=True,
+ parse_mode=enums.ParseMode.MARKDOWN
+ )
+
+@Client.on_message(filters.command('del') & filters.incoming)
+async def deletefilter(client, message):
+ userid = message.from_user.id if message.from_user else None
+ if not userid:
+ return await message.reply(f"You are anonymous admin. Use /connect {message.chat.id} in PM")
+ chat_type = message.chat.type
+
+ if chat_type == enums.ChatType.PRIVATE:
+ grpid = await active_connection(str(userid))
+ if grpid is not None:
+ grp_id = grpid
+ try:
+ chat = await client.get_chat(grpid)
+ title = chat.title
+ except:
+ await message.reply_text("Make sure I'm present in your group!!", quote=True)
+ return
+ else:
+ await message.reply_text("I'm not connected to any groups!", quote=True)
+ return
+
+ elif chat_type in [enums.ChatType.GROUP, enums.ChatType.SUPERGROUP]:
+ grp_id = message.chat.id
+ title = message.chat.title
+
+ else:
+ return
+
+ st = await client.get_chat_member(grp_id, userid)
+ if (
+ st.status != enums.ChatMemberStatus.ADMINISTRATOR
+ and st.status != enums.ChatMemberStatus.OWNER
+ and str(userid) not in ADMINS
+ ):
+ return
+
+ try:
+ cmd, text = message.text.split(" ", 1)
+ except:
+ await message.reply_text(
+ "Mention the filtername which you wanna delete!\n\n"
+ "/del filtername\n\n"
+ "Use /viewfilters to view all available filters",
+ quote=True
+ )
+ return
+
+ query = text.lower()
+
+ await delete_filter(message, query, grp_id)
+
+
+@Client.on_message(filters.command('delall') & filters.incoming)
+async def delallconfirm(client, message):
+ userid = message.from_user.id if message.from_user else None
+ if not userid:
+ return await message.reply(f"You are anonymous admin. Use /connect {message.chat.id} in PM")
+ chat_type = message.chat.type
+
+ if chat_type == enums.ChatType.PRIVATE:
+ grpid = await active_connection(str(userid))
+ if grpid is not None:
+ grp_id = grpid
+ try:
+ chat = await client.get_chat(grpid)
+ title = chat.title
+ except:
+ await message.reply_text("Make sure I'm present in your group!!", quote=True)
+ return
+ else:
+ await message.reply_text("I'm not connected to any groups!", quote=True)
+ return
+
+ elif chat_type in [enums.ChatType.GROUP, enums.ChatType.SUPERGROUP]:
+ grp_id = message.chat.id
+ title = message.chat.title
+
+ else:
+ return
+
+
+ st = await client.get_chat_member(grp_id, userid)
+ if (st.status == enums.ChatMemberStatus.OWNER) or (str(userid) in ADMINS):
+ await message.reply_text(
+ f"This will delete all filters from '{title}'.\nDo you want to continue??",
+ reply_markup=InlineKeyboardMarkup([
+ [InlineKeyboardButton(text="YES",callback_data="delallconfirm")],
+ [InlineKeyboardButton(text="CANCEL",callback_data="delallcancel")]
+ ]),
+ quote=True
+ )
From 8eac8f1ad9d359a9ff8d32281dbb99ad9e09cfd7 Mon Sep 17 00:00:00 2001
From: Soul pc <119080077+soulpc@users.noreply.github.com>
Date: Sat, 21 Oct 2023 08:47:52 +0530
Subject: [PATCH 177/237] Update commands.py
From fda84f423aba49e50a10305c5312baade390d620 Mon Sep 17 00:00:00 2001
From: Soul pc <119080077+soulpc@users.noreply.github.com>
Date: Sat, 21 Oct 2023 09:15:00 +0530
Subject: [PATCH 178/237] Update inline.py
---
plugins/inline.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/plugins/inline.py b/plugins/inline.py
index f02e468..199141f 100644
--- a/plugins/inline.py
+++ b/plugins/inline.py
@@ -4,7 +4,7 @@
from pyrogram.types import InlineKeyboardButton, InlineKeyboardMarkup, InlineQueryResultCachedDocument, InlineQuery
from database.ia_filterdb import get_search_results
from utils import is_subscribed, get_size, temp
-from info import CACHE_TIME, AUTH_USERS, AUTH_CHANNEL, CUSTOM_FILE_CAPTION, REQ_CHANNEL
+from info import CACHE_TIME, AUTH_USERS, AUTH_CHANNEL, CUSTOM_FILE_CAPTION,
logger = logging.getLogger(__name__)
cache_time = 0 if AUTH_USERS or AUTH_CHANNEL else CACHE_TIME
From bfc35498225e14c33b4f6242b0b8eb6b843a25a6 Mon Sep 17 00:00:00 2001
From: Soul pc <119080077+soulpc@users.noreply.github.com>
Date: Sat, 21 Oct 2023 09:19:59 +0530
Subject: [PATCH 179/237] Delete plugins/inline.py
---
plugins/inline.py | 113 ----------------------------------------------
1 file changed, 113 deletions(-)
delete mode 100644 plugins/inline.py
diff --git a/plugins/inline.py b/plugins/inline.py
deleted file mode 100644
index 199141f..0000000
--- a/plugins/inline.py
+++ /dev/null
@@ -1,113 +0,0 @@
-import logging
-from pyrogram import Client, emoji, filters
-from pyrogram.errors.exceptions.bad_request_400 import QueryIdInvalid
-from pyrogram.types import InlineKeyboardButton, InlineKeyboardMarkup, InlineQueryResultCachedDocument, InlineQuery
-from database.ia_filterdb import get_search_results
-from utils import is_subscribed, get_size, temp
-from info import CACHE_TIME, AUTH_USERS, AUTH_CHANNEL, CUSTOM_FILE_CAPTION,
-
-logger = logging.getLogger(__name__)
-cache_time = 0 if AUTH_USERS or AUTH_CHANNEL else CACHE_TIME
-
-
-async def inline_users(query: InlineQuery):
- if AUTH_USERS:
- if query.from_user and query.from_user.id in AUTH_USERS:
- return True
- else:
- return False
- if query.from_user and query.from_user.id not in temp.BANNED_USERS:
- return True
- return False
-
-
-@Client.on_inline_query()
-async def answer(bot, query):
- """Show search results for given inline query"""
-
- if not await inline_users(query):
- await query.answer(results=[],
- cache_time=0,
- switch_pm_text='okDa',
- switch_pm_parameter="hehe")
- return
-
- if (AUTH_CHANNEL or REQ_CHANNEL) and not await is_subscribed(bot, query):
- await query.answer(results=[],
- cache_time=0,
- switch_pm_text='You have to subscribe my channel to use the bot',
- switch_pm_parameter="subscribe")
- return
-
- results = []
- if '|' in query.query:
- string, file_type = query.query.split('|', maxsplit=1)
- string = string.strip()
- file_type = file_type.strip().lower()
- else:
- string = query.query.strip()
- file_type = None
-
- offset = int(query.offset or 0)
- reply_markup = get_reply_markup(query=string)
- files, next_offset, total = await get_search_results(string,
- file_type=file_type,
- max_results=10,
- offset=offset)
-
- for file in files:
- title = file.file_name
- size = get_size(file.file_size)
- f_caption = file.caption
- if CUSTOM_FILE_CAPTION:
- try:
- f_caption = CUSTOM_FILE_CAPTION.format(file_name='' if title is None else title,
- file_size='' if size is None else size,
- file_caption='' if f_caption is None else f_caption)
- except Exception as e:
- logger.exception(e)
- f_caption = f_caption
- if f_caption is None:
- f_caption = f"{file.file_name}"
- results.append(
- InlineQueryResultCachedDocument(
- title=file.file_name,
- document_file_id=file.file_id,
- caption=f_caption,
- description=f'Size: {get_size(file.file_size)}\nType: {file.file_type}',
- reply_markup=reply_markup))
-
- if results:
- switch_pm_text = f"{emoji.FILE_FOLDER} Results - {total}"
- if string:
- switch_pm_text += f" for {string}"
- try:
- await query.answer(results=results,
- is_personal=True,
- cache_time=cache_time,
- switch_pm_text=switch_pm_text,
- switch_pm_parameter="start",
- next_offset=str(next_offset))
- except QueryIdInvalid:
- pass
- except Exception as e:
- logging.exception(str(e))
- else:
- switch_pm_text = f'{emoji.CROSS_MARK} No results'
- if string:
- switch_pm_text += f' for "{string}"'
-
- await query.answer(results=[],
- is_personal=True,
- cache_time=cache_time,
- switch_pm_text=switch_pm_text,
- switch_pm_parameter="okay")
-
-
-def get_reply_markup(query):
- buttons = [
- [
- InlineKeyboardButton('Search again', switch_inline_query_current_chat=query)
- ]
- ]
- return InlineKeyboardMarkup(buttons)
From a73ddde60fcf0344b2411d3f0d7747b69342efa1 Mon Sep 17 00:00:00 2001
From: Soul pc <119080077+soulpc@users.noreply.github.com>
Date: Sat, 21 Oct 2023 09:42:03 +0530
Subject: [PATCH 180/237] Update pm_filter.py
---
plugins/pm_filter.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/plugins/pm_filter.py b/plugins/pm_filter.py
index 12b752b..86ed0ed 100644
--- a/plugins/pm_filter.py
+++ b/plugins/pm_filter.py
@@ -515,7 +515,7 @@ async def cb_handler(client: Client, query: CallbackQuery):
InlineKeyboardButton(f'Tᴀᴍ', 'ftam'),
InlineKeyboardButton(f'Hɪɴ', 'fhin')
],[
- InlineKeyboardButton("🔰 JOIN ❗️C H A N N E L 🔰", url=(MAIN_CHANNEL))
+ InlineKeyboardButton(🖥 𝗡𝗘𝗪 𝗢𝗧𝗧 𝗨𝗣𝗗𝗔𝗧𝗘𝗦 🖥", url=(MAIN_CHANNEL))
]
]
)
From f44ce598efe92b4c4e7cb70e7763fe648bd3072a Mon Sep 17 00:00:00 2001
From: Soul pc <119080077+soulpc@users.noreply.github.com>
Date: Sat, 21 Oct 2023 09:45:44 +0530
Subject: [PATCH 181/237] Update pm_filter.py
---
plugins/pm_filter.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/plugins/pm_filter.py b/plugins/pm_filter.py
index 86ed0ed..7f1b5a5 100644
--- a/plugins/pm_filter.py
+++ b/plugins/pm_filter.py
@@ -515,7 +515,7 @@ async def cb_handler(client: Client, query: CallbackQuery):
InlineKeyboardButton(f'Tᴀᴍ', 'ftam'),
InlineKeyboardButton(f'Hɪɴ', 'fhin')
],[
- InlineKeyboardButton(🖥 𝗡𝗘𝗪 𝗢𝗧𝗧 𝗨𝗣𝗗𝗔𝗧𝗘𝗦 🖥", url=(MAIN_CHANNEL))
+ InlineKeyboardButton( 🖥 𝗡𝗘𝗪 𝗢𝗧𝗧 𝗨𝗣𝗗𝗔𝗧𝗘𝗦 🖥", url=(MAIN_CHANNEL))
]
]
)
From 25088f35bc82167b3227e6d5a5844e5f84b8e803 Mon Sep 17 00:00:00 2001
From: Soul pc <119080077+soulpc@users.noreply.github.com>
Date: Sat, 21 Oct 2023 11:12:26 +0530
Subject: [PATCH 182/237] Update pm_filter.py
---
plugins/pm_filter.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/plugins/pm_filter.py b/plugins/pm_filter.py
index 7f1b5a5..29ad840 100644
--- a/plugins/pm_filter.py
+++ b/plugins/pm_filter.py
@@ -515,7 +515,7 @@ async def cb_handler(client: Client, query: CallbackQuery):
InlineKeyboardButton(f'Tᴀᴍ', 'ftam'),
InlineKeyboardButton(f'Hɪɴ', 'fhin')
],[
- InlineKeyboardButton( 🖥 𝗡𝗘𝗪 𝗢𝗧𝗧 𝗨𝗣𝗗𝗔𝗧𝗘𝗦 🖥", url=(MAIN_CHANNEL))
+ InlineKeyboardButton(🔰 𝗝𝗢𝗜𝗡 ❗️𝗖 𝗛 𝗔 𝗡 𝗡 𝗘 𝗟 🔰", url=(MAIN_CHANNEL))
]
]
)
From e3a3e5be5bcb6da66214600aef498a18d119bc96 Mon Sep 17 00:00:00 2001
From: Soul pc <119080077+soulpc@users.noreply.github.com>
Date: Sat, 21 Oct 2023 11:14:30 +0530
Subject: [PATCH 183/237] Update pm_filter.py
---
plugins/pm_filter.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/plugins/pm_filter.py b/plugins/pm_filter.py
index 29ad840..ade1bc1 100644
--- a/plugins/pm_filter.py
+++ b/plugins/pm_filter.py
@@ -515,7 +515,7 @@ async def cb_handler(client: Client, query: CallbackQuery):
InlineKeyboardButton(f'Tᴀᴍ', 'ftam'),
InlineKeyboardButton(f'Hɪɴ', 'fhin')
],[
- InlineKeyboardButton(🔰 𝗝𝗢𝗜𝗡 ❗️𝗖 𝗛 𝗔 𝗡 𝗡 𝗘 𝗟 🔰", url=(MAIN_CHANNEL))
+ InlineKeyboardButton( 𝗝𝗢𝗜𝗡 ❗️𝗖 𝗛 𝗔 𝗡 𝗡 𝗘 𝗟 🔰", url=(MAIN_CHANNEL))
]
]
)
From eb0202f981f8a7dfacd8c9744d25f8f14207edb6 Mon Sep 17 00:00:00 2001
From: Soul pc <119080077+soulpc@users.noreply.github.com>
Date: Sat, 21 Oct 2023 11:17:01 +0530
Subject: [PATCH 184/237] Update pm_filter.py
---
plugins/pm_filter.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/plugins/pm_filter.py b/plugins/pm_filter.py
index ade1bc1..5439489 100644
--- a/plugins/pm_filter.py
+++ b/plugins/pm_filter.py
@@ -515,7 +515,7 @@ async def cb_handler(client: Client, query: CallbackQuery):
InlineKeyboardButton(f'Tᴀᴍ', 'ftam'),
InlineKeyboardButton(f'Hɪɴ', 'fhin')
],[
- InlineKeyboardButton( 𝗝𝗢𝗜𝗡 ❗️𝗖 𝗛 𝗔 𝗡 𝗡 𝗘 𝗟 🔰", url=(MAIN_CHANNEL))
+ InlineKeyboardButton( 🔰 JOIN ❗️C H A N N E L 🔰 ", url=(MAIN_CHANNEL))
]
]
)
From c6e685b97ee7ab6a34b0b63a0f8d2046eed19409 Mon Sep 17 00:00:00 2001
From: Soul pc <119080077+soulpc@users.noreply.github.com>
Date: Sat, 21 Oct 2023 12:25:39 +0530
Subject: [PATCH 185/237] Update pm_filter.py
---
plugins/pm_filter.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/plugins/pm_filter.py b/plugins/pm_filter.py
index 5439489..2d8b46e 100644
--- a/plugins/pm_filter.py
+++ b/plugins/pm_filter.py
@@ -515,7 +515,7 @@ async def cb_handler(client: Client, query: CallbackQuery):
InlineKeyboardButton(f'Tᴀᴍ', 'ftam'),
InlineKeyboardButton(f'Hɪɴ', 'fhin')
],[
- InlineKeyboardButton( 🔰 JOIN ❗️C H A N N E L 🔰 ", url=(MAIN_CHANNEL))
+ InlineKeyboardButton( JOIN C H A N N E L ", url=(MAIN_CHANNEL))
]
]
)
From b371299e98ee62ede67c43699cf3791d5307c108 Mon Sep 17 00:00:00 2001
From: Soul pc <119080077+soulpc@users.noreply.github.com>
Date: Sat, 21 Oct 2023 12:29:24 +0530
Subject: [PATCH 186/237] Update pm_filter.py
---
plugins/pm_filter.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/plugins/pm_filter.py b/plugins/pm_filter.py
index 2d8b46e..ef9cd11 100644
--- a/plugins/pm_filter.py
+++ b/plugins/pm_filter.py
@@ -515,7 +515,7 @@ async def cb_handler(client: Client, query: CallbackQuery):
InlineKeyboardButton(f'Tᴀᴍ', 'ftam'),
InlineKeyboardButton(f'Hɪɴ', 'fhin')
],[
- InlineKeyboardButton( JOIN C H A N N E L ", url=(MAIN_CHANNEL))
+ InlineKeyboardButton("🔥 ᴄʜᴀɴɴᴇʟ 🔥", url=(MAIN_CHANNEL))
]
]
)
From 83a464549d9919d63ea7f7b50f87f759638a1ccb Mon Sep 17 00:00:00 2001
From: Soul pc <119080077+soulpc@users.noreply.github.com>
Date: Wed, 1 Nov 2023 12:29:09 +0530
Subject: [PATCH 187/237] Update Script.py
---
Script.py | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/Script.py b/Script.py
index af8ff09..ce4f0ad 100644
--- a/Script.py
+++ b/Script.py
@@ -274,7 +274,7 @@ class script(object):
കോപ്പി റൈറ്റ് ഉള്ളത് കൊണ്ട് ഈ ഒരു ഫയൽ 10 മിനിറ്റ് കൊണ്ട് ഇവിടെ നിന്നും ഡിലേറ്റാവും...!!!
╔════ ᴊᴏɪɴ ᴡɪᴛʜ ᴜs ════╗
-♻️ 𝙅𝙊𝙄𝙉 :- OTT UPDATES
+♻️ 𝙅𝙊𝙄𝙉 :- OTT UPDATES
♻️ 𝙅𝙊𝙄𝙉 :- CHANNEL
♻️ 𝙅𝙊𝙄𝙉 :- GROUP
╚════ ᴊᴏɪɴ ᴡɪᴛʜ ᴜs ════╝
@@ -306,7 +306,7 @@ class script(object):
╔════ ᴊᴏɪɴ ᴡɪᴛʜ ᴜs ════╗
▫️ ᴄʜᴀɴɴᴇʟ
-▫️ sᴜᴘᴘᴏʀᴛ ɢʀᴏᴜᴘ
+▫️ sᴜᴘᴘᴏʀᴛ ɢʀᴏᴜᴘ
╚════ ᴊᴏɪɴ ᴡɪᴛʜ ᴜs ════╝"""
RESTART_TXT = """
@@ -327,7 +327,7 @@ class script(object):
1️⃣ സിനിമയുടെ സ്പെല്ലിങ്ങ് ഗൂഗിളിൽ ഉള്ളത് പോലെ ആണോ നിങ്ങൾ അടിച്ചത് എന്ന് ഉറപ്പ് വരുത്തുക..!!
- 2️⃣ നിങ്ങൾ ചോദിച്ച സിനിമ OTT റിലീസ് ആയതാണോ എന്ന് @OTT_ARAKAL_THERAVAD_MOVIES യിൽ ചെക്ക് ചെയ്യുക..!!
+ 2️⃣ നിങ്ങൾ ചോദിച്ച സിനിമ OTT റിലീസ് ആയതാണോ എന്ന് @OTT_ARAKAL_THERAVAD_MOVIESS യിൽ ചെക്ക് ചെയ്യുക..!!
3️⃣ മൂവിക്ക് വേണ്ടി മെസ്സേജ് അയക്കുമ്പോൾ മൂവിയുടെ പേര് ഇറങ്ങിയ വർഷം മാത്രം അയക്കുക..!!
@@ -342,11 +342,11 @@ class script(object):
1️⃣ സിനിമയുടെ സ്പെല്ലിങ്ങ് ഗൂഗിളിൽ ഉള്ളത് പോലെ ആണോ നിങ്ങൾ അടിച്ചത് എന്ന് ഉറപ്പ് വരുത്തുക..!!
- 2️⃣ നിങ്ങൾ ചോദിച്ച സിനിമ OTT റിലീസ് ആയതാണോ എന്ന് @OTT_ARAKAL_THERAVAD_MOVIES യിൽ ചെക്ക് ചെയ്യുക..!!
+ 2️⃣ നിങ്ങൾ ചോദിച്ച സിനിമ OTT റിലീസ് ആയതാണോ എന്ന് @OTT_ARAKAL_THERAVAD_MOVIESS യിൽ ചെക്ക് ചെയ്യുക..!!
3️⃣ മൂവിക്ക് വേണ്ടി മെസ്സേജ് അയക്കുമ്പോൾ മൂവിയുടെ പേര് ഇറങ്ങിയ വർഷം മാത്രം അയക്കുക..!!
-"4⃣ ‼ 𝖱𝖾𝗉𝗈𝗋𝗍 𝗍𝗈 𝖺𝖽𝗆𝗂𝗇 ▶ @ARAKAL_THERAVAD_MOVIES_02_bot """
+4⃣ ‼ 𝖱𝖾𝗉𝗈𝗋𝗍 𝗍𝗈 𝖺𝖽𝗆𝗂𝗇 ▶ @ARAKAL_THERAVAD_MOVIES_02_bot """
I_CUD_NT = """ʜᴇʟʟᴏ {} ɪ ᴄᴏᴜʟᴅɴ'ᴛ ꜰɪɴᴅ ᴀɴʏᴛʜɪɴɢ ʀᴇʟᴀᴛᴇᴅ ᴛᴏ ᴛʜᴀᴛ.ᴄʜᴇᴄᴋ ʏᴏᴜʀ ꜱᴘᴇʟʟɪɴɢ."""
From 733db96a712051822bf53cd1652988f6f0c928f8 Mon Sep 17 00:00:00 2001
From: Soul pc <119080077+soulpc@users.noreply.github.com>
Date: Wed, 1 Nov 2023 12:38:45 +0530
Subject: [PATCH 188/237] Update Script.py
---
Script.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Script.py b/Script.py
index ce4f0ad..6d634e1 100644
--- a/Script.py
+++ b/Script.py
@@ -10,7 +10,7 @@ class script(object):
ABOUT_TXT = """ 𝙼𝚈 𝙽𝙰𝙼𝙴: {}
𝙲𝚁𝙴𝙰𝚃𝙾𝚁: ARAKAL_THERAVAD_MOVIES.𝙲𝙾𝙼
- 𝚃𝙷𝙰𝙽𝙺𝚂 𝚃𝙾: ARAKAL_THERAVAD_MOVIES
+ 𝚃𝙷𝙰𝙽𝙺𝚂 𝚃𝙾: ARAKAL_THERAVAD_MOVIES
𝙳𝙴𝚅: ARAKAL_THERAVAD_MOVIES
𝙻𝙸𝙱𝚁𝙰𝚁𝚈: ARAKAL_THERAVAD_MOVIES
𝙻𝙰𝙽𝙶𝚄𝙰𝙶𝙴: ARAKAL_THERAVAD_MOVIES
From c1b6e0c501e378d4d45332c3d0641fcf00d672e9 Mon Sep 17 00:00:00 2001
From: Soul pc <119080077+soulpc@users.noreply.github.com>
Date: Wed, 1 Nov 2023 12:39:47 +0530
Subject: [PATCH 189/237] Update commands.py
---
plugins/commands.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/plugins/commands.py b/plugins/commands.py
index 059ce7f..4b582d8 100644
--- a/plugins/commands.py
+++ b/plugins/commands.py
@@ -23,7 +23,7 @@ async def start(client, message):
if message.chat.type in [enums.ChatType.GROUP, enums.ChatType.SUPERGROUP]:
buttons = [
[
- InlineKeyboardButton('🖥 𝗡𝗘𝗪 𝗢𝗧𝗧 𝗨𝗣𝗗𝗔𝗧𝗘𝗦 🖥', url=f'https://t.me/OTT_ARAKAL_THERAVAD_MOVIES')
+ InlineKeyboardButton('🖥 𝗡𝗘𝗪 𝗢𝗧𝗧 𝗨𝗣𝗗𝗔𝗧𝗘𝗦 🖥', url=f'https://t.me/OTT_ARAKAL_THERAVAD_MOVIESS')
],
[
InlineKeyboardButton('⭕️𝗚𝗘𝗧 𝗢𝗨𝗥 𝗖𝗛𝗔𝗡𝗡𝗘𝗟 𝗟𝗜𝗡𝗞𝗦 ⭕️', url="https://t.me/ARAKAL_THERAVAD_GROUP_LINKS"),
@@ -48,7 +48,7 @@ async def start(client, message):
InlineKeyboardButton("👥 𝗚𝗥𝗢𝗨𝗣 - 𝟯", url=f"https://t.me/ARAKAL_THERAVAD_GROUP_03"),
InlineKeyboardButton("👥𝗚𝗥𝗢𝗨𝗣 - 𝟰", url=f"https://t.me/ARAKAL_THERAVAD_GROUP_04")
],[
- InlineKeyboardButton("🖥 𝗡𝗘𝗪 𝗢𝗧𝗧 𝗨𝗣𝗗𝗔𝗧𝗘𝗦 🖥", url="https://t.me/OTT_ARAKAL_THERAVAD_MOVIES")
+ InlineKeyboardButton("🖥 𝗡𝗘𝗪 𝗢𝗧𝗧 𝗨𝗣𝗗𝗔𝗧𝗘𝗦 🖥", url="https://t.me/OTT_ARAKAL_THERAVAD_MOVIESS")
],[
InlineKeyboardButton("⭕️𝗚𝗘𝗧 𝗢𝗨𝗥 𝗖𝗛𝗔𝗡𝗡𝗘𝗟 𝗟𝗜𝗡𝗞𝗦 ⭕️", url="https://t.me/ARAKAL_THERAVAD_GROUP_LINKS")
]]
From 2cb3a968a61ca79c9f404a1cffd1de21ea3c5b70 Mon Sep 17 00:00:00 2001
From: Soul pc <119080077+soulpc@users.noreply.github.com>
Date: Wed, 1 Nov 2023 12:42:09 +0530
Subject: [PATCH 190/237] Update info.py
---
info.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/info.py b/info.py
index 3823a3d..8f8fe64 100644
--- a/info.py
+++ b/info.py
@@ -100,7 +100,7 @@ def __init__(self):
PORT = os.environ.get("PORT", "8080")
MAX_BTN = int(environ.get('MAX_BTN', "7"))
S_GROUP = environ.get('S_GROUP',"https://t.me/ARAKAL_THERAVAD_MOVIES")
-MAIN_CHANNEL = environ.get('MAIN_CHANNEL',"https://t.me/OTT_ARAKAL_THERAVAD_MOVIES")
+MAIN_CHANNEL = environ.get('MAIN_CHANNEL',"https://t.me/OTT_ARAKAL_THERAVAD_MOVIESS")
FILE_FORWARD = environ.get('FILE_FORWARD',"https://t.me/Grupo_filles")
MSG_ALRT = environ.get('MSG_ALRT', '𝑪𝑯𝑬𝑪𝑲 & 𝑻𝑹𝒀 𝑨𝑳𝑳 𝑴𝒀 𝑭𝑬𝑨𝑻𝑼𝑹𝑬𝑺')
FILE_CHANNEL = int(environ.get('FILE_CHANNEL', '-1001765119767'))
From 5c6bed9413da96ba208eb14aa6469c541163c269 Mon Sep 17 00:00:00 2001
From: Soul pc <119080077+soulpc@users.noreply.github.com>
Date: Fri, 10 Nov 2023 14:01:10 +0530
Subject: [PATCH 191/237] Update approve.py
---
plugins/approve.py | 54 +++++++++++++++++++++++-----------------------
1 file changed, 27 insertions(+), 27 deletions(-)
diff --git a/plugins/approve.py b/plugins/approve.py
index 3a3fd1b..40fe546 100644
--- a/plugins/approve.py
+++ b/plugins/approve.py
@@ -1,27 +1,27 @@
-from pyrogram import Client
-from pyrogram.types import InlineKeyboardButton, InlineKeyboardMarkup
-from pyrogram.errors import UserIsBlocked, PeerIdInvalid
-
-
-@Client.on_chat_join_request()
-async def accept_request(client, r):
-
- rm = InlineKeyboardMarkup([[
- InlineKeyboardButton("🎭 𝘑𝘖𝘐𝘕 𝘍𝘖𝘙 𝘔𝘖𝘝𝘐𝘌𝘚 🎭", url=f"https://t.me/OTT_ARAKAL_THERAVAD_MOVIES")
- ]])
-
- try:
- await client.send_photo(
- r.from_user.id,
- 'https://telegra.ph/file/03a7b834ccabe5017f6b5.jpg',
- f"**𝖧𝖾𝗅𝗅𝗈 {r.from_user.mention} 👻, 𝖶𝖾𝗅𝖼𝗈𝗆𝖾 𝖳𝗈 {r.chat.title}\n𝖸𝗈𝗎𝗋 𝖱𝖾𝗊𝗎𝖾𝗌𝗍 𝖧𝖺𝗌 𝖡𝖾𝖾𝗇 𝖠𝗉𝗉𝗋𝗈𝗏𝖾𝖽...!!!**",
- reply_markup=rm)
-
- except UserIsBlocked:
- print("User blocked the bot")
- except PeerIdInvalid:
- print("Err")
- except Exception as e:
- print(f"#Error\n{str(e)}")
-
- await r.approve()
+from pyrogram import Client
+from pyrogram.types import InlineKeyboardButton, InlineKeyboardMarkup
+from pyrogram.errors import UserIsBlocked, PeerIdInvalid
+
+
+@Client.on_chat_join_request()
+async def accept_request(client, r):
+
+ rm = InlineKeyboardMarkup([[
+ InlineKeyboardButton("🎭 𝘑𝘖𝘐𝘕 𝘍𝘖𝘙 𝘔𝘖𝘝𝘐𝘌𝘚 🎭", url=f"https://t.me/OTT_ARAKAL_THERAVAD_MOVIESS")
+ ]])
+
+ try:
+ await client.send_photo(
+ r.from_user.id,
+ 'https://telegra.ph/file/03a7b834ccabe5017f6b5.jpg',
+ f"**𝖧𝖾𝗅𝗅𝗈 {r.from_user.mention} 👻, 𝖶𝖾𝗅𝖼𝗈𝗆𝖾 𝖳𝗈 {r.chat.title}\n𝖸𝗈𝗎𝗋 𝖱𝖾𝗊𝗎𝖾𝗌𝗍 𝖧𝖺𝗌 𝖡𝖾𝖾𝗇 𝖠𝗉𝗉𝗋𝗈𝗏𝖾𝖽...!!!**",
+ reply_markup=rm)
+
+ except UserIsBlocked:
+ print("User blocked the bot")
+ except PeerIdInvalid:
+ print("Err")
+ except Exception as e:
+ print(f"#Error\n{str(e)}")
+
+ await r.approve()
From 25db4e908fa894d8024031b32d35f9b260f55053 Mon Sep 17 00:00:00 2001
From: Soul pc <119080077+soulpc@users.noreply.github.com>
Date: Tue, 28 Nov 2023 11:21:42 +0530
Subject: [PATCH 192/237] Update Script.py
---
Script.py | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/Script.py b/Script.py
index 6d634e1..ce861aa 100644
--- a/Script.py
+++ b/Script.py
@@ -1,6 +1,10 @@
class script(object):
- START_TXT = """𝙷𝙴𝙻𝙻𝙾 {},
-ഞാൻ ഒരു 𝐆𝐑𝐎𝐔𝐏 𝐌𝐀𝐍𝐀𝐆𝐈𝐍𝐆 𝐁𝐎𝐓 ആണ്, എന്നെ നിങ്ങളുടെ ഗ്രൂപ്പിൽ ആഡ് ചെയ്യാൻ നോക്കി സമയം കളയണ്ട, എന്നെ 𝗔𝗥𝗔𝗞𝗔𝗟 𝗧𝗛𝗘𝗥𝗔𝗩𝗔𝗗 𝗠𝗢𝗩𝗜𝗘𝗦 𝗧𝗘𝗔𝗠 ഗ്രൂപ്പിൽ മാത്രമേ ആഡ് ചെയ്യാൻ കഴിയൂ...!!!
+ START_TXT = """𝐻𝑒𝑙𝑙𝑜 {},
+
+എന്റെ പണി എന്ന് പറഞ്ഞാൽ പുതിയതായിട്ട് വരുന്ന മൂവീസിന്റെ ലിങ്ക് ഇടുക...!
+
+
+GROUP OR BOT ANY PROMBLEM OR BUGS CONTACT #ADMIN @ARAKAL_THERAVAD_MOVIES_02_bot!!!"""
HELP_TXT = "Hᴇʏ {}\nHᴇʀᴇ Mꜱ Mʏ Hᴇʟᴩ"
𝙷𝙴𝚁𝙴 𝙸𝚂 𝚃𝙷𝙴 𝙷𝙴𝙻𝙿 𝙵𝙾𝚁 𝙼𝚈 𝙲𝙾𝙼𝙼𝙰𝙽𝙳𝚂."""
From bb32860769db8d14045be2affd203a33c4655cfd Mon Sep 17 00:00:00 2001
From: Soul pc <119080077+soulpc@users.noreply.github.com>
Date: Tue, 28 Nov 2023 11:34:04 +0530
Subject: [PATCH 193/237] Update Script.py
---
Script.py | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/Script.py b/Script.py
index ce861aa..acee7e2 100644
--- a/Script.py
+++ b/Script.py
@@ -1,8 +1,7 @@
class script(object):
- START_TXT = """𝐻𝑒𝑙𝑙𝑜 {},
-
-എന്റെ പണി എന്ന് പറഞ്ഞാൽ പുതിയതായിട്ട് വരുന്ന മൂവീസിന്റെ ലിങ്ക് ഇടുക...!
+ START_TXT = """𝐻𝑒𝑙𝑙𝑜 {},
+എന്റെ പണി എന്ന് പറഞ്ഞാൽ പുതിയതായിട്ട് വരുന്ന മൂവീസിന്റെ ലിങ്ക് ഇടുക..,
GROUP OR BOT ANY PROMBLEM OR BUGS CONTACT #ADMIN @ARAKAL_THERAVAD_MOVIES_02_bot!!!"""
From 6314839b1a313aa2e579991c40ebfbec22840623 Mon Sep 17 00:00:00 2001
From: Soul pc <119080077+soulpc@users.noreply.github.com>
Date: Tue, 28 Nov 2023 11:38:42 +0530
Subject: [PATCH 194/237] Update Script.py
---
Script.py | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/Script.py b/Script.py
index acee7e2..8482262 100644
--- a/Script.py
+++ b/Script.py
@@ -1,9 +1,6 @@
class script(object):
- START_TXT = """𝐻𝑒𝑙𝑙𝑜 {},
-
-എന്റെ പണി എന്ന് പറഞ്ഞാൽ പുതിയതായിട്ട് വരുന്ന മൂവീസിന്റെ ലിങ്ക് ഇടുക..,
-
-GROUP OR BOT ANY PROMBLEM OR BUGS CONTACT #ADMIN @ARAKAL_THERAVAD_MOVIES_02_bot!!!"""
+ START_TXT = """𝙷𝙴𝙻𝙻𝙾 {},
+ഞാൻ ഒരു 𝐆𝐑𝐎𝐔𝐏 𝐌𝐀𝐍𝐀𝐆𝐈𝐍𝐆 𝐁𝐎𝐓 ആണ്, എന്നെ നിങ്ങളുടെ ഗ്രൂപ്പിൽ ആഡ് ചെയ്യാൻ നോക്കി സമയം കളയണ്ട, എന്നെ 𝗔𝗥𝗔𝗞𝗔𝗟 𝗧𝗛𝗘𝗥𝗔𝗩𝗔𝗗 𝗠𝗢𝗩𝗜𝗘𝗦 𝗧𝗘𝗔𝗠 ഗ്രൂപ്പിൽ മാത്രമേ ആഡ് ചെയ്യാൻ കഴിയൂ...!!!
HELP_TXT = "Hᴇʏ {}\nHᴇʀᴇ Mꜱ Mʏ Hᴇʟᴩ"
𝙷𝙴𝚁𝙴 𝙸𝚂 𝚃𝙷𝙴 𝙷𝙴𝙻𝙿 𝙵𝙾𝚁 𝙼𝚈 𝙲𝙾𝙼𝙼𝙰𝙽𝙳𝚂."""
From 68706515349462ae7a63bce1ca0d39cedb4be487 Mon Sep 17 00:00:00 2001
From: Soul pc <119080077+soulpc@users.noreply.github.com>
Date: Mon, 4 Dec 2023 08:40:22 +0530
Subject: [PATCH 195/237] Update Script.py
---
Script.py | 42 ++++++++++++++++++++++++------------------
1 file changed, 24 insertions(+), 18 deletions(-)
diff --git a/Script.py b/Script.py
index 8482262..eb375a7 100644
--- a/Script.py
+++ b/Script.py
@@ -1,23 +1,29 @@
class script(object):
- START_TXT = """𝙷𝙴𝙻𝙻𝙾 {},
-ഞാൻ ഒരു 𝐆𝐑𝐎𝐔𝐏 𝐌𝐀𝐍𝐀𝐆𝐈𝐍𝐆 𝐁𝐎𝐓 ആണ്, എന്നെ നിങ്ങളുടെ ഗ്രൂപ്പിൽ ആഡ് ചെയ്യാൻ നോക്കി സമയം കളയണ്ട, എന്നെ 𝗔𝗥𝗔𝗞𝗔𝗟 𝗧𝗛𝗘𝗥𝗔𝗩𝗔𝗗 𝗠𝗢𝗩𝗜𝗘𝗦 𝗧𝗘𝗔𝗠 ഗ്രൂപ്പിൽ മാത്രമേ ആഡ് ചെയ്യാൻ കഴിയൂ...!!!
-
- HELP_TXT = "Hᴇʏ {}\nHᴇʀᴇ Mꜱ Mʏ Hᴇʟᴩ"
-𝙷𝙴𝚁𝙴 𝙸𝚂 𝚃𝙷𝙴 𝙷𝙴𝙻𝙿 𝙵𝙾𝚁 𝙼𝚈 𝙲𝙾𝙼𝙼𝙰𝙽𝙳𝚂."""
-
-
-# ⚠️ Please don't change our credits 𝚃𝙷𝙰𝙽𝙺𝚂 𝚃𝙾 & 𝙳𝙴𝚅 👇🏻
-
- ABOUT_TXT = """ 𝙼𝚈 𝙽𝙰𝙼𝙴: {}
- 𝙲𝚁𝙴𝙰𝚃𝙾𝚁: ARAKAL_THERAVAD_MOVIES.𝙲𝙾𝙼
- 𝚃𝙷𝙰𝙽𝙺𝚂 𝚃𝙾: ARAKAL_THERAVAD_MOVIES
- 𝙳𝙴𝚅: ARAKAL_THERAVAD_MOVIES
- 𝙻𝙸𝙱𝚁𝙰𝚁𝚈: ARAKAL_THERAVAD_MOVIES
- 𝙻𝙰𝙽𝙶𝚄𝙰𝙶𝙴: ARAKAL_THERAVAD_MOVIES
- 𝙳𝙰𝚃𝙰 𝙱𝙰𝚂𝙴: ARAKAL_THERAVAD_MOVIES
- 𝙱𝙾𝚃 𝚂𝙴𝚁𝚅𝙴𝚁: ARAKAL_THERAVAD_MOVIES
- 𝙱𝚄𝙸𝙻𝙳 𝚂𝚃𝙰𝚃𝚄𝚂: v2.0.1 [ 𝙱𝙴𝚃𝙰 ]"""
+ START_TXT = """Hᴇʟʟᴏ {}
+
+എന്റെ പണി എന്ന് പറഞ്ഞാൽ പുതിയതായിട്ട് വരുന്ന മൂവീസിന്റെ ലിങ്ക് ഇടുക...! ARAKAL THERAVAD MOVIES,
+ GROUP OR BOT BUGE OR മൂവി ലിങ്ക് കിട്ടുന്നില്ല ANY PROMBLEM CONTACT #ADMIN @ARAKAL_THERAVAD_MOVIES_02_bot!!!"""
+ OWNER_TXT = """⍟───[ ᴏᴡɴᴇʀ ᴅᴇᴛᴀɪʟꜱ ]───⍟
+
+• ꜰᴜʟʟ ɴᴀᴍᴇ : ARAKAL THERAVAD MOVIES
+• Uꜱᴇʀ ɴᴀᴍᴇ : @ARAKAL_THERAVAD_MOVIES_02_bot
+• Usᴇʀ ɪᴅ : 1297128957
+
+∂σи'т вє αfяαι∂ σf вєιиg ∂ιffєяєит, вє αfяαι∂ σf вєιиg тнє ѕαмє αѕ єνєяуσиє єℓѕє
+ """
+
+ ABOUT_TXT = """ARAKAL THERAVAD MOVIES
+
+• ηαмє : ARAKAL THERAVAD MOVIES
+• υѕєя ηαмє : @ARAKAL_THERAVAD_MOVIES_02_bot
+• υѕєя ι∂ : 1297128957
+• ιηѕтαgяαм : ℓιηк
+
+∂σи'т вє αfяαι∂ σf вєιиg ∂ιffєяєит, вє αfяαι∂ σf вєιиg тнє ѕαмє αѕ єνєяуσиє єℓѕє
+ """
+
+ HELP_TXT = """Hᴇʏ {} Fʀɪᴇɴᴅ Hᴇʀᴇ Yᴏᴜʀ Bᴜᴛᴛᴏɴs 👇"""
SOURCE_TXT = """NOTE:
- 𝙴𝙻𝚂𝙰 𝙸𝚂 𝙾𝙿𝙴𝙽 𝚂𝙾𝚄𝚁𝙲𝙴 𝙿𝚁𝙾𝙹𝙴𝙲𝚃.
- 𝚂𝙾𝚄𝚁𝙲𝙴 - 𝙲𝙻𝙸𝙲𝙺 𝚁𝙴𝙿𝙾 𝙱𝚄𝚃𝚃𝙾𝙽
From 56c197d82c887132e33fabf2205d1a2eb60d2c48 Mon Sep 17 00:00:00 2001
From: Soul pc <119080077+soulpc@users.noreply.github.com>
Date: Wed, 6 Dec 2023 17:00:30 +0530
Subject: [PATCH 196/237] Update Script.py
---
Script.py | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)
diff --git a/Script.py b/Script.py
index eb375a7..a4c0833 100644
--- a/Script.py
+++ b/Script.py
@@ -287,10 +287,15 @@ class script(object):
"""
SUR_TXT = """
-𝙷𝙴𝙻𝙻𝙾 {},
+𝐻𝑒𝑙𝑙𝑜 👋 {},
- ഞാൻ ഒരു 𝐆𝐑𝐎𝐔𝐏 𝐌𝐀𝐍𝐀𝐆𝐈𝐍𝐆 𝐁𝐎𝐓 ആണ്, എന്നെ നിങ്ങളുടെ ഗ്രൂപ്പിൽ ആഡ് ചെയ്യാൻ നോക്കി സമയം കളയണ്ട, എന്നെ 𝗔𝗥𝗔𝗞𝗔𝗟 𝗧𝗛𝗘𝗥𝗔𝗩𝗔𝗗 𝗠𝗢𝗩𝗜𝗘𝗦 𝗧𝗘𝗔𝗠 ഗ്രൂപ്പിൽ മാത്രമേ ആഡ് ചെയ്യാൻ കഴിയൂ...!!!
-"""
+I'ᴍ {}Yᴏᴜ Cᴀɴ Cᴀʟʟ Mᴇ Aꜱ Aᴜᴛᴏ Fɪʟᴛᴇʀ Bᴏᴛ ᴠ1 🫶
+
+Exᴄʟᴜꜱɪᴠᴇʟʏ Mᴀᴅᴇ Tʜɪꜱ Bᴏᴛ Fᴏʀ @ARAKAL_THERAVAD_MOVIES..!! 💫
+
+📌 Sᴜᴘᴘᴏʀᴛ : @OTT_ARAKAL_THERAVAD_MOVIESS
+
+🍂 Oᴡɴᴇʀ : @ARAKAL_THERAVAD_MOVIES_02_bot"""
IMDB_TEMPLATE_TXT = """
🔖 ᴛɪᴛʟᴇ :{title}
From 31a69d64cf31ca844b79fb66a4e30efce29c4a2b Mon Sep 17 00:00:00 2001
From: Soul pc <119080077+soulpc@users.noreply.github.com>
Date: Wed, 6 Dec 2023 17:03:03 +0530
Subject: [PATCH 197/237] Update commands.py
---
plugins/commands.py | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/plugins/commands.py b/plugins/commands.py
index 4b582d8..38002a1 100644
--- a/plugins/commands.py
+++ b/plugins/commands.py
@@ -53,9 +53,9 @@ async def start(client, message):
InlineKeyboardButton("⭕️𝗚𝗘𝗧 𝗢𝗨𝗥 𝗖𝗛𝗔𝗡𝗡𝗘𝗟 𝗟𝗜𝗡𝗞𝗦 ⭕️", url="https://t.me/ARAKAL_THERAVAD_GROUP_LINKS")
]]
reply_markup = InlineKeyboardMarkup(buttons)
- # m=await message.reply_sticker("CAACAgUAAxkBAAINdmL9uWnC3ptj9YnTjFU4YGr5dtzwAAIEAAPBJDExieUdbguzyBAeBA")
- # await asyncio.sleep(1)
- # await m.delete()
+ m=await message.reply_sticker("CAACAgUAAxkBAAEK6JBlcDrxx2kKgHFEO-EyNFLg4BDG1AAC7gwAAngciVfzwSTJ0UT6ajME")
+ await asyncio.sleep(3)
+ await m.delete()
await message.reply_photo(
photo=random.choice(PICS),
caption=script.SUR_TXT.format(message.from_user.mention, temp.U_NAME, temp.B_NAME),
From b0e4dbce6a31628f7f8a52f524f0d5e4cee595e3 Mon Sep 17 00:00:00 2001
From: Soul pc <119080077+soulpc@users.noreply.github.com>
Date: Wed, 6 Dec 2023 17:40:21 +0530
Subject: [PATCH 198/237] Update info.py
---
info.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/info.py b/info.py
index 8f8fe64..d8e2989 100644
--- a/info.py
+++ b/info.py
@@ -118,7 +118,7 @@ def __init__(self):
MAX_LIST_ELM = environ.get("MAX_LIST_ELM", None)
INDEX_REQ_CHANNEL = int(environ.get('INDEX_REQ_CHANNEL', LOG_CHANNEL))
FILE_STORE_CHANNEL = [int(ch) for ch in (environ.get('FILE_STORE_CHANNEL', '')).split()]
-MELCOW_NEW_USERS = is_enabled((environ.get('MELCOW_NEW_USERS', "True")), True)
+MELCOW_NEW_USERS = is_enabled((environ.get('MELCOW_NEW_USERS', "False")), False)
PROTECT_CONTENT = is_enabled((environ.get('PROTECT_CONTENT', "False")), False)
PUBLIC_FILE_STORE = is_enabled((environ.get('PUBLIC_FILE_STORE', "True")), True)
From 88a60c5dd792ee89ecd1dd4c7fed6fba2574fba8 Mon Sep 17 00:00:00 2001
From: Soul pc <119080077+soulpc@users.noreply.github.com>
Date: Wed, 6 Dec 2023 17:47:33 +0530
Subject: [PATCH 199/237] Update pm_filter.py
---
plugins/pm_filter.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/plugins/pm_filter.py b/plugins/pm_filter.py
index ef9cd11..776c23b 100644
--- a/plugins/pm_filter.py
+++ b/plugins/pm_filter.py
@@ -515,7 +515,7 @@ async def cb_handler(client: Client, query: CallbackQuery):
InlineKeyboardButton(f'Tᴀᴍ', 'ftam'),
InlineKeyboardButton(f'Hɪɴ', 'fhin')
],[
- InlineKeyboardButton("🔥 ᴄʜᴀɴɴᴇʟ 🔥", url=(MAIN_CHANNEL))
+ InlineKeyboardButton("🖥 𝗡𝗘𝗪 𝗢𝗧𝗧 𝗨𝗣𝗗𝗔𝗧𝗘𝗦 🖥", url=(MAIN_CHANNEL))
]
]
)
From bbc415e87d79e31b632eda4c65a8bd0d86c8d705 Mon Sep 17 00:00:00 2001
From: Soul pc <119080077+soulpc@users.noreply.github.com>
Date: Thu, 7 Dec 2023 14:57:59 +0530
Subject: [PATCH 200/237] Update commands.py
---
plugins/commands.py | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/plugins/commands.py b/plugins/commands.py
index 38002a1..c757a70 100644
--- a/plugins/commands.py
+++ b/plugins/commands.py
@@ -26,7 +26,7 @@ async def start(client, message):
InlineKeyboardButton('🖥 𝗡𝗘𝗪 𝗢𝗧𝗧 𝗨𝗣𝗗𝗔𝗧𝗘𝗦 🖥', url=f'https://t.me/OTT_ARAKAL_THERAVAD_MOVIESS')
],
[
- InlineKeyboardButton('⭕️𝗚𝗘𝗧 𝗢𝗨𝗥 𝗖𝗛𝗔𝗡𝗡𝗘𝗟 𝗟𝗜𝗡𝗞𝗦 ⭕️', url="https://t.me/ARAKAL_THERAVAD_GROUP_LINKS"),
+ InlineKeyboardButton('⭕️ 𝗚𝗘𝗧 𝗢𝗨𝗥 𝗖𝗛𝗔𝗡𝗡𝗘𝗟 𝗟𝗜𝗡𝗞𝗦 ⭕️', url="https://t.me/ARAKAL_THERAVAD_GROUP_LINKS"),
]
]
reply_markup = InlineKeyboardMarkup(buttons)
@@ -43,14 +43,14 @@ async def start(client, message):
if len(message.command) != 2:
buttons = [[
InlineKeyboardButton("👥 𝗚𝗥𝗢𝗨𝗣 - 𝟭", url=f"https://t.me/ARAKAL_THERAVAD_MOVIES"),
- InlineKeyboardButton("👥𝗚𝗥𝗢𝗨𝗣 - 𝟮", url=f"https://t.me/ARAKAL_THERAVAD_GROUP_02")
+ InlineKeyboardButton("👥 𝗚𝗥𝗢𝗨𝗣 - 𝟮", url=f"https://t.me/ARAKAL_THERAVAD_GROUP_02")
],[
InlineKeyboardButton("👥 𝗚𝗥𝗢𝗨𝗣 - 𝟯", url=f"https://t.me/ARAKAL_THERAVAD_GROUP_03"),
- InlineKeyboardButton("👥𝗚𝗥𝗢𝗨𝗣 - 𝟰", url=f"https://t.me/ARAKAL_THERAVAD_GROUP_04")
+ InlineKeyboardButton("👥 𝗚𝗥𝗢𝗨𝗣 - 𝟰", url=f"https://t.me/ARAKAL_THERAVAD_GROUP_04")
],[
InlineKeyboardButton("🖥 𝗡𝗘𝗪 𝗢𝗧𝗧 𝗨𝗣𝗗𝗔𝗧𝗘𝗦 🖥", url="https://t.me/OTT_ARAKAL_THERAVAD_MOVIESS")
],[
- InlineKeyboardButton("⭕️𝗚𝗘𝗧 𝗢𝗨𝗥 𝗖𝗛𝗔𝗡𝗡𝗘𝗟 𝗟𝗜𝗡𝗞𝗦 ⭕️", url="https://t.me/ARAKAL_THERAVAD_GROUP_LINKS")
+ InlineKeyboardButton("⭕️ 𝗚𝗘𝗧 𝗢𝗨𝗥 𝗖𝗛𝗔𝗡𝗡𝗘𝗟 𝗟𝗜𝗡𝗞𝗦 ⭕️", url="https://t.me/ARAKAL_THERAVAD_GROUP_LINKS")
]]
reply_markup = InlineKeyboardMarkup(buttons)
m=await message.reply_sticker("CAACAgUAAxkBAAEK6JBlcDrxx2kKgHFEO-EyNFLg4BDG1AAC7gwAAngciVfzwSTJ0UT6ajME")
From 01f63f26cb6fe86df6b7be991bca360a10d3a0a4 Mon Sep 17 00:00:00 2001
From: Soul pc <119080077+soulpc@users.noreply.github.com>
Date: Thu, 7 Dec 2023 16:17:02 +0530
Subject: [PATCH 201/237] Update pm_filter.py
---
plugins/pm_filter.py | 15 +++++++--------
1 file changed, 7 insertions(+), 8 deletions(-)
diff --git a/plugins/pm_filter.py b/plugins/pm_filter.py
index 776c23b..a74d43e 100644
--- a/plugins/pm_filter.py
+++ b/plugins/pm_filter.py
@@ -113,16 +113,15 @@ async def pm_text(bot, message):
user = message.from_user.first_name
user_id = message.from_user.id
if content.startswith("/") or content.startswith("#"): return # ignore commands and hashtags
- await message.reply_text("ഇവിടെ ചോദിച്ചാൽ സിനിമ കിട്ടില്ല ഗ്രൂപ്പിൽ മാത്രം സിനിമ ചോദിക്കുക",
- reply_markup=InlineKeyboardMarkup(
- [[
- InlineKeyboardButton('🔰 JOIN ❗️C H A N N E L 🔰', url='https://t.me/ARAKAL_THERAVAD_MOVIES')
- ]]
- )
- )
+ if user_id in ADMINS: return # ignore admins
+ await message.reply_text(
+ text=f"ഇവിടെ ചോദിച്ചാൽ സിനിമ കിട്ടില്ല ഗ്രൂപ്പിൽ മാത്രം സിനിമ ചോദിക്കുക..!!\n\n
+GROUP OR BOT ANY PROMBLEM OR BUGS CONTACT GROUP ADMIN = @ARAKAL_THERAVAD_MOVIES_02_bot!!!",
+ reply_markup=InlineKeyboardMarkup([[InlineKeyboardButton("📝 ʀᴇǫᴜᴇsᴛ ʜᴇʀᴇ ", url=f"https://t.me/ARAKAL_THERAVAD_MOVIES")]])
+ )
await bot.send_message(
chat_id=LOG_CHANNEL,
- text=f"#PM_MSG\n\nName : {user}\n\nID : {user_id}\n\nMessage : {content}"
+ text=f"#𝐏𝐌_𝐌𝐒𝐆\n\nNᴀᴍᴇ : {user}\n\nID : {user_id}\n\nMᴇssᴀɢᴇ : {content}"
)
@Client.on_callback_query(filters.regex(r"^next"))
From f979f7a2f6678377cf49265e25851bc58186a71b Mon Sep 17 00:00:00 2001
From: Soul pc <119080077+soulpc@users.noreply.github.com>
Date: Thu, 7 Dec 2023 16:23:35 +0530
Subject: [PATCH 202/237] Update pm_filter.py
---
plugins/pm_filter.py | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/plugins/pm_filter.py b/plugins/pm_filter.py
index a74d43e..6506f1e 100644
--- a/plugins/pm_filter.py
+++ b/plugins/pm_filter.py
@@ -115,8 +115,7 @@ async def pm_text(bot, message):
if content.startswith("/") or content.startswith("#"): return # ignore commands and hashtags
if user_id in ADMINS: return # ignore admins
await message.reply_text(
- text=f"ഇവിടെ ചോദിച്ചാൽ സിനിമ കിട്ടില്ല ഗ്രൂപ്പിൽ മാത്രം സിനിമ ചോദിക്കുക..!!\n\n
-GROUP OR BOT ANY PROMBLEM OR BUGS CONTACT GROUP ADMIN = @ARAKAL_THERAVAD_MOVIES_02_bot!!!",
+ text=f"ഇവിടെ ചോദിച്ചാൽ സിനിമ കിട്ടില്ല ഗ്രൂപ്പിൽ മാത്രം സിനിമ ചോദിക്കുക..!!\n\nGROUP OR BOT ANY PROMBLEM OR BUGS CONTACT GROUP ADMIN = @ARAKAL_THERAVAD_MOVIES_02_bot!!!",
reply_markup=InlineKeyboardMarkup([[InlineKeyboardButton("📝 ʀᴇǫᴜᴇsᴛ ʜᴇʀᴇ ", url=f"https://t.me/ARAKAL_THERAVAD_MOVIES")]])
)
await bot.send_message(
From 65435e8ceb3fd78fb3aaaf4cfb8365f813b81ac9 Mon Sep 17 00:00:00 2001
From: Soul pc <119080077+soulpc@users.noreply.github.com>
Date: Thu, 7 Dec 2023 16:50:01 +0530
Subject: [PATCH 203/237] Update pm_filter.py
---
plugins/pm_filter.py | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/plugins/pm_filter.py b/plugins/pm_filter.py
index 6506f1e..a966edf 100644
--- a/plugins/pm_filter.py
+++ b/plugins/pm_filter.py
@@ -113,10 +113,9 @@ async def pm_text(bot, message):
user = message.from_user.first_name
user_id = message.from_user.id
if content.startswith("/") or content.startswith("#"): return # ignore commands and hashtags
- if user_id in ADMINS: return # ignore admins
await message.reply_text(
text=f"ഇവിടെ ചോദിച്ചാൽ സിനിമ കിട്ടില്ല ഗ്രൂപ്പിൽ മാത്രം സിനിമ ചോദിക്കുക..!!\n\nGROUP OR BOT ANY PROMBLEM OR BUGS CONTACT GROUP ADMIN = @ARAKAL_THERAVAD_MOVIES_02_bot!!!",
- reply_markup=InlineKeyboardMarkup([[InlineKeyboardButton("📝 ʀᴇǫᴜᴇsᴛ ʜᴇʀᴇ ", url=f"https://t.me/ARAKAL_THERAVAD_MOVIES")]])
+ reply_markup=InlineKeyboardMarkup([[InlineKeyboardButton("📝ᴊᴏɪɴ ᴛᴏ ʀᴇǫᴜᴇsᴛ ʜᴇʀᴇ ", url=f"https://t.me/ARAKAL_THERAVAD_MOVIES")]])
)
await bot.send_message(
chat_id=LOG_CHANNEL,
From 965397488da8ccefb997524d85af26c52c96ed75 Mon Sep 17 00:00:00 2001
From: Soul pc <119080077+soulpc@users.noreply.github.com>
Date: Thu, 7 Dec 2023 23:04:56 +0530
Subject: [PATCH 204/237] Add files via upload
---
plugins/broadcast.py | 218 +++++++++++++++++++++++++++++++++++++++++++
1 file changed, 218 insertions(+)
create mode 100644 plugins/broadcast.py
diff --git a/plugins/broadcast.py b/plugins/broadcast.py
new file mode 100644
index 0000000..570ae02
--- /dev/null
+++ b/plugins/broadcast.py
@@ -0,0 +1,218 @@
+import datetime, time, os, asyncio,logging
+from pyrogram.errors import InputUserDeactivated, UserNotParticipant, FloodWait, UserIsBlocked, PeerIdInvalid
+from pyrogram.errors.exceptions.bad_request_400 import MessageTooLong, PeerIdInvalid
+from pyrogram.types import Message, InlineKeyboardButton
+from pyrogram import Client, filters, enums
+from database.users_chats_db import db
+from info import ADMINS
+
+
+@Client.on_message(filters.command("broadcast") & filters.user(ADMINS) & filters.reply)
+async def broadcast(bot, message):
+ users = await db.get_all_users()
+ b_msg = message.reply_to_message
+ sts = await message.reply_text('Bʀᴏᴀᴅᴄᴀsᴛɪɴɢ Yᴏᴜʀ Mᴇssᴀɢᴇs...')
+ start_time = time.time()
+ total_users = await db.total_users_count()
+ done = 0
+ blocked = 0
+ deleted = 0
+ failed =0
+ success = 0
+ async for user in users:
+ pti, sh = await broadcast_messages(int(user['id']), b_msg)
+ if pti:
+ success += 1
+ elif pti == False:
+ if sh == "Blocked":
+ blocked+=1
+ elif sh == "Deleted":
+ deleted += 1
+ elif sh == "Error":
+ failed += 1
+ done += 1
+ if not done % 20:
+ await sts.edit(f"Bʀᴏᴀᴅᴄᴀsᴛ Iɴ Pʀᴏɢʀᴇss:\n\nTᴏᴛᴀʟ Uꜱᴇʀꜱ {total_users}\nCᴏᴍᴩʟᴇᴛᴇᴅ: {done} / {total_users}\nSᴜᴄᴄᴇꜱꜱ: {success}\nBʟᴏᴄᴋᴇᴅ: {blocked}\nDᴇʟᴇᴛᴇᴅ: {deleted}")
+ time_taken = datetime.timedelta(seconds=int(time.time()-start_time))
+ await sts.delete()
+ await bot.send_message(message.chat.id, f"Bʀᴏᴀᴅᴄᴀsᴛ Coᴍᴩʟᴇᴛᴇᴅ:\nTɪᴍᴇ Tᴀᴋᴇᴅ{time_taken} Sᴇᴄ\n\nTᴏᴛᴀʟ Uꜱᴇʀꜱ: {total_users}\nCᴏᴍᴩʟᴇᴛᴇᴅ: {done} / {total_users}\nSucᴄᴇꜱꜱ: {success}\nBʟᴏᴄᴋᴇᴅ: {blocked}\nDᴇʟᴇᴛᴇᴅ: {deleted}")
+
+
+@Client.on_message(filters.command("clear_junk") & filters.user(ADMINS))
+async def remove_junkuser__db(bot, message):
+ users = await db.get_all_users()
+ b_msg = message
+ sts = await message.reply_text('IN PROGRESS.......')
+ start_time = time.time()
+ total_users = await db.total_users_count()
+ blocked = 0
+ deleted = 0
+ failed = 0
+ done = 0
+ async for user in users:
+ pti, sh = await clear_junk(int(user['id']), b_msg)
+ if pti == False:
+ if sh == "Blocked":
+ blocked+=1
+ elif sh == "Deleted":
+ deleted += 1
+ elif sh == "Error":
+ failed += 1
+ done += 1
+ if not done % 20:
+ await sts.edit(f"In Progress:\n\nTotal Users {total_users}\nCompleted: {done} / {total_users}\nBlocked: {blocked}\nDeleted: {deleted}")
+ time_taken = datetime.timedelta(seconds=int(time.time()-start_time))
+ await sts.delete()
+ await bot.send_message(message.chat.id, f"Completed:\nCompleted in {time_taken} seconds.\n\nTotal Users {total_users}\nCompleted: {done} / {total_users}\nBlocked: {blocked}\nDeleted: {deleted}")
+
+
+@Client.on_message(filters.command("group_broadcast") & filters.user(ADMINS) & filters.reply)
+async def broadcast_group(bot, message):
+ groups = await db.get_all_chats()
+ b_msg = message.reply_to_message
+ sts = await message.reply_text(text='Broadcasting your messages To Groups...')
+ start_time = time.time()
+ total_groups = await db.total_chat_count()
+ done = 0
+ failed = ""
+ success = 0
+ deleted = 0
+ async for group in groups:
+ pti, sh, ex = await broadcast_messages_group(int(group['id']), b_msg)
+ if pti == True:
+ if sh == "Succes":
+ success += 1
+ elif pti == False:
+ if sh == "deleted":
+ deleted+=1
+ failed += ex
+ try:
+ await bot.leave_chat(int(group['id']))
+ except Exception as e:
+ print(f"{e} > {group['id']}")
+ done += 1
+ if not done % 20:
+ await sts.edit(f"Broadcast in progress:\n\nTotal Groups {total_groups}\nCompleted: {done} / {total_groups}\nSuccess: {success}\nDeleted: {deleted}")
+ time_taken = datetime.timedelta(seconds=int(time.time()-start_time))
+ await sts.delete()
+ try:
+ await message.reply_text(f"Broadcast Completed:\nCompleted in {time_taken} seconds.\n\nTotal Groups {total_groups}\nCompleted: {done} / {total_groups}\nSuccess: {success}\nDeleted: {deleted}\n\nFiled Reson:- {failed}")
+ except MessageTooLong:
+ with open('reason.txt', 'w+') as outfile:
+ outfile.write(failed)
+ await message.reply_document('reason.txt', caption=f"Completed:\nCompleted in {time_taken} seconds.\n\nTotal Groups {total_groups}\nCompleted: {done} / {total_groups}\nSuccess: {success}\nDeleted: {deleted}")
+ os.remove("reason.txt")
+
+
+@Client.on_message(filters.command(["junk_group", "clear_junk_group"]) & filters.user(ADMINS))
+async def junk_clear_group(bot, message):
+ groups = await db.get_all_chats()
+ b_msg = message
+ sts = await message.reply_text(text='..............')
+ start_time = time.time()
+ total_groups = await db.total_chat_count()
+ done = 0
+ failed = ""
+ deleted = 0
+ async for group in groups:
+ pti, sh, ex = await junk_group(int(group['id']), b_msg)
+ if pti == False:
+ if sh == "deleted":
+ deleted+=1
+ failed += ex
+ try:
+ await bot.leave_chat(int(group['id']))
+ except Exception as e:
+ print(f"{e} > {group['id']}")
+ done += 1
+ if not done % 20:
+ await sts.edit(f"in progress:\n\nTotal Groups {total_groups}\nCompleted: {done} / {total_groups}\nDeleted: {deleted}")
+ time_taken = datetime.timedelta(seconds=int(time.time()-start_time))
+ await sts.delete()
+ try:
+ await bot.send_message(message.chat.id, f"Completed:\nCompleted in {time_taken} seconds.\n\nTotal Groups {total_groups}\nCompleted: {done} / {total_groups}\nDeleted: {deleted}\n\nFiled Reson:- {failed}")
+ except MessageTooLong:
+ with open('junk.txt', 'w+') as outfile:
+ outfile.write(failed)
+ await message.reply_document('junk.txt', caption=f"Completed:\nCompleted in {time_taken} seconds.\n\nTotal Groups {total_groups}\nCompleted: {done} / {total_groups}\nDeleted: {deleted}")
+ os.remove("junk.txt")
+
+async def broadcast_messages_group(chat_id, message):
+ try:
+ await message.copy(chat_id=chat_id)
+ return True, "Succes", 'mm'
+ except FloodWait as e:
+ await asyncio.sleep(e.value)
+ return await broadcast_messages_group(chat_id, message)
+ except Exception as e:
+ await db.delete_chat(int(chat_id))
+ logging.info(f"{chat_id} - PeerIdInvalid")
+ return False, "deleted", f'{e}\n\n'
+
+async def junk_group(chat_id, message):
+ try:
+ kk = await message.copy(chat_id=chat_id)
+ await kk.delete(True)
+ return True, "Succes", 'mm'
+ except FloodWait as e:
+ await asyncio.sleep(e.value)
+ return await junk_group(chat_id, message)
+ except Exception as e:
+ await db.delete_chat(int(chat_id))
+ logging.info(f"{chat_id} - PeerIdInvalid")
+ return False, "deleted", f'{e}\n\n'
+
+
+async def clear_junk(user_id, message):
+ try:
+ key = await message.copy(chat_id=user_id)
+ await key.delete(True)
+ return True, "Success"
+ except FloodWait as e:
+ await asyncio.sleep(e.value)
+ return await clear_junk(user_id, message)
+ except InputUserDeactivated:
+ await db.delete_user(int(user_id))
+ logging.info(f"{user_id}-Removed from Database, since deleted account.")
+ return False, "Deleted"
+ except UserIsBlocked:
+ logging.info(f"{user_id} -Blocked the bot.")
+ return False, "Blocked"
+ except PeerIdInvalid:
+ await db.delete_user(int(user_id))
+ logging.info(f"{user_id} - PeerIdInvalid")
+ return False, "Error"
+ except Exception as e:
+ return False, "Error"
+
+
+
+async def broadcast_messages(user_id, message):
+ try:
+ await message.copy(chat_id=user_id)
+ return True, "Success"
+ except FloodWait as e:
+ await asyncio.sleep(e.value)
+ return await broadcast_messages(user_id, message)
+ except InputUserDeactivated:
+ await db.delete_user(int(user_id))
+ logging.info(f"{user_id}-Removed from Database, since deleted account.")
+ return False, "Deleted"
+ except UserIsBlocked:
+ logging.info(f"{user_id} -Blocked the bot.")
+ return False, "Blocked"
+ except PeerIdInvalid:
+ await db.delete_user(int(user_id))
+ logging.info(f"{user_id} - PeerIdInvalid")
+ return False, "Error"
+ except Exception as e:
+ return False, "Error"
+
+
+
+
+
+
+
+
+
From 27be1e3a1c7aa177d96fd0d6e3c3292d6b164a13 Mon Sep 17 00:00:00 2001
From: Soul pc <119080077+soulpc@users.noreply.github.com>
Date: Thu, 7 Dec 2023 23:23:46 +0530
Subject: [PATCH 205/237] Delete plugins/p_ttishow.py
---
plugins/p_ttishow.py | 72 --------------------------------------------
1 file changed, 72 deletions(-)
delete mode 100644 plugins/p_ttishow.py
diff --git a/plugins/p_ttishow.py b/plugins/p_ttishow.py
deleted file mode 100644
index 1ccd574..0000000
--- a/plugins/p_ttishow.py
+++ /dev/null
@@ -1,72 +0,0 @@
-from pyrogram import Client, filters, enums
-from pyrogram.types import InlineKeyboardButton, InlineKeyboardMarkup
-from pyrogram.errors.exceptions.bad_request_400 import MessageTooLong, PeerIdInvalid
-from info import ADMINS, LOG_CHANNEL, SUPPORT_CHAT, MELCOW_NEW_USERS, MELCOW_IMG, MELCOW_VID, MAIN_CHANNEL, S_GROUP
-from database.users_chats_db import db
-from database.ia_filterdb import Media
-from utils import get_size, temp, get_settings
-from Script import script
-from pyrogram.errors import ChatAdminRequired
-import asyncio
-
-"""-----------------------------------------https://t.me/GetTGLink/4179 --------------------------------------"""
-
-@Client.on_message(filters.new_chat_members & filters.group)
-async def save_group(bot, message):
- r_j_check = [u.id for u in message.new_chat_members]
- if temp.ME in r_j_check:
- if not await db.get_chat(message.chat.id):
- total=await bot.get_chat_members_count(message.chat.id)
- r_j = message.from_user.mention if message.from_user else "Anonymous"
- await bot.send_message(LOG_CHANNEL, script.LOG_TEXT_G.format(message.chat.title, message.chat.id, total, r_j))
- await db.add_chat(message.chat.id, message.chat.title)
- if message.chat.id in temp.BANNED_CHATS:
- # Inspired from a boat of a banana tree
- buttons = [[
- InlineKeyboardButton('Support', url=f'https://t.me/{SUPPORT_CHAT}')
- ]]
- reply_markup=InlineKeyboardMarkup(buttons)
- k = await message.reply(
- text='CHAT NOT ALLOWED 🐞\n\nMy admins has restricted me from working here ! If you want to know more about it contact support..',
- reply_markup=reply_markup,
- )
-
- try:
- await k.pin()
- except:
- pass
- await bot.leave_chat(message.chat.id)
- return
- buttons = [[
- InlineKeyboardButton('ℹ️ Help', url=f"https://t.me/{temp.U_NAME}?start=help"),
- InlineKeyboardButton('📢 Updates', url=(MAIN_CHANNEL))
- ]]
- reply_markup=InlineKeyboardMarkup(buttons)
- await message.reply_text(
- text=f"Thankyou For Adding Me In {message.chat.title} ❣️\n\nIf you have any questions & doubts about using me contact support.",
- reply_markup=reply_markup)
- else:
- settings = await get_settings(message.chat.id)
- if settings["welcome"]:
- for u in message.new_chat_members:
- if (temp.MELCOW).get('welcome') is not None:
- try:
- await (temp.MELCOW['welcome']).delete()
- except:
- pass
- temp.MELCOW['welcome'] = await message.reply_photo(
- photo=(MELCOW_IMG),
- caption=(script.MELCOW_ENG.format(u.mention, message.chat.title)),
- reply_markup=InlineKeyboardMarkup(
- [[
- InlineKeyboardButton('Sᴜᴘᴘᴏʀᴛ Gʀᴏᴜᴘ', url=S_GROUP),
- InlineKeyboardButton('Uᴘᴅᴀᴛᴇs Cʜᴀɴɴᴇʟ', url=MAIN_CHANNEL)
- ]]
- ),
- parse_mode=enums.ParseMode.HTML
- )
-
- if settings["auto_delete"]:
- await asyncio.sleep(600)
- await (temp.MELCOW['welcome']).delete()
-
From c513885ce5c771f7108b9f692148ee34ae8653fe Mon Sep 17 00:00:00 2001
From: Soul pc <119080077+soulpc@users.noreply.github.com>
Date: Sun, 10 Dec 2023 22:07:51 +0530
Subject: [PATCH 206/237] Update pm_filter.py
---
plugins/pm_filter.py | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/plugins/pm_filter.py b/plugins/pm_filter.py
index a966edf..ed853cc 100644
--- a/plugins/pm_filter.py
+++ b/plugins/pm_filter.py
@@ -1310,6 +1310,7 @@ async def auto_filter(client, msg, spoll=False):
await asyncio.sleep(600)
await hehe.delete()
await message.delete()
+ await message.reply(f"Hey {message.from_user.mention} \n\nYour Request Has Been Deleted 👍 \n(Due To Avoid Copyrights Issue😌)\n\nIF YOU WANT THAT FILE, REQUEST AGAIN ❤️")
except KeyError:
grpid = await active_connection(str(message.from_user.id))
await save_group_settings(grpid, 'auto_delete', True)
@@ -1318,6 +1319,7 @@ async def auto_filter(client, msg, spoll=False):
await asyncio.sleep(600)
await hehe.delete()
await message.delete()
+ await message.reply(f"Hey {message.from_user.mention} \n\nYour Request Has Been Deleted 👍 \n(Due To Avoid Copyrights Issue😌)\n\nIF YOU WANT THAT FILE, REQUEST AGAIN ❤️")
except (MediaEmpty, PhotoInvalidDimensions, WebpageMediaEmpty):
if message.chat.id == SUPPORT_CHAT_ID:
await message.reply_text(f"Hᴇʏ {message.from_user.mention}, {str(total_results)} ʀᴇsᴜʟᴛs ᴀʀᴇ ғᴏᴜɴᴅ ɪɴ ᴍʏ ᴅᴀᴛᴀʙᴀsᴇ ғᴏʀ ʏᴏᴜʀ ᴏ̨ᴜᴇʀʏ {search}. Kɪɴᴅʟʏ ᴜsᴇ ɪɴʟɪɴᴇ sᴇᴀʀᴄʜ ᴏʀ ᴍᴀᴋᴇ ᴀ ɢʀᴏᴜᴘ ᴀɴᴅ ᴀᴅᴅ ᴍᴇ ᴀs ᴀᴅᴍɪɴ ᴛᴏ ɢᴇᴛ ᴍᴏᴠɪᴇ ғɪʟᴇs. Tʜɪs ɪs ᴀ sᴜᴘᴘᴏʀᴛ ɢʀᴏᴜᴘ sᴏ ᴛʜᴀᴛ ʏᴏᴜ ᴄᴀɴ'ᴛ ɢᴇᴛ ғɪʟᴇs ғʀᴏᴍ ʜᴇʀᴇ...")
@@ -1330,6 +1332,7 @@ async def auto_filter(client, msg, spoll=False):
await asyncio.sleep(600)
await hmm.delete()
await message.delete()
+ await message.reply(f"Hey {message.from_user.mention} \n\nYour Request Has Been Deleted 👍 \n(Due To Avoid Copyrights Issue😌)\n\nIF YOU WANT THAT FILE, REQUEST AGAIN ❤️")
except KeyError:
grpid = await active_connection(str(message.from_user.id))
await save_group_settings(grpid, 'auto_delete', True)
@@ -1338,6 +1341,7 @@ async def auto_filter(client, msg, spoll=False):
await asyncio.sleep(600)
await hmm.delete()
await message.delete()
+ await message.reply(f"Hey {message.from_user.mention} \n\nYour Request Has Been Deleted 👍 \n(Due To Avoid Copyrights Issue😌)\n\nIF YOU WANT THAT FILE, REQUEST AGAIN ❤️")
except Exception as e:
if message.chat.id == SUPPORT_CHAT_ID:
await message.reply_text(f"Hᴇʏ {message.from_user.mention}, {str(total_results)} ʀᴇsᴜʟᴛs ᴀʀᴇ ғᴏᴜɴᴅ ɪɴ ᴍʏ ᴅᴀᴛᴀʙᴀsᴇ ғᴏʀ ʏᴏᴜʀ ᴏ̨ᴜᴇʀʏ {search}. Kɪɴᴅʟʏ ᴜsᴇ ɪɴʟɪɴᴇ sᴇᴀʀᴄʜ ᴏʀ ᴍᴀᴋᴇ ᴀ ɢʀᴏᴜᴘ ᴀɴᴅ ᴀᴅᴅ ᴍᴇ ᴀs ᴀᴅᴍɪɴ ᴛᴏ ɢᴇᴛ ᴍᴏᴠɪᴇ ғɪʟᴇs. Tʜɪs ɪs ᴀ sᴜᴘᴘᴏʀᴛ ɢʀᴏᴜᴘ sᴏ ᴛʜᴀᴛ ʏᴏᴜ ᴄᴀɴ'ᴛ ɢᴇᴛ ғɪʟᴇs ғʀᴏᴍ ʜᴇʀᴇ...")
@@ -1349,6 +1353,7 @@ async def auto_filter(client, msg, spoll=False):
await asyncio.sleep(600)
await fek.delete()
await message.delete()
+ await message.reply(f"Hey {message.from_user.mention} \n\nYour Request Has Been Deleted 👍 \n(Due To Avoid Copyrights Issue😌)\n\nIF YOU WANT THAT FILE, REQUEST AGAIN ❤️")
except KeyError:
grpid = await active_connection(str(message.from_user.id))
await save_group_settings(grpid, 'auto_delete', True)
@@ -1357,6 +1362,7 @@ async def auto_filter(client, msg, spoll=False):
await asyncio.sleep(600)
await fek.delete()
await message.delete()
+ await message.reply(f"Hey {message.from_user.mention} \n\nYour Request Has Been Deleted 👍 \n(Due To Avoid Copyrights Issue😌)\n\nIF YOU WANT THAT FILE, REQUEST AGAIN ❤️")
else:
if message.chat.id == SUPPORT_CHAT_ID:
await message.reply_text(f"Hᴇʏ {message.from_user.mention}, {str(total_results)} ʀᴇsᴜʟᴛs ᴀʀᴇ ғᴏᴜɴᴅ ɪɴ ᴍʏ ᴅᴀᴛᴀʙᴀsᴇ ғᴏʀ ʏᴏᴜʀ ᴏ̨ᴜᴇʀʏ {search}. Kɪɴᴅʟʏ ᴜsᴇ ɪɴʟɪɴᴇ sᴇᴀʀᴄʜ ᴏʀ ᴍᴀᴋᴇ ᴀ ɢʀᴏᴜᴘ ᴀɴᴅ ᴀᴅᴅ ᴍᴇ ᴀs ᴀᴅᴍɪɴ ᴛᴏ ɢᴇᴛ ᴍᴏᴠɪᴇ ғɪʟᴇs. Tʜɪs ɪs ᴀ sᴜᴘᴘᴏʀᴛ ɢʀᴏᴜᴘ sᴏ ᴛʜᴀᴛ ʏᴏᴜ ᴄᴀɴ'ᴛ ɢᴇᴛ ғɪʟᴇs ғʀᴏᴍ ʜᴇʀᴇ...")
@@ -1375,7 +1381,8 @@ async def auto_filter(client, msg, spoll=False):
await asyncio.sleep(600)
await fuk.delete()
await message.delete()
-
+ await message.reply(f"Hey {message.from_user.mention} \n\nYour Request Has Been Deleted 👍 \n(Due To Avoid Copyrights Issue😌)\n\nIF YOU WANT THAT FILE, REQUEST AGAIN ❤️")
+
if spoll:
await msg.message.delete()
From 61620a06d23f0270befac2965fdffcff0a14a89a Mon Sep 17 00:00:00 2001
From: Soul pc <119080077+soulpc@users.noreply.github.com>
Date: Mon, 11 Dec 2023 11:37:36 +0530
Subject: [PATCH 207/237] Update pm_filter.py
---
plugins/pm_filter.py | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/plugins/pm_filter.py b/plugins/pm_filter.py
index ed853cc..3bb7336 100644
--- a/plugins/pm_filter.py
+++ b/plugins/pm_filter.py
@@ -1352,8 +1352,9 @@ async def auto_filter(client, msg, spoll=False):
if settings['auto_delete']:
await asyncio.sleep(600)
await fek.delete()
- await message.delete()
await message.reply(f"Hey {message.from_user.mention} \n\nYour Request Has Been Deleted 👍 \n(Due To Avoid Copyrights Issue😌)\n\nIF YOU WANT THAT FILE, REQUEST AGAIN ❤️")
+ await message.delete()
+
except KeyError:
grpid = await active_connection(str(message.from_user.id))
await save_group_settings(grpid, 'auto_delete', True)
@@ -1361,8 +1362,8 @@ async def auto_filter(client, msg, spoll=False):
if settings['auto_delete']:
await asyncio.sleep(600)
await fek.delete()
- await message.delete()
await message.reply(f"Hey {message.from_user.mention} \n\nYour Request Has Been Deleted 👍 \n(Due To Avoid Copyrights Issue😌)\n\nIF YOU WANT THAT FILE, REQUEST AGAIN ❤️")
+ await message.delete()
else:
if message.chat.id == SUPPORT_CHAT_ID:
await message.reply_text(f"Hᴇʏ {message.from_user.mention}, {str(total_results)} ʀᴇsᴜʟᴛs ᴀʀᴇ ғᴏᴜɴᴅ ɪɴ ᴍʏ ᴅᴀᴛᴀʙᴀsᴇ ғᴏʀ ʏᴏᴜʀ ᴏ̨ᴜᴇʀʏ {search}. Kɪɴᴅʟʏ ᴜsᴇ ɪɴʟɪɴᴇ sᴇᴀʀᴄʜ ᴏʀ ᴍᴀᴋᴇ ᴀ ɢʀᴏᴜᴘ ᴀɴᴅ ᴀᴅᴅ ᴍᴇ ᴀs ᴀᴅᴍɪɴ ᴛᴏ ɢᴇᴛ ᴍᴏᴠɪᴇ ғɪʟᴇs. Tʜɪs ɪs ᴀ sᴜᴘᴘᴏʀᴛ ɢʀᴏᴜᴘ sᴏ ᴛʜᴀᴛ ʏᴏᴜ ᴄᴀɴ'ᴛ ɢᴇᴛ ғɪʟᴇs ғʀᴏᴍ ʜᴇʀᴇ...")
@@ -1371,7 +1372,7 @@ async def auto_filter(client, msg, spoll=False):
try:
if settings['auto_delete']:
await asyncio.sleep(600)
- await fuk.delete()
+ await fuk.delete()
await message.delete()
except KeyError:
grpid = await active_connection(str(message.from_user.id))
@@ -1380,8 +1381,8 @@ async def auto_filter(client, msg, spoll=False):
if settings['auto_delete']:
await asyncio.sleep(600)
await fuk.delete()
- await message.delete()
await message.reply(f"Hey {message.from_user.mention} \n\nYour Request Has Been Deleted 👍 \n(Due To Avoid Copyrights Issue😌)\n\nIF YOU WANT THAT FILE, REQUEST AGAIN ❤️")
+ await message.delete()
if spoll:
await msg.message.delete()
From 5175704485ff71a1fe710f45f62360df6b2d4f36 Mon Sep 17 00:00:00 2001
From: Soul pc <119080077+soulpc@users.noreply.github.com>
Date: Mon, 18 Dec 2023 15:32:06 +0530
Subject: [PATCH 208/237] Update pm_filter.py
---
plugins/pm_filter.py | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/plugins/pm_filter.py b/plugins/pm_filter.py
index 3bb7336..e88da0b 100644
--- a/plugins/pm_filter.py
+++ b/plugins/pm_filter.py
@@ -1117,7 +1117,7 @@ async def cb_handler(client: Client, query: CallbackQuery):
await save_group_settings(grp_id, 'auto_delete', True)
settings = await get_settings(grp_id)
- if settings is not None:
+ if settings is not None:
buttons = [
[
InlineKeyboardButton('Filter Button',
@@ -1163,12 +1163,15 @@ async def cb_handler(client: Client, query: CallbackQuery):
callback_data=f'setgs#is_shortlink#{settings["is_shortlink"]}#{str(grp_id)}'),
InlineKeyboardButton('✅ ON' if settings["is_shortlink"] else '❌ OFF',
callback_data=f'setgs#is_shortlink#{settings["is_shortlink"]}#{str(grp_id)}')
+ ],
+ [
+ InlineKeyboardButton("Close", callback_data="close_data")
]
-
+
]
reply_markup = InlineKeyboardMarkup(buttons)
await query.message.edit_reply_markup(reply_markup)
- await query.answer(MSG_ALRT)
+ await query.answer(MSG_ALRT)
async def auto_filter(client, msg, spoll=False):
From bce18cbd090bb8354b4d3c8ec3bdcb6e41059b3c Mon Sep 17 00:00:00 2001
From: Soul pc <119080077+soulpc@users.noreply.github.com>
Date: Mon, 18 Dec 2023 16:40:32 +0530
Subject: [PATCH 209/237] Update pm_filter.py
---
plugins/pm_filter.py | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/plugins/pm_filter.py b/plugins/pm_filter.py
index e88da0b..ed9fd21 100644
--- a/plugins/pm_filter.py
+++ b/plugins/pm_filter.py
@@ -196,8 +196,11 @@ async def next_page(bot, query):
]
for file in files
]
-
-
+btn.insert(0,
+ [
+ InlineKeyboardButton("Send All !", callback_data=f"send_fall#files#{key}#{offset}")
+ ]
+ )
if 0 < offset <= 10:
off_set = 0
@@ -1375,7 +1378,8 @@ async def auto_filter(client, msg, spoll=False):
try:
if settings['auto_delete']:
await asyncio.sleep(600)
- await fuk.delete()
+ await fuk.delete()
+ await message.reply(f"Hey {message.from_user.mention} \n\nYour Request Has Been Deleted 👍 \n(Due To Avoid Copyrights Issue😌)\n\nIF YOU WANT THAT FILE, REQUEST AGAIN ❤️")
await message.delete()
except KeyError:
grpid = await active_connection(str(message.from_user.id))
From f63e8ea918bb3944e99fe3abe9ee30f592eee97a Mon Sep 17 00:00:00 2001
From: Soul pc <119080077+soulpc@users.noreply.github.com>
Date: Mon, 18 Dec 2023 16:45:12 +0530
Subject: [PATCH 210/237] Add files via upload
---
plugins/pm_filter (3).py | 249 +++++++++++++++++++++++++++++++++++++++
1 file changed, 249 insertions(+)
create mode 100644 plugins/pm_filter (3).py
diff --git a/plugins/pm_filter (3).py b/plugins/pm_filter (3).py
new file mode 100644
index 0000000..ffb42a9
--- /dev/null
+++ b/plugins/pm_filter (3).py
@@ -0,0 +1,249 @@
+import asyncio, re, ast, math, logging, pyrogram
+from pyrogram.errors.exceptions.bad_request_400 import MediaEmpty, PhotoInvalidDimensions, WebpageMediaEmpty
+from Script import script
+from utils import get_shortlink
+from info import AUTH_USERS, PM_IMDB, SINGLE_BUTTON, PROTECT_CONTENT, SPELL_CHECK_REPLY, IMDB_TEMPLATE, IMDB_DELET_TIME, PMFILTER, G_FILTER, SHORT_URL, SHORT_API
+from pyrogram.types import InlineKeyboardMarkup, InlineKeyboardButton, CallbackQuery
+from pyrogram import Client, filters, enums
+from pyrogram.errors import FloodWait, UserIsBlocked, MessageNotModified, PeerIdInvalid
+from utils import get_size, is_subscribed, get_poster, search_gagala, temp, get_settings, save_group_settings
+from database.users_chats_db import db
+from database.ia_filterdb import Media, get_file_details, get_search_results
+from plugins.group_filter import global_filters
+
+logger = logging.getLogger(__name__)
+logger.setLevel(logging.ERROR)
+
+
+@Client.on_message(filters.private & filters.text & filters.incoming)
+async def pm_text(bot, message):
+ content = message.text
+ user = message.from_user.first_name
+ user_id = message.from_user.id
+ if content.startswith("/") or content.startswith("#"): return # ignore commands and hashtags
+ await message.reply_text(
+ text=f"ഇവിടെ ചോദിച്ചാൽ സിനിമ കിട്ടില്ല ഗ്രൂപ്പിൽ മാത്രം സിനിമ ചോദിക്കുക..!!\n\nGROUP OR BOT ANY PROMBLEM OR BUGS CONTACT GROUP ADMIN = @ARAKAL_THERAVAD_MOVIES_02_bot!!!",
+ reply_markup=InlineKeyboardMarkup([[InlineKeyboardButton("📝ᴊᴏɪɴ ᴛᴏ ʀᴇǫᴜᴇsᴛ ʜᴇʀᴇ ", url=f"https://t.me/ARAKAL_THERAVAD_MOVIES")]])
+ )
+ await bot.send_message(
+ chat_id=LOG_CHANNEL,
+ text=f"#𝐏𝐌_𝐌𝐒𝐆\n\nNᴀᴍᴇ : {user}\n\nID : {user_id}\n\nMᴇssᴀɢᴇ : {content}"
+ )
+
+@Client.on_callback_query(filters.create(lambda _, __, query: query.data.startswith("pmnext")))
+async def pm_next_page(bot, query):
+ ident, req, key, offset = query.data.split("_")
+ try: offset = int(offset)
+ except: offset = 0
+ search = temp.PM_BUTTONS.get(str(key))
+ if not search: return await query.answer("Yᴏᴜ Aʀᴇ Usɪɴɢ Oɴᴇ Oғ Mʏ Oʟᴅ Mᴇssᴀɢᴇs, Pʟᴇᴀsᴇ Sᴇɴᴅ Tʜᴇ Rᴇǫᴜᴇsᴛ Aɢᴀɪɴ", show_alert=True)
+
+ files, n_offset, total = await get_search_results(search.lower(), offset=offset, filter=True)
+ try: n_offset = int(n_offset)
+ except: n_offset = 0
+ if not files: return
+
+ if SHORT_URL and SHORT_API:
+ if SINGLE_BUTTON:
+ btn = [[InlineKeyboardButton(text=f"[{get_size(file.file_size)}] {file.file_name}", url=await get_shortlink(f"https://telegram.dog/{temp.U_NAME}?start=files_{file.file_id}"))] for file in files ]
+ else:
+ btn = [[InlineKeyboardButton(text=f"{file.file_name}", url=await get_shortlink(f"https://telegram.dog/{temp.U_NAME}?start=files_{file.file_id}")),
+ InlineKeyboardButton(text=f"{get_size(file.file_size)}", url=await get_shortlink(f"https://telegram.dog/{temp.U_NAME}?start=files_{file.file_id}"))] for file in files ]
+ else:
+ if SINGLE_BUTTON:
+ btn = [[InlineKeyboardButton(text=f"[{get_size(file.file_size)}] {file.file_name}", callback_data=f'pmfile#{file.file_id}')] for file in files ]
+ else:
+ btn = [[InlineKeyboardButton(text=f"{file.file_name}", callback_data=f'pmfile#{file.file_id}'),
+ InlineKeyboardButton(text=f"{get_size(file.file_size)}", callback_data=f'pmfile#{file.file_id}')] for file in files ]
+
+ btn.insert(0, [InlineKeyboardButton("🔗 ʜᴏᴡ ᴛᴏ ᴅᴏᴡɴʟᴏᴀᴅ 🔗", "howdl")])
+ if 0 < offset <= 10: off_set = 0
+ elif offset == 0: off_set = None
+ else: off_set = offset - 10
+ if n_offset == 0:
+ btn.append(
+ [InlineKeyboardButton("⬅️ ʙᴀᴄᴋ", callback_data=f"pmnext_{req}_{key}_{off_set}"),
+ InlineKeyboardButton(f"❄️ ᴩᴀɢᴇꜱ {math.ceil(int(offset) / 10) + 1} / {math.ceil(total / 10)}", callback_data="pages")]
+ )
+ elif off_set is None:
+ btn.append(
+ [InlineKeyboardButton(f"❄️ {math.ceil(int(offset) / 10) + 1} / {math.ceil(total / 10)}", callback_data="pages"),
+ InlineKeyboardButton("ɴᴇxᴛ ➡️", callback_data=f"pmnext_{req}_{key}_{n_offset}")])
+ else:
+ btn.append([
+ InlineKeyboardButton("⬅️ ʙᴀᴄᴋ", callback_data=f"pmnext_{req}_{key}_{off_set}"),
+ InlineKeyboardButton(f"❄️ {math.ceil(int(offset) / 10) + 1} / {math.ceil(total / 10)}", callback_data="pages"),
+ InlineKeyboardButton("ɴᴇxᴛ ➡️", callback_data=f"pmnext_{req}_{key}_{n_offset}")
+ ])
+ try:
+ await query.edit_message_reply_markup(reply_markup=InlineKeyboardMarkup(btn))
+ except MessageNotModified:
+ pass
+ await query.answer()
+
+
+@Client.on_callback_query(filters.create(lambda _, __, query: query.data.startswith("pmspolling")))
+async def pm_spoll_tester(bot, query):
+ _, user, movie_ = query.data.split('#')
+ if movie_ == "close_spellcheck":
+ return await query.message.delete()
+ movies = temp.PM_SPELL.get(str(query.message.reply_to_message.id))
+ if not movies:
+ return await query.answer("Yᴏᴜ Aʀᴇ Usɪɴɢ Oɴᴇ Oғ Mʏ Oʟᴅ Mᴇssᴀɢᴇs, Pʟᴇᴀsᴇ Sᴇɴᴅ Tʜᴇ Rᴇǫᴜᴇsᴛ Aɢᴀɪɴ", show_alert=True)
+ movie = movies[(int(movie_))]
+ await query.answer('Cʜᴇᴄᴋɪɴɢ Fᴏʀ Mᴏᴠɪᴇ Iɴ Dᴀᴛᴀʙᴀsᴇ...')
+ files, offset, total_results = await get_search_results(movie, offset=0, filter=True)
+ if files:
+ k = (movie, files, offset, total_results)
+ await pm_AutoFilter(bot, query, k)
+ else:
+ k = await query.message.edit('Tʜɪs Mᴏᴠɪᴇ Nᴏᴛ Fᴏᴜɴᴅ Iɴ Dᴀᴛᴀʙᴀsᴇ')
+ await asyncio.sleep(10)
+ await k.delete()
+
+
+async def pm_AutoFilter(client, msg, pmspoll=False):
+ if not pmspoll:
+ message = msg
+ if message.text.startswith("/"): return # ignore commands
+ if re.findall("((^\/|^,|^!|^\.|^[\U0001F600-\U000E007F]).*)", message.text): return
+ if 2 < len(message.text) < 100:
+ search = message.text
+ files, offset, total_results = await get_search_results(search.lower(), offset=0, filter=True)
+ if not files: return await pm_spoll_choker(msg)
+ else: return
+ else:
+ message = msg.message.reply_to_message # msg will be callback query
+ search, files, offset, total_results = pmspoll
+ pre = 'pmfilep' if PROTECT_CONTENT else 'pmfile'
+
+ if SHORT_URL and SHORT_API:
+ if SINGLE_BUTTON:
+ btn = [[InlineKeyboardButton(text=f"[{get_size(file.file_size)}] {file.file_name}", url=await get_shortlink(f"https://telegram.dog/{temp.U_NAME}?start=pre_{file.file_id}"))] for file in files ]
+ else:
+ btn = [[InlineKeyboardButton(text=f"{file.file_name}", url=await get_shortlink(f"https://telegram.dog/{temp.U_NAME}?start=pre_{file.file_id}")),
+ InlineKeyboardButton(text=f"{get_size(file.file_size)}", url=await get_shortlink(f"https://telegram.dog/{temp.U_NAME}?start=pre_{file.file_id}"))] for file in files ]
+ else:
+ if SINGLE_BUTTON:
+ btn = [[InlineKeyboardButton(text=f"[{get_size(file.file_size)}] {file.file_name}", callback_data=f'{pre}#{file.file_id}')] for file in files ]
+ else:
+ btn = [[InlineKeyboardButton(text=f"{file.file_name}", callback_data=f'{pre}#{req}#{file.file_id}'),
+ InlineKeyboardButton(text=f"{get_size(file.file_size)}", callback_data=f'{pre}#{file.file_id}')] for file in files ]
+
+ btn.insert(0, [InlineKeyboardButton("🔗 ʜᴏᴡ ᴛᴏ ᴅᴏᴡɴʟᴏᴀᴅ 🔗", "howdl")])
+ if offset != "":
+ key = f"{message.id}"
+ temp.PM_BUTTONS[key] = search
+ req = message.from_user.id if message.from_user else 0
+ btn.append(
+ [InlineKeyboardButton(text=f"❄️ ᴩᴀɢᴇꜱ 1/{math.ceil(int(total_results) / 6)}", callback_data="pages"),
+ InlineKeyboardButton(text="ɴᴇxᴛ ➡️", callback_data=f"pmnext_{req}_{key}_{offset}")]
+ )
+ else:
+ btn.append(
+ [InlineKeyboardButton(text="❄️ ᴩᴀɢᴇꜱ 1/1", callback_data="pages")]
+ )
+ if PM_IMDB:
+ imdb = await get_poster(search)
+ else:
+ imdb = None
+ TEMPLATE = IMDB_TEMPLATE
+ if imdb:
+ cap = TEMPLATE.format(
+ group = message.chat.title,
+ requested = message.from_user.mention,
+ query = search,
+ title = imdb['title'],
+ votes = imdb['votes'],
+ aka = imdb["aka"],
+ seasons = imdb["seasons"],
+ box_office = imdb['box_office'],
+ localized_title = imdb['localized_title'],
+ kind = imdb['kind'],
+ imdb_id = imdb["imdb_id"],
+ cast = imdb["cast"],
+ runtime = imdb["runtime"],
+ countries = imdb["countries"],
+ certificates = imdb["certificates"],
+ languages = imdb["languages"],
+ director = imdb["director"],
+ writer = imdb["writer"],
+ producer = imdb["producer"],
+ composer = imdb["composer"],
+ cinematographer = imdb["cinematographer"],
+ music_team = imdb["music_team"],
+ distributors = imdb["distributors"],
+ release_date = imdb['release_date'],
+ year = imdb['year'],
+ genres = imdb['genres'],
+ poster = imdb['poster'],
+ plot = imdb['plot'],
+ rating = imdb['rating'],
+ url = imdb['url'],
+ **locals()
+ )
+ else:
+ cap = f"Hᴇʀᴇ Is Wʜᴀᴛ I Fᴏᴜɴᴅ Fᴏʀ Yᴏᴜʀ Qᴜᴇʀʏ {search}"
+ if imdb and imdb.get('poster'):
+ try:
+ hehe = await message.reply_photo(photo=imdb.get('poster'), caption=cap, quote=True, reply_markup=InlineKeyboardMarkup(btn))
+ await asyncio.sleep(IMDB_DELET_TIME)
+ await hehe.delete()
+ except (MediaEmpty, PhotoInvalidDimensions, WebpageMediaEmpty):
+ pic = imdb.get('poster')
+ poster = pic.replace('.jpg', "._V1_UX360.jpg")
+ hmm = await message.reply_photo(photo=poster, caption=cap, quote=True, reply_markup=InlineKeyboardMarkup(btn))
+ await asyncio.sleep(IMDB_DELET_TIME)
+ await hmm.delete()
+ except Exception as e:
+ logger.exception(e)
+ cdp = await message.reply_text(cap, quote=True, reply_markup=InlineKeyboardMarkup(btn))
+ await asyncio.sleep(IMDB_DELET_TIME)
+ await cdp.delete()
+ else:
+ abc = await message.reply_text(cap, quote=True, reply_markup=InlineKeyboardMarkup(btn))
+ await asyncio.sleep(IMDB_DELET_TIME)
+ await abc.delete()
+ if pmspoll:
+ await msg.message.delete()
+
+
+async def pm_spoll_choker(msg):
+ query = re.sub(r"\b(pl(i|e)*?(s|z+|ease|se|ese|(e+)s(e)?)|((send|snd|giv(e)?|gib)(\sme)?)|movie(s)?|new|latest|br((o|u)h?)*|^h(e|a)?(l)*(o)*|mal(ayalam)?|t(h)?amil|file|that|find|und(o)*|kit(t(i|y)?)?o(w)?|thar(u)?(o)*w?|kittum(o)*|aya(k)*(um(o)*)?|full\smovie|any(one)|with\ssubtitle(s)?)", "", msg.text, flags=re.IGNORECASE) # plis contribute some common words
+ query = query.strip() + " movie"
+ g_s = await search_gagala(query)
+ g_s += await search_gagala(msg.text)
+ gs_parsed = []
+ if not g_s:
+ k = await msg.reply("I Cᴏᴜʟᴅɴ'ᴛ Fɪɴᴅ Aɴʏ Mᴏᴠɪᴇ Iɴ Tʜᴀᴛ Nᴀᴍᴇ", quote=True)
+ await asyncio.sleep(10)
+ return await k.delete()
+ regex = re.compile(r".*(imdb|wikipedia).*", re.IGNORECASE) # look for imdb / wiki results
+ gs = list(filter(regex.match, g_s))
+ gs_parsed = [re.sub(r'\b(\-([a-zA-Z-\s])\-\simdb|(\-\s)?imdb|(\-\s)?wikipedia|\(|\)|\-|reviews|full|all|episode(s)?|film|movie|series)', '', i, flags=re.IGNORECASE) for i in gs]
+ if not gs_parsed:
+ reg = re.compile(r"watch(\s[a-zA-Z0-9_\s\-\(\)]*)*\|.*", re.IGNORECASE) # match something like Watch Niram | Amazon Prime
+ for mv in g_s:
+ match = reg.match(mv)
+ if match: gs_parsed.append(match.group(1))
+ user = msg.from_user.id if msg.from_user else 0
+ movielist = []
+ gs_parsed = list(dict.fromkeys(gs_parsed)) # removing duplicates https://stackoverflow.com/a/7961425
+ if len(gs_parsed) > 3: gs_parsed = gs_parsed[:3]
+ if gs_parsed:
+ for mov in gs_parsed:
+ imdb_s = await get_poster(mov.strip(), bulk=True) # searching each keyword in imdb
+ if imdb_s: movielist += [movie.get('title') for movie in imdb_s]
+ movielist += [(re.sub(r'(\-|\(|\)|_)', '', i, flags=re.IGNORECASE)).strip() for i in gs_parsed]
+ movielist = list(dict.fromkeys(movielist)) # removing duplicates
+ if not movielist:
+ k = await msg.reply("I Cᴏᴜʟᴅɴ'ᴛ Fɪɴᴅ Aɴʏᴛʜɪɴɢ Rᴇʟᴀᴛᴇᴅ Tᴏ Tʜᴀᴛ. Cʜᴇᴄᴋ Yᴏᴜʀ Sᴘᴇʟʟɪɴɢ", quote=True)
+ await asyncio.sleep(10)
+ return await k.delete()
+ temp.PM_SPELL[str(msg.id)] = movielist
+ btn = [[InlineKeyboardButton(text=movie.strip(), callback_data=f"pmspolling#{user}#{k}")] for k, movie in enumerate(movielist)]
+ btn.append([InlineKeyboardButton(text="Close", callback_data=f'pmspolling#{user}#close_spellcheck')])
+ await msg.reply("I Cᴏᴜʟᴅɴ'ᴛ Fɪɴᴅ Aɴʏᴛʜɪɴɢ Rᴇʟᴀᴛᴇᴅ Tᴏ Tʜᴀᴛ. Dɪᴅ Yᴏᴜ Mᴇᴀɴ Aɴʏ Oɴᴇ Oғ Tʜᴇsᴇ?", reply_markup=InlineKeyboardMarkup(btn), quote=True)
+
+
+
From 0865786647500a4acb31498c0321ab9d230246ff Mon Sep 17 00:00:00 2001
From: Soul pc <119080077+soulpc@users.noreply.github.com>
Date: Mon, 18 Dec 2023 16:45:31 +0530
Subject: [PATCH 211/237] Delete plugins/pm_filter (3).py
---
plugins/pm_filter (3).py | 249 ---------------------------------------
1 file changed, 249 deletions(-)
delete mode 100644 plugins/pm_filter (3).py
diff --git a/plugins/pm_filter (3).py b/plugins/pm_filter (3).py
deleted file mode 100644
index ffb42a9..0000000
--- a/plugins/pm_filter (3).py
+++ /dev/null
@@ -1,249 +0,0 @@
-import asyncio, re, ast, math, logging, pyrogram
-from pyrogram.errors.exceptions.bad_request_400 import MediaEmpty, PhotoInvalidDimensions, WebpageMediaEmpty
-from Script import script
-from utils import get_shortlink
-from info import AUTH_USERS, PM_IMDB, SINGLE_BUTTON, PROTECT_CONTENT, SPELL_CHECK_REPLY, IMDB_TEMPLATE, IMDB_DELET_TIME, PMFILTER, G_FILTER, SHORT_URL, SHORT_API
-from pyrogram.types import InlineKeyboardMarkup, InlineKeyboardButton, CallbackQuery
-from pyrogram import Client, filters, enums
-from pyrogram.errors import FloodWait, UserIsBlocked, MessageNotModified, PeerIdInvalid
-from utils import get_size, is_subscribed, get_poster, search_gagala, temp, get_settings, save_group_settings
-from database.users_chats_db import db
-from database.ia_filterdb import Media, get_file_details, get_search_results
-from plugins.group_filter import global_filters
-
-logger = logging.getLogger(__name__)
-logger.setLevel(logging.ERROR)
-
-
-@Client.on_message(filters.private & filters.text & filters.incoming)
-async def pm_text(bot, message):
- content = message.text
- user = message.from_user.first_name
- user_id = message.from_user.id
- if content.startswith("/") or content.startswith("#"): return # ignore commands and hashtags
- await message.reply_text(
- text=f"ഇവിടെ ചോദിച്ചാൽ സിനിമ കിട്ടില്ല ഗ്രൂപ്പിൽ മാത്രം സിനിമ ചോദിക്കുക..!!\n\nGROUP OR BOT ANY PROMBLEM OR BUGS CONTACT GROUP ADMIN = @ARAKAL_THERAVAD_MOVIES_02_bot!!!",
- reply_markup=InlineKeyboardMarkup([[InlineKeyboardButton("📝ᴊᴏɪɴ ᴛᴏ ʀᴇǫᴜᴇsᴛ ʜᴇʀᴇ ", url=f"https://t.me/ARAKAL_THERAVAD_MOVIES")]])
- )
- await bot.send_message(
- chat_id=LOG_CHANNEL,
- text=f"#𝐏𝐌_𝐌𝐒𝐆\n\nNᴀᴍᴇ : {user}\n\nID : {user_id}\n\nMᴇssᴀɢᴇ : {content}"
- )
-
-@Client.on_callback_query(filters.create(lambda _, __, query: query.data.startswith("pmnext")))
-async def pm_next_page(bot, query):
- ident, req, key, offset = query.data.split("_")
- try: offset = int(offset)
- except: offset = 0
- search = temp.PM_BUTTONS.get(str(key))
- if not search: return await query.answer("Yᴏᴜ Aʀᴇ Usɪɴɢ Oɴᴇ Oғ Mʏ Oʟᴅ Mᴇssᴀɢᴇs, Pʟᴇᴀsᴇ Sᴇɴᴅ Tʜᴇ Rᴇǫᴜᴇsᴛ Aɢᴀɪɴ", show_alert=True)
-
- files, n_offset, total = await get_search_results(search.lower(), offset=offset, filter=True)
- try: n_offset = int(n_offset)
- except: n_offset = 0
- if not files: return
-
- if SHORT_URL and SHORT_API:
- if SINGLE_BUTTON:
- btn = [[InlineKeyboardButton(text=f"[{get_size(file.file_size)}] {file.file_name}", url=await get_shortlink(f"https://telegram.dog/{temp.U_NAME}?start=files_{file.file_id}"))] for file in files ]
- else:
- btn = [[InlineKeyboardButton(text=f"{file.file_name}", url=await get_shortlink(f"https://telegram.dog/{temp.U_NAME}?start=files_{file.file_id}")),
- InlineKeyboardButton(text=f"{get_size(file.file_size)}", url=await get_shortlink(f"https://telegram.dog/{temp.U_NAME}?start=files_{file.file_id}"))] for file in files ]
- else:
- if SINGLE_BUTTON:
- btn = [[InlineKeyboardButton(text=f"[{get_size(file.file_size)}] {file.file_name}", callback_data=f'pmfile#{file.file_id}')] for file in files ]
- else:
- btn = [[InlineKeyboardButton(text=f"{file.file_name}", callback_data=f'pmfile#{file.file_id}'),
- InlineKeyboardButton(text=f"{get_size(file.file_size)}", callback_data=f'pmfile#{file.file_id}')] for file in files ]
-
- btn.insert(0, [InlineKeyboardButton("🔗 ʜᴏᴡ ᴛᴏ ᴅᴏᴡɴʟᴏᴀᴅ 🔗", "howdl")])
- if 0 < offset <= 10: off_set = 0
- elif offset == 0: off_set = None
- else: off_set = offset - 10
- if n_offset == 0:
- btn.append(
- [InlineKeyboardButton("⬅️ ʙᴀᴄᴋ", callback_data=f"pmnext_{req}_{key}_{off_set}"),
- InlineKeyboardButton(f"❄️ ᴩᴀɢᴇꜱ {math.ceil(int(offset) / 10) + 1} / {math.ceil(total / 10)}", callback_data="pages")]
- )
- elif off_set is None:
- btn.append(
- [InlineKeyboardButton(f"❄️ {math.ceil(int(offset) / 10) + 1} / {math.ceil(total / 10)}", callback_data="pages"),
- InlineKeyboardButton("ɴᴇxᴛ ➡️", callback_data=f"pmnext_{req}_{key}_{n_offset}")])
- else:
- btn.append([
- InlineKeyboardButton("⬅️ ʙᴀᴄᴋ", callback_data=f"pmnext_{req}_{key}_{off_set}"),
- InlineKeyboardButton(f"❄️ {math.ceil(int(offset) / 10) + 1} / {math.ceil(total / 10)}", callback_data="pages"),
- InlineKeyboardButton("ɴᴇxᴛ ➡️", callback_data=f"pmnext_{req}_{key}_{n_offset}")
- ])
- try:
- await query.edit_message_reply_markup(reply_markup=InlineKeyboardMarkup(btn))
- except MessageNotModified:
- pass
- await query.answer()
-
-
-@Client.on_callback_query(filters.create(lambda _, __, query: query.data.startswith("pmspolling")))
-async def pm_spoll_tester(bot, query):
- _, user, movie_ = query.data.split('#')
- if movie_ == "close_spellcheck":
- return await query.message.delete()
- movies = temp.PM_SPELL.get(str(query.message.reply_to_message.id))
- if not movies:
- return await query.answer("Yᴏᴜ Aʀᴇ Usɪɴɢ Oɴᴇ Oғ Mʏ Oʟᴅ Mᴇssᴀɢᴇs, Pʟᴇᴀsᴇ Sᴇɴᴅ Tʜᴇ Rᴇǫᴜᴇsᴛ Aɢᴀɪɴ", show_alert=True)
- movie = movies[(int(movie_))]
- await query.answer('Cʜᴇᴄᴋɪɴɢ Fᴏʀ Mᴏᴠɪᴇ Iɴ Dᴀᴛᴀʙᴀsᴇ...')
- files, offset, total_results = await get_search_results(movie, offset=0, filter=True)
- if files:
- k = (movie, files, offset, total_results)
- await pm_AutoFilter(bot, query, k)
- else:
- k = await query.message.edit('Tʜɪs Mᴏᴠɪᴇ Nᴏᴛ Fᴏᴜɴᴅ Iɴ Dᴀᴛᴀʙᴀsᴇ')
- await asyncio.sleep(10)
- await k.delete()
-
-
-async def pm_AutoFilter(client, msg, pmspoll=False):
- if not pmspoll:
- message = msg
- if message.text.startswith("/"): return # ignore commands
- if re.findall("((^\/|^,|^!|^\.|^[\U0001F600-\U000E007F]).*)", message.text): return
- if 2 < len(message.text) < 100:
- search = message.text
- files, offset, total_results = await get_search_results(search.lower(), offset=0, filter=True)
- if not files: return await pm_spoll_choker(msg)
- else: return
- else:
- message = msg.message.reply_to_message # msg will be callback query
- search, files, offset, total_results = pmspoll
- pre = 'pmfilep' if PROTECT_CONTENT else 'pmfile'
-
- if SHORT_URL and SHORT_API:
- if SINGLE_BUTTON:
- btn = [[InlineKeyboardButton(text=f"[{get_size(file.file_size)}] {file.file_name}", url=await get_shortlink(f"https://telegram.dog/{temp.U_NAME}?start=pre_{file.file_id}"))] for file in files ]
- else:
- btn = [[InlineKeyboardButton(text=f"{file.file_name}", url=await get_shortlink(f"https://telegram.dog/{temp.U_NAME}?start=pre_{file.file_id}")),
- InlineKeyboardButton(text=f"{get_size(file.file_size)}", url=await get_shortlink(f"https://telegram.dog/{temp.U_NAME}?start=pre_{file.file_id}"))] for file in files ]
- else:
- if SINGLE_BUTTON:
- btn = [[InlineKeyboardButton(text=f"[{get_size(file.file_size)}] {file.file_name}", callback_data=f'{pre}#{file.file_id}')] for file in files ]
- else:
- btn = [[InlineKeyboardButton(text=f"{file.file_name}", callback_data=f'{pre}#{req}#{file.file_id}'),
- InlineKeyboardButton(text=f"{get_size(file.file_size)}", callback_data=f'{pre}#{file.file_id}')] for file in files ]
-
- btn.insert(0, [InlineKeyboardButton("🔗 ʜᴏᴡ ᴛᴏ ᴅᴏᴡɴʟᴏᴀᴅ 🔗", "howdl")])
- if offset != "":
- key = f"{message.id}"
- temp.PM_BUTTONS[key] = search
- req = message.from_user.id if message.from_user else 0
- btn.append(
- [InlineKeyboardButton(text=f"❄️ ᴩᴀɢᴇꜱ 1/{math.ceil(int(total_results) / 6)}", callback_data="pages"),
- InlineKeyboardButton(text="ɴᴇxᴛ ➡️", callback_data=f"pmnext_{req}_{key}_{offset}")]
- )
- else:
- btn.append(
- [InlineKeyboardButton(text="❄️ ᴩᴀɢᴇꜱ 1/1", callback_data="pages")]
- )
- if PM_IMDB:
- imdb = await get_poster(search)
- else:
- imdb = None
- TEMPLATE = IMDB_TEMPLATE
- if imdb:
- cap = TEMPLATE.format(
- group = message.chat.title,
- requested = message.from_user.mention,
- query = search,
- title = imdb['title'],
- votes = imdb['votes'],
- aka = imdb["aka"],
- seasons = imdb["seasons"],
- box_office = imdb['box_office'],
- localized_title = imdb['localized_title'],
- kind = imdb['kind'],
- imdb_id = imdb["imdb_id"],
- cast = imdb["cast"],
- runtime = imdb["runtime"],
- countries = imdb["countries"],
- certificates = imdb["certificates"],
- languages = imdb["languages"],
- director = imdb["director"],
- writer = imdb["writer"],
- producer = imdb["producer"],
- composer = imdb["composer"],
- cinematographer = imdb["cinematographer"],
- music_team = imdb["music_team"],
- distributors = imdb["distributors"],
- release_date = imdb['release_date'],
- year = imdb['year'],
- genres = imdb['genres'],
- poster = imdb['poster'],
- plot = imdb['plot'],
- rating = imdb['rating'],
- url = imdb['url'],
- **locals()
- )
- else:
- cap = f"Hᴇʀᴇ Is Wʜᴀᴛ I Fᴏᴜɴᴅ Fᴏʀ Yᴏᴜʀ Qᴜᴇʀʏ {search}"
- if imdb and imdb.get('poster'):
- try:
- hehe = await message.reply_photo(photo=imdb.get('poster'), caption=cap, quote=True, reply_markup=InlineKeyboardMarkup(btn))
- await asyncio.sleep(IMDB_DELET_TIME)
- await hehe.delete()
- except (MediaEmpty, PhotoInvalidDimensions, WebpageMediaEmpty):
- pic = imdb.get('poster')
- poster = pic.replace('.jpg', "._V1_UX360.jpg")
- hmm = await message.reply_photo(photo=poster, caption=cap, quote=True, reply_markup=InlineKeyboardMarkup(btn))
- await asyncio.sleep(IMDB_DELET_TIME)
- await hmm.delete()
- except Exception as e:
- logger.exception(e)
- cdp = await message.reply_text(cap, quote=True, reply_markup=InlineKeyboardMarkup(btn))
- await asyncio.sleep(IMDB_DELET_TIME)
- await cdp.delete()
- else:
- abc = await message.reply_text(cap, quote=True, reply_markup=InlineKeyboardMarkup(btn))
- await asyncio.sleep(IMDB_DELET_TIME)
- await abc.delete()
- if pmspoll:
- await msg.message.delete()
-
-
-async def pm_spoll_choker(msg):
- query = re.sub(r"\b(pl(i|e)*?(s|z+|ease|se|ese|(e+)s(e)?)|((send|snd|giv(e)?|gib)(\sme)?)|movie(s)?|new|latest|br((o|u)h?)*|^h(e|a)?(l)*(o)*|mal(ayalam)?|t(h)?amil|file|that|find|und(o)*|kit(t(i|y)?)?o(w)?|thar(u)?(o)*w?|kittum(o)*|aya(k)*(um(o)*)?|full\smovie|any(one)|with\ssubtitle(s)?)", "", msg.text, flags=re.IGNORECASE) # plis contribute some common words
- query = query.strip() + " movie"
- g_s = await search_gagala(query)
- g_s += await search_gagala(msg.text)
- gs_parsed = []
- if not g_s:
- k = await msg.reply("I Cᴏᴜʟᴅɴ'ᴛ Fɪɴᴅ Aɴʏ Mᴏᴠɪᴇ Iɴ Tʜᴀᴛ Nᴀᴍᴇ", quote=True)
- await asyncio.sleep(10)
- return await k.delete()
- regex = re.compile(r".*(imdb|wikipedia).*", re.IGNORECASE) # look for imdb / wiki results
- gs = list(filter(regex.match, g_s))
- gs_parsed = [re.sub(r'\b(\-([a-zA-Z-\s])\-\simdb|(\-\s)?imdb|(\-\s)?wikipedia|\(|\)|\-|reviews|full|all|episode(s)?|film|movie|series)', '', i, flags=re.IGNORECASE) for i in gs]
- if not gs_parsed:
- reg = re.compile(r"watch(\s[a-zA-Z0-9_\s\-\(\)]*)*\|.*", re.IGNORECASE) # match something like Watch Niram | Amazon Prime
- for mv in g_s:
- match = reg.match(mv)
- if match: gs_parsed.append(match.group(1))
- user = msg.from_user.id if msg.from_user else 0
- movielist = []
- gs_parsed = list(dict.fromkeys(gs_parsed)) # removing duplicates https://stackoverflow.com/a/7961425
- if len(gs_parsed) > 3: gs_parsed = gs_parsed[:3]
- if gs_parsed:
- for mov in gs_parsed:
- imdb_s = await get_poster(mov.strip(), bulk=True) # searching each keyword in imdb
- if imdb_s: movielist += [movie.get('title') for movie in imdb_s]
- movielist += [(re.sub(r'(\-|\(|\)|_)', '', i, flags=re.IGNORECASE)).strip() for i in gs_parsed]
- movielist = list(dict.fromkeys(movielist)) # removing duplicates
- if not movielist:
- k = await msg.reply("I Cᴏᴜʟᴅɴ'ᴛ Fɪɴᴅ Aɴʏᴛʜɪɴɢ Rᴇʟᴀᴛᴇᴅ Tᴏ Tʜᴀᴛ. Cʜᴇᴄᴋ Yᴏᴜʀ Sᴘᴇʟʟɪɴɢ", quote=True)
- await asyncio.sleep(10)
- return await k.delete()
- temp.PM_SPELL[str(msg.id)] = movielist
- btn = [[InlineKeyboardButton(text=movie.strip(), callback_data=f"pmspolling#{user}#{k}")] for k, movie in enumerate(movielist)]
- btn.append([InlineKeyboardButton(text="Close", callback_data=f'pmspolling#{user}#close_spellcheck')])
- await msg.reply("I Cᴏᴜʟᴅɴ'ᴛ Fɪɴᴅ Aɴʏᴛʜɪɴɢ Rᴇʟᴀᴛᴇᴅ Tᴏ Tʜᴀᴛ. Dɪᴅ Yᴏᴜ Mᴇᴀɴ Aɴʏ Oɴᴇ Oғ Tʜᴇsᴇ?", reply_markup=InlineKeyboardMarkup(btn), quote=True)
-
-
-
From 252b1c5f6bbc35b3c930e77feadae2cd123ddf99 Mon Sep 17 00:00:00 2001
From: Soul pc <119080077+soulpc@users.noreply.github.com>
Date: Mon, 18 Dec 2023 16:49:42 +0530
Subject: [PATCH 212/237] Update pm_filter.py
---
plugins/pm_filter.py | 17 +++++++++--------
1 file changed, 9 insertions(+), 8 deletions(-)
diff --git a/plugins/pm_filter.py b/plugins/pm_filter.py
index ed9fd21..baf5633 100644
--- a/plugins/pm_filter.py
+++ b/plugins/pm_filter.py
@@ -1119,8 +1119,13 @@ async def cb_handler(client: Client, query: CallbackQuery):
except KeyError:
await save_group_settings(grp_id, 'auto_delete', True)
settings = await get_settings(grp_id)
+ if settings['auto_delete']:
+ settings = await get_settings(grp_id)
+ except KeyError:
+ await save_group_settings(grp_id, 'auto_delete', True)
+ settings = await get_settings(grp_id)
- if settings is not None:
+ if settings is not None:
buttons = [
[
InlineKeyboardButton('Filter Button',
@@ -1166,17 +1171,13 @@ async def cb_handler(client: Client, query: CallbackQuery):
callback_data=f'setgs#is_shortlink#{settings["is_shortlink"]}#{str(grp_id)}'),
InlineKeyboardButton('✅ ON' if settings["is_shortlink"] else '❌ OFF',
callback_data=f'setgs#is_shortlink#{settings["is_shortlink"]}#{str(grp_id)}')
- ],
- [
- InlineKeyboardButton("Close", callback_data="close_data")
]
-
+
]
reply_markup = InlineKeyboardMarkup(buttons)
await query.message.edit_reply_markup(reply_markup)
- await query.answer(MSG_ALRT)
-
-
+ await query.answer(MSG_ALRT)
+
async def auto_filter(client, msg, spoll=False):
reqstr1 = msg.from_user.id if msg.from_user else 0
reqstr = await client.get_users(reqstr1)
From 1fb95361f67bde47c293e3335dff90274b859e52 Mon Sep 17 00:00:00 2001
From: Soul pc <119080077+soulpc@users.noreply.github.com>
Date: Mon, 18 Dec 2023 16:51:34 +0530
Subject: [PATCH 213/237] Update pm_filter.py
---
plugins/pm_filter.py | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/plugins/pm_filter.py b/plugins/pm_filter.py
index baf5633..0616ac1 100644
--- a/plugins/pm_filter.py
+++ b/plugins/pm_filter.py
@@ -1177,7 +1177,8 @@ async def cb_handler(client: Client, query: CallbackQuery):
reply_markup = InlineKeyboardMarkup(buttons)
await query.message.edit_reply_markup(reply_markup)
await query.answer(MSG_ALRT)
-
+
+
async def auto_filter(client, msg, spoll=False):
reqstr1 = msg.from_user.id if msg.from_user else 0
reqstr = await client.get_users(reqstr1)
From 404affaf231b3e5155fb98fa46aaa735a40994b9 Mon Sep 17 00:00:00 2001
From: Soul pc <119080077+soulpc@users.noreply.github.com>
Date: Mon, 18 Dec 2023 18:02:17 +0530
Subject: [PATCH 214/237] Update pm_filter.py
---
plugins/pm_filter.py | 20 +++++++++++++++++---
1 file changed, 17 insertions(+), 3 deletions(-)
diff --git a/plugins/pm_filter.py b/plugins/pm_filter.py
index 0616ac1..5264d58 100644
--- a/plugins/pm_filter.py
+++ b/plugins/pm_filter.py
@@ -195,12 +195,26 @@ async def next_page(bot, query):
),
]
for file in files
- ]
-btn.insert(0,
+ ]
+ btn.insert(0,
[
- InlineKeyboardButton("Send All !", callback_data=f"send_fall#files#{key}#{offset}")
+ InlineKeyboardButton(f' ♀️ {search} ♀️ ', 'qinfo')
]
)
+ btn.insert(1,
+ [
+ InlineKeyboardButton("Send All !", callback_data=f"send_fall#files#{key}#{offset}"),
+ InlineKeyboardButton("ʟᴀɴɢᴜᴀɢᴇs", callback_data=f"languages#{search.replace(' ', '_')}#{key}")
+ ]
+ )
+ btn.insert(2,
+ [
+ InlineKeyboardButton(f'ɪɴꜰᴏ', 'reqinfo'),
+ InlineKeyboardButton(f'ᴍᴏᴠɪᴇ', 'minfo'),
+ InlineKeyboardButton(f'sᴇʀɪᴇs', 'sinfo'),
+ InlineKeyboardButton(f'ᴛɪᴘs', 'tinfo')
+ ]
+ )
if 0 < offset <= 10:
off_set = 0
From bee3ea75a72b7555bd2789e560aa53523289059a Mon Sep 17 00:00:00 2001
From: Soul pc <119080077+soulpc@users.noreply.github.com>
Date: Mon, 18 Dec 2023 18:12:04 +0530
Subject: [PATCH 215/237] Update pm_filter.py
---
plugins/pm_filter.py | 17 ++++++++++-------
1 file changed, 10 insertions(+), 7 deletions(-)
diff --git a/plugins/pm_filter.py b/plugins/pm_filter.py
index 5264d58..e33f9f7 100644
--- a/plugins/pm_filter.py
+++ b/plugins/pm_filter.py
@@ -1126,18 +1126,13 @@ async def cb_handler(client: Client, query: CallbackQuery):
else:
await save_group_settings(grpid, set_type, True)
- settings = await get_settings(grpid)
+ settings = await get_settings(grpid)
try:
if settings['auto_delete']:
settings = await get_settings(grp_id)
except KeyError:
await save_group_settings(grp_id, 'auto_delete', True)
settings = await get_settings(grp_id)
- if settings['auto_delete']:
- settings = await get_settings(grp_id)
- except KeyError:
- await save_group_settings(grp_id, 'auto_delete', True)
- settings = await get_settings(grp_id)
if settings is not None:
buttons = [
@@ -1185,9 +1180,17 @@ async def cb_handler(client: Client, query: CallbackQuery):
callback_data=f'setgs#is_shortlink#{settings["is_shortlink"]}#{str(grp_id)}'),
InlineKeyboardButton('✅ ON' if settings["is_shortlink"] else '❌ OFF',
callback_data=f'setgs#is_shortlink#{settings["is_shortlink"]}#{str(grp_id)}')
+ ],
+ [
+ InlineKeyboardButton("Close", callback_data="close_data")
]
-
+
]
+ settings = await get_settings(grpid)
+ try:
+ if settings['auto_delete']:
+ settings = await get_settings(grp_id)
+
reply_markup = InlineKeyboardMarkup(buttons)
await query.message.edit_reply_markup(reply_markup)
await query.answer(MSG_ALRT)
From 979bf54904144b27351fd17a36117d2e249448d3 Mon Sep 17 00:00:00 2001
From: Soul pc <119080077+soulpc@users.noreply.github.com>
Date: Mon, 18 Dec 2023 18:18:45 +0530
Subject: [PATCH 216/237] Update pm_filter.py
---
plugins/pm_filter.py | 5 -----
1 file changed, 5 deletions(-)
diff --git a/plugins/pm_filter.py b/plugins/pm_filter.py
index e33f9f7..88156b6 100644
--- a/plugins/pm_filter.py
+++ b/plugins/pm_filter.py
@@ -1186,11 +1186,6 @@ async def cb_handler(client: Client, query: CallbackQuery):
]
]
- settings = await get_settings(grpid)
- try:
- if settings['auto_delete']:
- settings = await get_settings(grp_id)
-
reply_markup = InlineKeyboardMarkup(buttons)
await query.message.edit_reply_markup(reply_markup)
await query.answer(MSG_ALRT)
From e56b412f4984a088b859ade79a9a4cc6693ff6c5 Mon Sep 17 00:00:00 2001
From: Soul pc <119080077+soulpc@users.noreply.github.com>
Date: Mon, 18 Dec 2023 18:29:09 +0530
Subject: [PATCH 217/237] Update pm_filter.py
---
plugins/pm_filter.py | 23 ++++++++++++++++++++++-
1 file changed, 22 insertions(+), 1 deletion(-)
diff --git a/plugins/pm_filter.py b/plugins/pm_filter.py
index 88156b6..edfeada 100644
--- a/plugins/pm_filter.py
+++ b/plugins/pm_filter.py
@@ -1269,8 +1269,29 @@ async def auto_filter(client, msg, spoll=False):
]
for file in files
]
-
+ key = f"{message.chat.id}-{message.id}"
+ btn.insert(0,
+ [
+ InlineKeyboardButton(f' ♀️ {search} ♀️ ', 'qinfo')
+ ]
+ )
+ btn.insert(1,
+ [
+ InlineKeyboardButton("Send All !",
+ callback_data=f"send_fall#{pre}#{message.chat.id}-{message.id}#{0}"),
+ InlineKeyboardButton("ʟᴀɴɢᴜᴀɢᴇs", callback_data=f"languages#{search.replace(' ', '_')}#{key}")
+ ]
+ )
+ btn.insert(2,
+ [
+ InlineKeyboardButton(f'ɪɴꜰᴏ', 'reqinfo'),
+ InlineKeyboardButton(f'ᴍᴏᴠɪᴇ', 'minfo'),
+ InlineKeyboardButton(f'sᴇʀɪᴇs', 'sinfo'),
+ InlineKeyboardButton(f'ᴛɪᴘs', 'tinfo')
+ ]
+ )
+
if offset != "":
key = f"{message.chat.id}-{message.id}"
BUTTONS[key] = search
From ca6d2f26c2feae3e7002ec3d2a4040484bc095dc Mon Sep 17 00:00:00 2001
From: Soul pc <119080077+soulpc@users.noreply.github.com>
Date: Tue, 19 Dec 2023 10:12:41 +0530
Subject: [PATCH 218/237] Update pm_filter.py
---
plugins/pm_filter.py | 342 +++++++++++++++++++++++++++++++++++--------
1 file changed, 284 insertions(+), 58 deletions(-)
diff --git a/plugins/pm_filter.py b/plugins/pm_filter.py
index edfeada..aeb0524 100644
--- a/plugins/pm_filter.py
+++ b/plugins/pm_filter.py
@@ -190,31 +190,150 @@ async def next_page(bot, query):
text=f"{file.file_name}", callback_data=f'files#{file.file_id}'
),
InlineKeyboardButton(
- text=f"{get_size(file.file_size)}",
- callback_data=f'files_#{file.file_id}',
- ),
- ]
- for file in files
+ text=f"{get_size(file.file_size)}",
+ callback_data=f'{pre}#{file.file_id}',
+ ),
+ ]
+ for file in files
+ ]
+ try:
+ if settings['auto_delete']:
+ btn.insert(0,
+ [
+ InlineKeyboardButton(f'😇 Info', 'tips'),
+ InlineKeyboardButton(f'📝 𝖳𝗂𝗉𝗌', 'info')
+ ]
+ )
+
+ else:
+ btn.insert(0,
+ [
+ InlineKeyboardButton(f'😇 Info', 'tips'),
+ InlineKeyboardButton(f'📝 𝖳𝗂𝗉𝗌', 'info')
+ ]
+ )
+
+ except KeyError:
+ grpid = await active_connection(str(query.message.from_user.id))
+ await save_group_settings(grpid, 'auto_delete', True)
+ settings = await get_settings(query.message.chat.id)
+ if settings['auto_delete']:
+ btn.insert(0,
+ [
+ InlineKeyboardButton(f'😇 Info', 'tips'),
+ InlineKeyboardButton(f'📝 𝖳𝗂𝗉𝗌', 'info')
]
- btn.insert(0,
- [
- InlineKeyboardButton(f' ♀️ {search} ♀️ ', 'qinfo')
- ]
- )
- btn.insert(1,
- [
- InlineKeyboardButton("Send All !", callback_data=f"send_fall#files#{key}#{offset}"),
- InlineKeyboardButton("ʟᴀɴɢᴜᴀɢᴇs", callback_data=f"languages#{search.replace(' ', '_')}#{key}")
- ]
- )
- btn.insert(2,
- [
- InlineKeyboardButton(f'ɪɴꜰᴏ', 'reqinfo'),
- InlineKeyboardButton(f'ᴍᴏᴠɪᴇ', 'minfo'),
- InlineKeyboardButton(f'sᴇʀɪᴇs', 'sinfo'),
- InlineKeyboardButton(f'ᴛɪᴘs', 'tinfo')
- ]
- )
+ )
+
+ else:
+ btn.insert(0,
+ [
+ InlineKeyboardButton(f'😇 Info', 'tips'),
+ InlineKeyboardButton(f'📝 𝖳𝗂𝗉𝗌', 'info')
+ ]
+ )
+ try:
+ settings = await get_settings(query.message.chat.id)
+ if settings['max_btn']:
+ if 0 < offset <= 10:
+ off_set = 0
+ elif offset == 0:
+ off_set = None
+ else:
+ off_set = offset - 10
+ if n_offset == 0:
+ btn.append(
+ [InlineKeyboardButton("◀️ 𝖡𝖠𝖢𝖪", callback_data=f"next_{req}_{key}_{off_set}"), InlineKeyboardButton(f"{math.ceil(int(offset)/10)+1} / {math.ceil(total/10)}", callback_data="pages")]
+ )
+ elif off_set is None:
+ btn.append([InlineKeyboardButton("📃", callback_data="pages"), InlineKeyboardButton(f"{math.ceil(int(offset)/10)+1} / {math.ceil(total/10)}", callback_data="pages"), InlineKeyboardButton("𝖭𝖤𝖷𝖳 ▶️", callback_data=f"next_{req}_{key}_{n_offset}")])
+ else:
+ btn.append(
+ [
+ InlineKeyboardButton("◀️ 𝖡𝖠𝖢𝖪", callback_data=f"next_{req}_{key}_{off_set}"),
+ InlineKeyboardButton(f"{math.ceil(int(offset)/10)+1} / {math.ceil(total/10)}", callback_data="pages"),
+ InlineKeyboardButton("𝖭𝖤𝖷𝖳 ▶️", callback_data=f"next_{req}_{key}_{n_offset}")
+ ],
+ )
+ else:
+ if 0 < offset <= int(MAX_B_TN):
+ off_set = 0
+ elif offset == 0:
+ off_set = None
+ else:
+ off_set = offset - int(MAX_B_TN)
+ if n_offset == 0:
+ btn.append(
+ [InlineKeyboardButton("◀️ 𝖡𝖠𝖢𝖪", callback_data=f"next_{req}_{key}_{off_set}"), InlineKeyboardButton(f"{math.ceil(int(offset)/int(MAX_B_TN))+1} / {math.ceil(total/int(MAX_B_TN))}", callback_data="pages")]
+ )
+ elif off_set is None:
+ btn.append([InlineKeyboardButton("📃", callback_data="pages"), InlineKeyboardButton(f"{math.ceil(int(offset)/int(MAX_B_TN))+1} / {math.ceil(total/int(MAX_B_TN))}", callback_data="pages"), InlineKeyboardButton("𝖭𝖤𝖷𝖳 ▶️", callback_data=f"next_{req}_{key}_{n_offset}")])
+ else:
+ btn.append(
+ [
+ InlineKeyboardButton("◀️ 𝖡𝖠𝖢𝖪", callback_data=f"next_{req}_{key}_{off_set}"),
+ InlineKeyboardButton(f"{math.ceil(int(offset)/int(MAX_B_TN))+1} / {math.ceil(total/int(MAX_B_TN))}", callback_data="pages"),
+ InlineKeyboardButton("𝖭𝖤𝖷𝖳 ▶️", callback_data=f"next_{req}_{key}_{n_offset}")
+ ],
+ )
+ except KeyError:
+ await save_group_settings(query.message.chat.id, 'max_btn', False)
+ settings = await get_settings(query.message.chat.id)
+ if settings['max_btn']:
+ if 0 < offset <= 10:
+ off_set = 0
+ elif offset == 0:
+ off_set = None
+ else:
+ off_set = offset - 10
+ if n_offset == 0:
+ btn.append(
+ [InlineKeyboardButton("◀️ 𝖡𝖠𝖢𝖪", callback_data=f"next_{req}_{key}_{off_set}"), InlineKeyboardButton(f"{math.ceil(int(offset)/10)+1} / {math.ceil(total/10)}", callback_data="pages")]
+ )
+ elif off_set is None:
+ btn.append([InlineKeyboardButton("📃", callback_data="pages"), InlineKeyboardButton(f"{math.ceil(int(offset)/10)+1} / {math.ceil(total/10)}", callback_data="pages"), InlineKeyboardButton("𝖭𝖤𝖷𝖳 ▶️", callback_data=f"next_{req}_{key}_{n_offset}")])
+ else:
+ btn.append(
+ [
+ InlineKeyboardButton("◀️ 𝖡𝖠𝖢𝖪", callback_data=f"next_{req}_{key}_{off_set}"),
+ InlineKeyboardButton(f"{math.ceil(int(offset)/10)+1} / {math.ceil(total/10)}", callback_data="pages"),
+ InlineKeyboardButton("𝖭𝖤𝖷𝖳 ▶️", callback_data=f"next_{req}_{key}_{n_offset}")
+ ],
+ )
+ else:
+ if 0 < offset <= int(MAX_B_TN):
+ off_set = 0
+ elif offset == 0:
+ off_set = None
+ else:
+ off_set = offset - int(MAX_B_TN)
+ if n_offset == 0:
+ btn.append(
+ [InlineKeyboardButton("◀️ 𝖡𝖠𝖢𝖪", callback_data=f"next_{req}_{key}_{off_set}"), InlineKeyboardButton(f"{math.ceil(int(offset)/int(MAX_B_TN))+1} / {math.ceil(total/int(MAX_B_TN))}", callback_data="pages")]
+ )
+ elif off_set is None:
+ btn.append([InlineKeyboardButton("📃", callback_data="pages"), InlineKeyboardButton(f"{math.ceil(int(offset)/int(MAX_B_TN))+1} / {math.ceil(total/int(MAX_B_TN))}", callback_data="pages"), InlineKeyboardButton("𝖭𝖤𝖷𝖳 ▶️", callback_data=f"next_{req}_{key}_{n_offset}")])
+ else:
+ btn.append(
+ [
+ InlineKeyboardButton("◀️ 𝖡𝖠𝖢𝖪", callback_data=f"next_{req}_{key}_{off_set}"),
+ InlineKeyboardButton(f"{math.ceil(int(offset)/int(MAX_B_TN))+1} / {math.ceil(total/int(MAX_B_TN))}", callback_data="pages"),
+ InlineKeyboardButton("𝖭𝖤𝖷𝖳 ▶️", callback_data=f"next_{req}_{key}_{n_offset}")
+ ],
+ )
+ btn.insert(0, [
+ InlineKeyboardButton(f'🎬 {search} 🎬', 'rkbtn')
+ ])
+ btn.insert(2, [
+ InlineKeyboardButton("📤 𝖲𝖾𝗇𝖽 𝖠𝗅𝗅 𝖥𝗂𝗅𝖾𝗌 📤", callback_data=f"send_all#{req}#{key}#{pre}")
+ ])
+ try:
+ await query.edit_message_reply_markup(
+ reply_markup=InlineKeyboardMarkup(btn)
+ )
+ except MessageNotModified:
+ pass
+ await query.answer()
if 0 < offset <= 10:
off_set = 0
@@ -1263,43 +1382,150 @@ async def auto_filter(client, msg, spoll=False):
callback_data=f'{pre}#{file.file_id}',
),
InlineKeyboardButton(
- text=f"{get_size(file.file_size)}",
- callback_data=f'{pre}#{file.file_id}',
- ),
- ]
- for file in files
+ text=f"{get_size(file.file_size)}",
+ callback_data=f'{pre}#{file.file_id}',
+ ),
]
+ for file in files
+ ]
+ try:
+ if settings['auto_delete']:
+ btn.insert(0,
+ [
+ InlineKeyboardButton(f'😇 Info', 'tips'),
+ InlineKeyboardButton(f'📝 𝖳𝗂𝗉𝗌', 'info')
+ ]
+ )
- key = f"{message.chat.id}-{message.id}"
- btn.insert(0,
- [
- InlineKeyboardButton(f' ♀️ {search} ♀️ ', 'qinfo')
- ]
- )
- btn.insert(1,
- [
- InlineKeyboardButton("Send All !",
- callback_data=f"send_fall#{pre}#{message.chat.id}-{message.id}#{0}"),
- InlineKeyboardButton("ʟᴀɴɢᴜᴀɢᴇs", callback_data=f"languages#{search.replace(' ', '_')}#{key}")
- ]
- )
- btn.insert(2,
- [
- InlineKeyboardButton(f'ɪɴꜰᴏ', 'reqinfo'),
- InlineKeyboardButton(f'ᴍᴏᴠɪᴇ', 'minfo'),
- InlineKeyboardButton(f'sᴇʀɪᴇs', 'sinfo'),
- InlineKeyboardButton(f'ᴛɪᴘs', 'tinfo')
- ]
- )
-
- if offset != "":
- key = f"{message.chat.id}-{message.id}"
- BUTTONS[key] = search
- req = message.from_user.id if message.from_user else 0
- btn.append(
- [InlineKeyboardButton(text=f"𝐏𝐀𝐆𝐄 1/{math.ceil(int(total_results) / 10)}", callback_data="pages"),
- InlineKeyboardButton(text="𝐍𝐄𝐗𝐓 ⌦", callback_data=f"next_{req}_{key}_{offset}")]
+ else:
+ btn.insert(0,
+ [
+ InlineKeyboardButton(f'😇 Info', 'tips'),
+ InlineKeyboardButton(f'📝 𝖳𝗂𝗉𝗌', 'info')
+ ]
+ )
+
+ except KeyError:
+ grpid = await active_connection(str(query.message.from_user.id))
+ await save_group_settings(grpid, 'auto_delete', True)
+ settings = await get_settings(query.message.chat.id)
+ if settings['auto_delete']:
+ btn.insert(0,
+ [
+ InlineKeyboardButton(f'😇 Info', 'tips'),
+ InlineKeyboardButton(f'📝 𝖳𝗂𝗉𝗌', 'info')
+ ]
+ )
+
+ else:
+ btn.insert(0,
+ [
+ InlineKeyboardButton(f'😇 Info', 'tips'),
+ InlineKeyboardButton(f'📝 𝖳𝗂𝗉𝗌', 'info')
+ ]
+ )
+ try:
+ settings = await get_settings(query.message.chat.id)
+ if settings['max_btn']:
+ if 0 < offset <= 10:
+ off_set = 0
+ elif offset == 0:
+ off_set = None
+ else:
+ off_set = offset - 10
+ if n_offset == 0:
+ btn.append(
+ [InlineKeyboardButton("◀️ 𝖡𝖠𝖢𝖪", callback_data=f"next_{req}_{key}_{off_set}"), InlineKeyboardButton(f"{math.ceil(int(offset)/10)+1} / {math.ceil(total/10)}", callback_data="pages")]
+ )
+ elif off_set is None:
+ btn.append([InlineKeyboardButton("📃", callback_data="pages"), InlineKeyboardButton(f"{math.ceil(int(offset)/10)+1} / {math.ceil(total/10)}", callback_data="pages"), InlineKeyboardButton("𝖭𝖤𝖷𝖳 ▶️", callback_data=f"next_{req}_{key}_{n_offset}")])
+ else:
+ btn.append(
+ [
+ InlineKeyboardButton("◀️ 𝖡𝖠𝖢𝖪", callback_data=f"next_{req}_{key}_{off_set}"),
+ InlineKeyboardButton(f"{math.ceil(int(offset)/10)+1} / {math.ceil(total/10)}", callback_data="pages"),
+ InlineKeyboardButton("𝖭𝖤𝖷𝖳 ▶️", callback_data=f"next_{req}_{key}_{n_offset}")
+ ],
+ )
+ else:
+ if 0 < offset <= int(MAX_B_TN):
+ off_set = 0
+ elif offset == 0:
+ off_set = None
+ else:
+ off_set = offset - int(MAX_B_TN)
+ if n_offset == 0:
+ btn.append(
+ [InlineKeyboardButton("◀️ 𝖡𝖠𝖢𝖪", callback_data=f"next_{req}_{key}_{off_set}"), InlineKeyboardButton(f"{math.ceil(int(offset)/int(MAX_B_TN))+1} / {math.ceil(total/int(MAX_B_TN))}", callback_data="pages")]
+ )
+ elif off_set is None:
+ btn.append([InlineKeyboardButton("📃", callback_data="pages"), InlineKeyboardButton(f"{math.ceil(int(offset)/int(MAX_B_TN))+1} / {math.ceil(total/int(MAX_B_TN))}", callback_data="pages"), InlineKeyboardButton("𝖭𝖤𝖷𝖳 ▶️", callback_data=f"next_{req}_{key}_{n_offset}")])
+ else:
+ btn.append(
+ [
+ InlineKeyboardButton("◀️ 𝖡𝖠𝖢𝖪", callback_data=f"next_{req}_{key}_{off_set}"),
+ InlineKeyboardButton(f"{math.ceil(int(offset)/int(MAX_B_TN))+1} / {math.ceil(total/int(MAX_B_TN))}", callback_data="pages"),
+ InlineKeyboardButton("𝖭𝖤𝖷𝖳 ▶️", callback_data=f"next_{req}_{key}_{n_offset}")
+ ],
+ )
+ except KeyError:
+ await save_group_settings(query.message.chat.id, 'max_btn', False)
+ settings = await get_settings(query.message.chat.id)
+ if settings['max_btn']:
+ if 0 < offset <= 10:
+ off_set = 0
+ elif offset == 0:
+ off_set = None
+ else:
+ off_set = offset - 10
+ if n_offset == 0:
+ btn.append(
+ [InlineKeyboardButton("◀️ 𝖡𝖠𝖢𝖪", callback_data=f"next_{req}_{key}_{off_set}"), InlineKeyboardButton(f"{math.ceil(int(offset)/10)+1} / {math.ceil(total/10)}", callback_data="pages")]
+ )
+ elif off_set is None:
+ btn.append([InlineKeyboardButton("📃", callback_data="pages"), InlineKeyboardButton(f"{math.ceil(int(offset)/10)+1} / {math.ceil(total/10)}", callback_data="pages"), InlineKeyboardButton("𝖭𝖤𝖷𝖳 ▶️", callback_data=f"next_{req}_{key}_{n_offset}")])
+ else:
+ btn.append(
+ [
+ InlineKeyboardButton("◀️ 𝖡𝖠𝖢𝖪", callback_data=f"next_{req}_{key}_{off_set}"),
+ InlineKeyboardButton(f"{math.ceil(int(offset)/10)+1} / {math.ceil(total/10)}", callback_data="pages"),
+ InlineKeyboardButton("𝖭𝖤𝖷𝖳 ▶️", callback_data=f"next_{req}_{key}_{n_offset}")
+ ],
+ )
+ else:
+ if 0 < offset <= int(MAX_B_TN):
+ off_set = 0
+ elif offset == 0:
+ off_set = None
+ else:
+ off_set = offset - int(MAX_B_TN)
+ if n_offset == 0:
+ btn.append(
+ [InlineKeyboardButton("◀️ 𝖡𝖠𝖢𝖪", callback_data=f"next_{req}_{key}_{off_set}"), InlineKeyboardButton(f"{math.ceil(int(offset)/int(MAX_B_TN))+1} / {math.ceil(total/int(MAX_B_TN))}", callback_data="pages")]
+ )
+ elif off_set is None:
+ btn.append([InlineKeyboardButton("📃", callback_data="pages"), InlineKeyboardButton(f"{math.ceil(int(offset)/int(MAX_B_TN))+1} / {math.ceil(total/int(MAX_B_TN))}", callback_data="pages"), InlineKeyboardButton("𝖭𝖤𝖷𝖳 ▶️", callback_data=f"next_{req}_{key}_{n_offset}")])
+ else:
+ btn.append(
+ [
+ InlineKeyboardButton("◀️ 𝖡𝖠𝖢𝖪", callback_data=f"next_{req}_{key}_{off_set}"),
+ InlineKeyboardButton(f"{math.ceil(int(offset)/int(MAX_B_TN))+1} / {math.ceil(total/int(MAX_B_TN))}", callback_data="pages"),
+ InlineKeyboardButton("𝖭𝖤𝖷𝖳 ▶️", callback_data=f"next_{req}_{key}_{n_offset}")
+ ],
+ )
+ btn.insert(0, [
+ InlineKeyboardButton(f'🎬 {search} 🎬', 'rkbtn')
+ ])
+ btn.insert(2, [
+ InlineKeyboardButton("📤 𝖲𝖾𝗇𝖽 𝖠𝗅𝗅 𝖥𝗂𝗅𝖾𝗌 📤", callback_data=f"send_all#{req}#{key}#{pre}")
+ ])
+ try:
+ await query.edit_message_reply_markup(
+ reply_markup=InlineKeyboardMarkup(btn)
)
+ except MessageNotModified:
+ pass
+ await query.answer()
else:
btn.append(
[InlineKeyboardButton(text="𝐍𝐎 𝐌𝐎𝐑𝐄 𝐏𝐀𝐆𝐄𝐒 𝐀𝐕𝐀𝐈𝐋𝐀𝐁𝐋𝐄", callback_data="pages")]
From df33b2ffd6a7d97ae6dc5418fda83cffc383c70a Mon Sep 17 00:00:00 2001
From: Soul pc <119080077+soulpc@users.noreply.github.com>
Date: Tue, 19 Dec 2023 10:51:29 +0530
Subject: [PATCH 219/237] Update pm_filter.py
---
plugins/pm_filter.py | 1 +
1 file changed, 1 insertion(+)
diff --git a/plugins/pm_filter.py b/plugins/pm_filter.py
index aeb0524..4d7176b 100644
--- a/plugins/pm_filter.py
+++ b/plugins/pm_filter.py
@@ -1526,6 +1526,7 @@ async def auto_filter(client, msg, spoll=False):
except MessageNotModified:
pass
await query.answer()
+
else:
btn.append(
[InlineKeyboardButton(text="𝐍𝐎 𝐌𝐎𝐑𝐄 𝐏𝐀𝐆𝐄𝐒 𝐀𝐕𝐀𝐈𝐋𝐀𝐁𝐋𝐄", callback_data="pages")]
From f9a747e0f4f99ab6cebec1dc0409e140697d00aa Mon Sep 17 00:00:00 2001
From: Soul pc <119080077+soulpc@users.noreply.github.com>
Date: Tue, 19 Dec 2023 10:54:53 +0530
Subject: [PATCH 220/237] Update pm_filter.py
---
plugins/pm_filter.py | 8 ++------
1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/plugins/pm_filter.py b/plugins/pm_filter.py
index 4d7176b..afc8e94 100644
--- a/plugins/pm_filter.py
+++ b/plugins/pm_filter.py
@@ -1526,11 +1526,7 @@ async def auto_filter(client, msg, spoll=False):
except MessageNotModified:
pass
await query.answer()
-
- else:
- btn.append(
- [InlineKeyboardButton(text="𝐍𝐎 𝐌𝐎𝐑𝐄 𝐏𝐀𝐆𝐄𝐒 𝐀𝐕𝐀𝐈𝐋𝐀𝐁𝐋𝐄", callback_data="pages")]
- )
+
imdb = await get_poster(search, file=(files[0]).file_name) if settings["imdb"] else None
TEMPLATE = settings['template']
if imdb:
@@ -1566,7 +1562,7 @@ async def auto_filter(client, msg, spoll=False):
**locals()
)
else:
- cap = f" Hai 👋 {message.from_user.mention} 😍\n📁 𝗙𝗼𝘂𝗻𝗱 ✨ 𝗙𝗶𝗹𝗲𝘀 𝗙𝗼𝗿 𝗬𝗼𝘂𝗿 𝗤𝘂𝗲𝗿𝘆 : #{search}👇🏻"
+ Hai 👋 {message.from_user.mention} 😍\n📁 𝗙𝗼𝘂𝗻𝗱 ✨ 𝗙𝗶𝗹𝗲𝘀 𝗙𝗼𝗿 𝗬𝗼𝘂𝗿 𝗤𝘂𝗲𝗿𝘆 : #{search}👇🏻"
if imdb and imdb.get('poster'):
try:
if message.chat.id == SUPPORT_CHAT_ID:
From 574a15aff258370ec1b7bf472032777a6d3e8853 Mon Sep 17 00:00:00 2001
From: Soul pc <119080077+soulpc@users.noreply.github.com>
Date: Tue, 19 Dec 2023 10:57:32 +0530
Subject: [PATCH 221/237] Add files via upload
---
plugins/pm_filter (6).py | 1974 ++++++++++++++++++++++++++++++++++++++
1 file changed, 1974 insertions(+)
create mode 100644 plugins/pm_filter (6).py
diff --git a/plugins/pm_filter (6).py b/plugins/pm_filter (6).py
new file mode 100644
index 0000000..305cbc9
--- /dev/null
+++ b/plugins/pm_filter (6).py
@@ -0,0 +1,1974 @@
+# Kanged From @TroJanZheX
+# REDIRECT added https://github.com/Joelkb
+import asyncio
+import re
+import ast
+import math
+import random
+from pyrogram.errors.exceptions.bad_request_400 import MediaEmpty, PhotoInvalidDimensions, WebpageMediaEmpty
+from Script import script
+import pyrogram
+from database.connections_mdb import active_connection, all_connections, delete_connection, if_active, make_active, \
+ make_inactive
+from info import ADMINS, AUTH_CHANNEL, FILE_CHANNEL, AUTH_USERS, CUSTOM_FILE_CAPTION, NOR_IMG, AUTH_GROUPS, \
+ P_TTI_SHOW_OFF, IMDB, \
+ SINGLE_BUTTON, SPELL_CHECK_REPLY, IMDB_TEMPLATE, SPELL_IMG, MSG_ALRT, FILE_FORWARD, MAIN_CHANNEL, LOG_CHANNEL, PICS, \
+ SUPPORT_CHAT_ID, REQ_CHANNEL
+from pyrogram.types import InlineKeyboardMarkup, InlineKeyboardButton, CallbackQuery, InputMediaPhoto
+from pyrogram import Client, filters, enums
+from pyrogram.errors import FloodWait, UserIsBlocked, MessageNotModified, PeerIdInvalid
+from utils import get_size, is_subscribed, get_poster, search_gagala, temp, get_settings, save_group_settings, \
+ get_shortlink, send_all
+from database.users_chats_db import db
+from database.ia_filterdb import Media, get_file_details, get_search_results, get_bad_files
+from database.filters_mdb import (
+ del_all,
+ find_filter,
+ get_filters,
+)
+from database.gfilters_mdb import (
+ find_gfilter,
+ get_gfilters,
+)
+import logging
+
+logger = logging.getLogger(__name__)
+logger.setLevel(logging.ERROR)
+
+BUTTONS = {}
+SPELL_CHECK = {}
+FILTER_MODE = {}
+LANGUAGES = ["malayalam", "tamil", "english", "hindi", "telugu", "kannada"]
+
+
+@Client.on_message(filters.command('autofilter') & filters.user(ADMINS))
+async def fil_mod(client, message):
+ mode_on = ["yes", "on", "true"]
+ mode_of = ["no", "off", "false"]
+
+ try:
+ args = message.text.split(None, 1)[1].lower()
+ except:
+ return await message.reply("**𝙸𝙽𝙲𝙾𝙼𝙿𝙴𝚃𝙴𝙽𝚃 𝙲𝙾𝙼𝙼𝙰𝙳...**")
+
+ m = await message.reply("**𝚂𝙴𝚃𝚃𝙸𝙽𝙶.../**")
+
+ if args in mode_on:
+ FILTER_MODE[str(message.chat.id)] = "True"
+ await m.edit("**𝙰𝚄𝚃𝙾𝙵𝙸𝙻𝚃𝙴𝚁 𝙴𝙽𝙰𝙱𝙻𝙴𝙳**")
+
+ elif args in mode_of:
+ FILTER_MODE[str(message.chat.id)] = "False"
+ await m.edit("**𝙰𝚄𝚃𝙾𝙵𝙸𝙻𝚃𝙴𝚁 𝙳𝙸𝚂𝙰𝙱𝙻𝙴𝙳**")
+ else:
+ await m.edit("𝚄𝚂𝙴 :- /autofilter on 𝙾𝚁 /autofilter off")
+
+
+@Client.on_message((filters.group) & filters.text & filters.incoming)
+async def give_filter(client, message):
+ await global_filters(client, message)
+ group_id = message.chat.id
+ name = message.text
+
+ keywords = await get_filters(group_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)
+
+ if reply_text:
+ reply_text = reply_text.replace("\\n", "\n").replace("\\t", "\t")
+
+ if btn is not None:
+ try:
+ if fileid == "None":
+ if btn == "[]":
+ await message.reply_text(reply_text, disable_web_page_preview=True)
+ else:
+ button = eval(btn)
+ await message.reply_text(
+ reply_text,
+ disable_web_page_preview=True,
+ reply_markup=InlineKeyboardMarkup(button)
+ )
+ elif btn == "[]":
+ await message.reply_cached_media(
+ fileid,
+ caption=reply_text or ""
+ )
+ else:
+ button = eval(btn)
+ await message.reply_cached_media(
+ fileid,
+ caption=reply_text or "",
+ reply_markup=InlineKeyboardMarkup(button)
+ )
+ except Exception as e:
+ print(e)
+ break
+
+ else:
+ if FILTER_MODE.get(str(message.chat.id)) == "False":
+ return
+ else:
+ await auto_filter(client, message)
+
+
+@Client.on_message(filters.private & filters.text & filters.incoming)
+async def pm_text(bot, message):
+ content = message.text
+ user = message.from_user.first_name
+ user_id = message.from_user.id
+ if content.startswith("/") or content.startswith("#"): return # ignore commands and hashtags
+ await message.reply_text("Your message has been sent to my moderators !",
+ reply_markup=InlineKeyboardMarkup(
+ [[
+ InlineKeyboardButton('📍 Mᴏᴠɪᴇ ɪs ʜᴇʀᴇ 📍', url='https://t.me/moviecafe_01')
+ ]]
+ )
+ )
+ await bot.send_message(
+ chat_id=LOG_CHANNEL,
+ text=f"#PM_MSG\n\nName : {user}\n\nID : {user_id}\n\nMessage : {content}"
+ )
+
+
+@Client.on_callback_query(filters.regex(r"^next"))
+async def next_page(bot, query):
+ ident, req, key, offset = query.data.split("_")
+ if int(req) not in [query.from_user.id, 0]:
+ return await query.answer(script.ALRT_TXT.format(query.from_user.first_name), show_alert=True)
+ try:
+ offset = int(offset)
+ except:
+ offset = 0
+ search = BUTTONS.get(key)
+ if not search:
+ await query.answer(script.OLD_ALRT_TXT.format(query.from_user.first_name), show_alert=True)
+ return
+
+ files, n_offset, total = await get_search_results(search, offset=offset, filter=True)
+ try:
+ n_offset = int(n_offset)
+ except:
+ n_offset = 0
+
+ if not files:
+ return
+ settings = await get_settings(query.message.chat.id)
+ if 'is_shortlink' in settings.keys():
+ ENABLE_SHORTLINK = settings['is_shortlink']
+ else:
+ await save_group_settings(query.message.chat.id, 'is_shortlink', False)
+ ENABLE_SHORTLINK = False
+ if ENABLE_SHORTLINK == True:
+ if settings['button']:
+ btn = [
+ [
+ InlineKeyboardButton(
+ text=f"[{get_size(file.file_size)}] {file.file_name}",
+ url=await get_shortlink(query.message.chat.id,
+ f"https://telegram.me/{temp.U_NAME}?start=files_{file.file_id}")
+ ),
+ ]
+ for file in files
+ ]
+ else:
+ btn = [
+ [
+ InlineKeyboardButton(
+ text=f"{file.file_name}", url=await get_shortlink(query.message.chat.id,
+ f"https://telegram.me/{temp.U_NAME}?start=files_{file.file_id}")
+ ),
+ InlineKeyboardButton(
+ text=f"{get_size(file.file_size)}",
+ url=await get_shortlink(query.message.chat.id,
+ f"https://telegram.me/{temp.U_NAME}?start=files_{file.file_id}")
+ ),
+ ]
+ for file in files
+ ]
+ else:
+ if settings['button']:
+ btn = [
+ [
+ InlineKeyboardButton(
+ text=f"[{get_size(file.file_size)}] {file.file_name}", callback_data=f'files#{file.file_id}'
+ ),
+ ]
+ for file in files
+ ]
+ else:
+ btn = [
+ [
+ InlineKeyboardButton(
+ text=f"{file.file_name}", callback_data=f'files#{file.file_id}'
+ ),
+ InlineKeyboardButton(
+ text=f"{get_size(file.file_size)}",
+ callback_data=f'files_#{file.file_id}',
+ ),
+ ]
+ for file in files
+ ]
+ btn.insert(0,
+ [
+ InlineKeyboardButton(f' ♀️ {search} ♀️ ', 'qinfo')
+ ]
+ )
+ btn.insert(1,
+ [
+ InlineKeyboardButton("Send All !", callback_data=f"send_fall#files#{key}#{offset}"),
+ InlineKeyboardButton("ʟᴀɴɢᴜᴀɢᴇs", callback_data=f"languages#{search.replace(' ', '_')}#{key}")
+ ]
+ )
+ btn.insert(2,
+ [
+ InlineKeyboardButton(f'ɪɴꜰᴏ', 'reqinfo'),
+ InlineKeyboardButton(f'ᴍᴏᴠɪᴇ', 'minfo'),
+ InlineKeyboardButton(f'sᴇʀɪᴇs', 'sinfo'),
+ InlineKeyboardButton(f'ᴛɪᴘs', 'tinfo')
+ ]
+ )
+
+ if 0 < offset <= 10:
+ off_set = 0
+ elif offset == 0:
+ off_set = None
+ else:
+ off_set = offset - 10
+ if n_offset == 0:
+ btn.append(
+ [InlineKeyboardButton("⌫ 𝐁𝐀𝐂𝐊", callback_data=f"next_{req}_{key}_{off_set}"),
+ InlineKeyboardButton(f"𝐏𝐀𝐆𝐄 {math.ceil(int(offset) / 7) + 1} / {math.ceil(total / 7)}",
+ callback_data="pages")]
+ )
+ elif off_set is None:
+ btn.append(
+ [InlineKeyboardButton(f"{math.ceil(int(offset) / 7) + 1} / {math.ceil(total / 7)}", callback_data="pages"),
+ InlineKeyboardButton("𝐍𝐄𝐗𝐓 ⌦", callback_data=f"next_{req}_{key}_{n_offset}")])
+ else:
+ btn.append(
+ [
+ InlineKeyboardButton("⌫ 𝐁𝐀𝐂𝐊", callback_data=f"next_{req}_{key}_{off_set}"),
+ InlineKeyboardButton(f"𝐏𝐀𝐆𝐄 {math.ceil(int(offset) / 7) + 1} / {math.ceil(total / 7)}",
+ callback_data="pages"),
+ InlineKeyboardButton("𝐍𝐄𝐗𝐓 ⌦", callback_data=f"next_{req}_{key}_{n_offset}")
+ ],
+ )
+ try:
+ await query.edit_message_reply_markup(
+ reply_markup=InlineKeyboardMarkup(btn)
+ )
+ except MessageNotModified:
+ pass
+ await query.answer()
+
+
+# Language Code Temp
+
+
+@Client.on_callback_query(filters.regex(r"^languages#"))
+async def languages_cb_handler(client: Client, query: CallbackQuery):
+ if int(query.from_user.id) not in [query.message.reply_to_message.from_user.id, 0]:
+ return await query.answer(
+ f"⚠️ ʜᴇʟʟᴏ {query.from_user.first_name},\nᴛʜɪꜱ ɪꜱ ɴᴏᴛ ʏᴏᴜʀ ᴍᴏᴠɪᴇ ʀᴇQᴜᴇꜱᴛ,\nʀᴇQᴜᴇꜱᴛ ʏᴏᴜʀ'ꜱ...",
+ show_alert=True,
+ )
+
+ _, search, key = query.data.split("#")
+
+ btn = [
+ [
+ InlineKeyboardButton(
+ text=lang.title(),
+ callback_data=f"fl#{lang.lower()}#{search}#{key}"
+ ),
+ ]
+ for lang in LANGUAGES
+ ]
+
+ btn.insert(
+ 0,
+ [
+ InlineKeyboardButton(
+ text="☟ ꜱᴇʟᴇᴄᴛ ʏᴏᴜʀ ʟᴀɴɢᴜᴀɢᴇꜱ ☟", callback_data="selectlang"
+ )
+ ],
+ )
+ req = query.from_user.id
+ offset = 0
+ btn.append([InlineKeyboardButton(text="↺ ʙᴀᴄᴋ ᴛᴏ ꜰɪʟᴇs ↻", callback_data=f"next_{req}_{key}_{offset}")])
+
+ await query.edit_message_reply_markup(InlineKeyboardMarkup(btn))
+
+
+@Client.on_callback_query(filters.regex(r"^fl#"))
+async def filter_languages_cb_handler(client: Client, query: CallbackQuery):
+ _, lang, search, key = query.data.split("#")
+
+ search = search.replace("_", " ")
+ req = query.from_user.id
+ chat_id = query.message.chat.id
+ message = query.message
+ if int(req) not in [query.message.reply_to_message.from_user.id, 0]:
+ return await query.answer(
+ f"⚠️ ʜᴇʟʟᴏ{query.from_user.first_name},\nᴛʜɪꜱ ɪꜱ ɴᴏᴛ ʏᴏᴜʀ ᴍᴏᴠɪᴇ ʀᴇQᴜᴇꜱᴛ,\nʀᴇQᴜᴇꜱᴛ ʏᴏᴜʀ'ꜱ...",
+ show_alert=True,
+ )
+
+ search = f"{search} {lang}"
+
+ files, offset, _ = await get_search_results(search, max_results=10)
+ files = [file for file in files if re.search(lang, file.file_name, re.IGNORECASE)]
+ if not files:
+ await query.answer("🚫 𝗡𝗼 𝗙𝗶𝗹𝗲 𝗪𝗲𝗿𝗲 𝗙𝗼𝘂𝗻𝗱 🚫", show_alert=1)
+ return
+
+ settings = await get_settings(message.chat.id)
+ if 'is_shortlink' in settings.keys():
+ ENABLE_SHORTLINK = settings['is_shortlink']
+ else:
+ await save_group_settings(message.chat.id, 'is_shortlink', False)
+ ENABLE_SHORTLINK = False
+ pre = 'filep' if settings['file_secure'] else 'file'
+ if ENABLE_SHORTLINK == True:
+ btn = (
+ [
+ [
+ InlineKeyboardButton(
+ text=f"▫️ {get_size(file.file_size)} ⊳ {file.file_name}",
+ url=await get_shortlink(
+ message.chat.id,
+ f"https://telegram.me/{temp.U_NAME}?start=files_{file.file_id}",
+ ),
+ ),
+ ]
+ for file in files
+ ]
+ if settings["button"]
+ else [
+ [
+ InlineKeyboardButton(
+ text=f"{file.file_name}",
+ url=await get_shortlink(
+ message.chat.id,
+ f"https://telegram.me/{temp.U_NAME}?start=files_{file.file_id}",
+ ),
+ ),
+ InlineKeyboardButton(
+ text=f"{get_size(file.file_size)}",
+ url=await get_shortlink(
+ message.chat.id,
+ f"https://telegram.me/{temp.U_NAME}?start=files_{file.file_id}",
+ ),
+ ),
+ ]
+ for file in files
+ ]
+ )
+ elif settings["button"]:
+ btn = [
+ [
+ InlineKeyboardButton(
+ text=f"▫️ {get_size(file.file_size)} ⊳ {file.file_name}", callback_data=f'{pre}#{file.file_id}'
+ ),
+ ]
+ for file in files
+ ]
+ else:
+ btn = [
+ [
+ InlineKeyboardButton(
+ text=f"{file.file_name}",
+ callback_data=f'{pre}#{file.file_id}',
+ ),
+ InlineKeyboardButton(
+ text=f"{get_size(file.file_size)}",
+ callback_data=f'{pre}#{file.file_id}',
+ ),
+ ]
+ for file in files
+ ]
+ try:
+ if settings['auto_delete']:
+ btn.insert(
+ 0,
+ [
+ InlineKeyboardButton(f'ɪɴꜰᴏ', 'reqinfo'),
+ InlineKeyboardButton(f'ᴍᴏᴠɪᴇ', 'minfo'),
+ InlineKeyboardButton(f'ꜱᴇʀɪᴇꜱ', 'sinfo'),
+ ],
+ )
+
+ else:
+ btn.insert(
+ 0,
+ [
+ InlineKeyboardButton(f'ɪɴꜰᴏ', 'reqinfo'),
+ InlineKeyboardButton(f'ᴍᴏᴠɪᴇ', 'minfo'),
+ InlineKeyboardButton(f'ꜱᴇʀɪᴇꜱ', 'sinfo'),
+ ],
+ )
+
+ except KeyError:
+ grpid = await active_connection(str(message.from_user.id))
+ await save_group_settings(grpid, 'auto_delete', True)
+ settings = await get_settings(message.chat.id)
+ if settings['auto_delete']:
+ btn.insert(
+ 0,
+ [
+ InlineKeyboardButton(f'ɪɴꜰᴏ', 'reqinfo'),
+ InlineKeyboardButton(f'ᴍᴏᴠɪᴇ', 'minfo'),
+ InlineKeyboardButton(f'ꜱᴇʀɪᴇꜱ', 'sinfo'),
+ ],
+ )
+
+ else:
+ btn.insert(
+ 0,
+ [
+ InlineKeyboardButton(f'ɪɴꜰᴏ', 'reqinfo'),
+ InlineKeyboardButton(f'ᴍᴏᴠɪᴇ', 'minfo'),
+ InlineKeyboardButton(f'ꜱᴇʀɪᴇꜱ', 'sinfo'),
+ ],
+ )
+
+ btn.insert(0, [
+ InlineKeyboardButton("! Sᴇɴᴅ Aʟʟ Fɪʟᴇs Tᴏ PM !", callback_data=f"send_fall#files#{key}#{offset}")
+ ])
+ offset = 0
+
+ btn.append([
+ InlineKeyboardButton(
+ text="↺ ʙᴀᴄᴋ ᴛᴏ ꜰɪʟᴇs ↻",
+ callback_data=f"next_{req}_{key}_{offset}"
+ ),
+ ])
+
+ await query.edit_message_reply_markup(reply_markup=InlineKeyboardMarkup(btn))
+
+
+# spellcheck error fixing
+@Client.on_callback_query(filters.regex(r"^spol"))
+async def advantage_spoll_choker(bot, query):
+ _, user, movie_ = query.data.split('#')
+
+ movies = SPELL_CHECK.get(query.message.reply_to_message.id)
+
+ if not movies:
+ return await query.answer(script.OLD_ALRT_TXT.format(query.from_user.first_name), show_alert=True)
+ if int(user) != 0 and query.from_user.id != int(user):
+ return await query.answer(script.ALRT_TXT.format(query.from_user.first_name), show_alert=True)
+ if movie_ == "close_spellcheck":
+ return await query.message.delete()
+ movie = movies[int(movie_)] # Fixed int(movie_) instead of movies[(int(movie_))]
+
+ await query.answer(script.TOP_ALRT_MSG)
+
+ k = await manual_filters(bot, query.message, text=movie)
+
+ if k == False:
+ files, offset, total_results = await get_search_results(movie, offset=0, filter=True)
+ if files:
+ k = (movie, files, offset, total_results)
+ await auto_filter(bot, query, k)
+ else:
+ reqstr1 = query.from_user.id if query.from_user else 0
+ reqstr = await bot.get_users(reqstr1)
+ await bot.send_message(chat_id=LOG_CHANNEL, text=(script.NORSLTS.format(reqstr.id, reqstr.mention, movie)))
+ k = await query.message.edit(script.MVE_NT_FND)
+ await asyncio.sleep(10)
+ await k.delete()
+
+
+@Client.on_callback_query()
+async def cb_handler(client: Client, query: CallbackQuery):
+ if query.data == "close_data":
+ await query.message.delete()
+ elif query.data == "delallconfirm":
+ userid = query.from_user.id
+ chat_type = query.message.chat.type
+
+ if chat_type == enums.ChatType.PRIVATE:
+ grpid = await active_connection(str(userid))
+ if grpid is not None:
+ grp_id = grpid
+ try:
+ chat = await client.get_chat(grpid)
+ title = chat.title
+ except:
+ await query.message.edit_text("Make sure I'm present in your group!!", quote=True)
+ return await query.answer(MSG_ALRT)
+ else:
+ await query.message.edit_text(
+ "I'm not connected to any groups!\nCheck /connections or connect to any groups",
+ quote=True
+ )
+ return await query.answer(MSG_ALRT)
+
+ elif chat_type in [enums.ChatType.GROUP, enums.ChatType.SUPERGROUP]:
+ grp_id = query.message.chat.id
+ title = query.message.chat.title
+
+ else:
+ return await query.answer(MSG_ALRT)
+
+ st = await client.get_chat_member(grp_id, userid)
+ if (st.status == enums.ChatMemberStatus.OWNER) or (str(userid) in ADMINS):
+ await del_all(query.message, grp_id, title)
+ else:
+ await query.answer("You need to be Group Owner or an Auth User to do that!", show_alert=True)
+ elif query.data == "delallcancel":
+ userid = query.from_user.id
+ chat_type = query.message.chat.type
+
+ if chat_type == enums.ChatType.PRIVATE:
+ await query.message.reply_to_message.delete()
+ await query.message.delete()
+
+ elif chat_type in [enums.ChatType.GROUP, enums.ChatType.SUPERGROUP]:
+ grp_id = query.message.chat.id
+ st = await client.get_chat_member(grp_id, userid)
+ if (st.status == enums.ChatMemberStatus.OWNER) or (str(userid) in ADMINS):
+ await query.message.delete()
+ try:
+ await query.message.reply_to_message.delete()
+ except:
+ pass
+ else:
+ await query.answer(script.ALRT_TXT.format(query.from_user.first_name), show_alert=True)
+ elif "groupcb" in query.data:
+ await query.answer()
+
+ group_id = query.data.split(":")[1]
+
+ act = query.data.split(":")[2]
+ hr = await client.get_chat(int(group_id))
+ title = hr.title
+ user_id = query.from_user.id
+
+ if act == "":
+ stat = "CONNECT"
+ cb = "connectcb"
+ else:
+ stat = "DISCONNECT"
+ cb = "disconnect"
+
+ keyboard = InlineKeyboardMarkup([
+ [InlineKeyboardButton(f"{stat}", callback_data=f"{cb}:{group_id}"),
+ InlineKeyboardButton("DELETE", callback_data=f"deletecb:{group_id}")],
+ [InlineKeyboardButton("BACK", callback_data="backcb")]
+ ])
+
+ await query.message.edit_text(
+ f"Group Name : **{title}**\nGroup ID : `{group_id}`",
+ reply_markup=keyboard,
+ parse_mode=enums.ParseMode.MARKDOWN
+ )
+ return await query.answer(MSG_ALRT)
+ elif "connectcb" in query.data:
+ await query.answer()
+
+ group_id = query.data.split(":")[1]
+
+ hr = await client.get_chat(int(group_id))
+
+ title = hr.title
+
+ user_id = query.from_user.id
+
+ mkact = await make_active(str(user_id), str(group_id))
+
+ if mkact:
+ await query.message.edit_text(
+ f"Connected to **{title}**",
+ parse_mode=enums.ParseMode.MARKDOWN
+ )
+ else:
+ await query.message.edit_text('Some error occurred!!', parse_mode=enums.ParseMode.MARKDOWN)
+ return await query.answer(MSG_ALRT)
+ elif "disconnect" in query.data:
+ await query.answer()
+
+ group_id = query.data.split(":")[1]
+
+ hr = await client.get_chat(int(group_id))
+
+ title = hr.title
+ user_id = query.from_user.id
+
+ mkinact = await make_inactive(str(user_id))
+
+ if mkinact:
+ await query.message.edit_text(
+ f"Disconnected from **{title}**",
+ parse_mode=enums.ParseMode.MARKDOWN
+ )
+ else:
+ await query.message.edit_text(
+ f"Some error occurred!!",
+ parse_mode=enums.ParseMode.MARKDOWN
+ )
+ return await query.answer(MSG_ALRT)
+ elif "deletecb" in query.data:
+ await query.answer()
+
+ user_id = query.from_user.id
+ group_id = query.data.split(":")[1]
+
+ delcon = await delete_connection(str(user_id), str(group_id))
+
+ if delcon:
+ await query.message.edit_text(
+ "Successfully deleted connection"
+ )
+ else:
+ await query.message.edit_text(
+ f"Some error occurred!!",
+ parse_mode=enums.ParseMode.MARKDOWN
+ )
+ return await query.answer(MSG_ALRT)
+ elif query.data == "backcb":
+ await query.answer()
+
+ userid = query.from_user.id
+
+ groupids = await all_connections(str(userid))
+ if groupids is None:
+ await query.message.edit_text(
+ "There are no active connections!! Connect to some groups first.",
+ )
+ return await query.answer(MSG_ALRT)
+ buttons = []
+ for groupid in groupids:
+ try:
+ ttl = await client.get_chat(int(groupid))
+ title = ttl.title
+ active = await if_active(str(userid), str(groupid))
+ act = " - ACTIVE" if active else ""
+ buttons.append(
+ [
+ InlineKeyboardButton(
+ text=f"{title}{act}", callback_data=f"groupcb:{groupid}:{act}"
+ )
+ ]
+ )
+ except:
+ pass
+ if buttons:
+ await query.message.edit_text(
+ "Your connected group details ;\n\n",
+ reply_markup=InlineKeyboardMarkup(buttons)
+ )
+ elif "gfilteralert" in query.data:
+ grp_id = query.message.chat.id
+ i = query.data.split(":")[1]
+ keyword = query.data.split(":")[2]
+ reply_text, btn, alerts, fileid = await find_gfilter('gfilters', keyword)
+ if alerts is not None:
+ alerts = ast.literal_eval(alerts)
+ alert = alerts[int(i)]
+ alert = alert.replace("\\n", "\n").replace("\\t", "\t")
+ await query.answer(alert, show_alert=True)
+ elif "alertmessage" in query.data:
+ grp_id = query.message.chat.id
+ i = query.data.split(":")[1]
+ keyword = query.data.split(":")[2]
+ reply_text, btn, alerts, fileid = await find_filter(grp_id, keyword)
+ if alerts is not None:
+ alerts = ast.literal_eval(alerts)
+ alert = alerts[int(i)]
+ alert = alert.replace("\\n", "\n").replace("\\t", "\t")
+ await query.answer(alert, show_alert=True)
+ if query.data.startswith("file"):
+ ident, file_id = query.data.split("#")
+ clicked = query.from_user.id # fetching the ID of the user who clicked the button
+ try:
+ typed = query.message.reply_to_message.from_user.id # fetching user ID of the user who sent the movie request
+ except:
+ typed = clicked # if failed, uses the clicked user's ID as requested user ID
+ files_ = await get_file_details(file_id)
+ if not files_:
+ return await query.answer('No such file exist.')
+ files = files_[0]
+ title = files.file_name
+ size = get_size(files.file_size)
+ f_caption = files.caption
+ settings = await get_settings(query.message.chat.id)
+ if CUSTOM_FILE_CAPTION:
+ try:
+ f_caption = CUSTOM_FILE_CAPTION.format(file_name='' if title is None else title,
+ file_size='' if size is None else size,
+ file_caption='' if f_caption is None else f_caption)
+ except Exception as e:
+ logger.exception(e)
+ f_caption = f_caption
+ if f_caption is None:
+ f_caption = f"{files.file_name}"
+
+ try:
+ if (AUTH_CHANNEL or REQ_CHANNEL) and not await is_subscribed(client, query):
+ if clicked == typed:
+ await query.answer(url=f"https://t.me/{temp.U_NAME}?start={ident}_{file_id}")
+ return
+ else:
+ await query.answer(
+ f"Hᴇʏ {query.from_user.first_name}, Tʜɪs Is Nᴏᴛ Yᴏᴜʀ Mᴏᴠɪᴇ Rᴇǫᴜᴇsᴛ. Rᴇǫᴜᴇsᴛ Yᴏᴜʀ's !",
+ show_alert=True)
+ elif settings['botpm']:
+ if clicked == typed:
+ await query.answer(url=f"https://t.me/{temp.U_NAME}?start={ident}_{file_id}")
+ return
+ else:
+ await query.answer(
+ f"Hᴇʏ {query.from_user.first_name}, Tʜɪs Is Nᴏᴛ Yᴏᴜʀ Mᴏᴠɪᴇ Rᴇǫᴜᴇsᴛ. Rᴇǫᴜᴇsᴛ Yᴏᴜʀ's !",
+ show_alert=True)
+ else:
+ if clicked == typed:
+ file_send = await client.send_cached_media(
+ chat_id=FILE_CHANNEL,
+ file_id=file_id,
+ caption=script.CHANNEL_CAP.format(query.from_user.mention, title, query.message.chat.title),
+ protect_content=True if ident == "filep" else False,
+ reply_markup=InlineKeyboardMarkup(
+ [
+ [
+ InlineKeyboardButton(f'🇮🇳 Mᴀʟ', 'fmal'),
+ InlineKeyboardButton(f'🇮🇳 Tᴀᴍ', 'ftam'),
+ InlineKeyboardButton(f'🇮🇳 Hɪɴ', 'fhin')
+ ], [
+ InlineKeyboardButton("📍 ᴄʜᴀɴɴᴇʟ 📍", url=(MAIN_CHANNEL))
+ ]
+ ]
+ )
+ )
+ Joel_tgx = await query.message.reply_text(
+ script.FILE_MSG.format(query.from_user.mention, title, size),
+ parse_mode=enums.ParseMode.HTML,
+ reply_markup=InlineKeyboardMarkup(
+ [
+ [
+ InlineKeyboardButton('📥 𝖣𝗈𝗐𝗇𝗅𝗈𝖺𝖽 𝖫𝗂𝗇𝗄 📥 ', url=file_send.link)
+ ], [
+ InlineKeyboardButton("⚠️ 𝖢𝖺𝗇'𝗍 𝖠𝖼𝖼𝖾𝗌𝗌 ❓ 𝖢𝗅𝗂𝖼𝗄 𝖧𝖾𝗋𝖾 ⚠️", url=(FILE_FORWARD))
+ ]
+ ]
+ )
+ )
+ if settings['auto_delete']:
+ await asyncio.sleep(600)
+ await Joel_tgx.delete()
+ await file_send.delete()
+ else:
+ await query.answer(
+ f"Hᴇʏ {query.from_user.first_name}, Tʜɪs Is Nᴏᴛ Yᴏᴜʀ Mᴏᴠɪᴇ Rᴇǫᴜᴇsᴛ. Rᴇǫᴜᴇsᴛ Yᴏᴜʀ's !",
+ show_alert=True)
+ await query.answer('Cʜᴇᴄᴋ PM, I ʜᴀᴠᴇ sᴇɴᴛ ғɪʟᴇs ɪɴ PM', show_alert=True)
+ except UserIsBlocked:
+ await query.answer('𝐔𝐧𝐛𝐥𝐨𝐜𝐤 𝐭𝐡𝐞 𝐛𝐨𝐭 𝐦𝐚𝐡𝐧 !', show_alert=True)
+ except PeerIdInvalid:
+ await query.answer(url=f"https://t.me/{temp.U_NAME}?start={ident}_{file_id}")
+ except Exception as e:
+ await query.answer(url=f"https://t.me/{temp.U_NAME}?start={ident}_{file_id}")
+ elif query.data.startswith("checksub"):
+ if (AUTH_CHANNEL or REQ_CHANNEL) and not await is_subscribed(client, query):
+ await query.answer(
+ "𝑰 𝑳𝒊𝒌𝒆 𝒀𝒐𝒖𝒓 𝑺𝒎𝒂𝒓𝒕𝒏𝒆𝒔𝒔, 𝑩𝒖𝒕 𝑫𝒐𝒏'𝒕 𝑩𝒆 𝑶𝒗𝒆𝒓𝒔𝒎𝒂𝒓𝒕 😒\n@𝒄𝒊𝒏𝒆𝒎𝒂𝒍𝒂.𝒄𝒐𝒎", show_alert=True)
+ return
+ ident, file_id = query.data.split("#")
+ files_ = await get_file_details(file_id)
+ if not files_:
+ return await query.answer('No such file exist.')
+ files = files_[0]
+ title = files.file_name
+ size = get_size(files.file_size)
+ f_caption = files.caption
+ if CUSTOM_FILE_CAPTION:
+ try:
+ f_caption = CUSTOM_FILE_CAPTION.format(file_name='' if title is None else title,
+ file_size='' if size is None else size,
+ file_caption='' if f_caption is None else f_caption)
+ except Exception as e:
+ logger.exception(e)
+ f_caption = f_caption
+ if f_caption is None:
+ f_caption = f"{title}"
+ await query.answer()
+ await client.send_cached_media(
+ chat_id=query.from_user.id,
+ file_id=file_id,
+ caption=f_caption,
+ protect_content=True if ident == 'checksubp' else False
+ )
+ elif query.data == "predvd":
+ k = await client.send_message(chat_id=query.message.chat.id, text="Deleting PreDVDs... Please wait...")
+ files, next_offset, total = await get_bad_files(
+ 'predvd',
+ offset=0)
+ deleted = 0
+ for file in files:
+ file_ids = file.file_id
+ result = await Media.collection.delete_one({
+ '_id': file_ids,
+ })
+ if result.deleted_count:
+ logger.info('PreDVD File Found ! Successfully deleted from database.')
+ deleted += 1
+ deleted = str(deleted)
+ await k.edit_text(text=f"Successfully deleted {deleted} PreDVD files.")
+
+ elif query.data == "camrip":
+ k = await client.send_message(chat_id=query.message.chat.id, text="Deleting CamRips... Please wait...")
+ files, next_offset, total = await get_bad_files(
+ 'camrip',
+ offset=0)
+ deleted = 0
+ for file in files:
+ file_ids = file.file_id
+ result = await Media.collection.delete_one({
+ '_id': file_ids,
+ })
+ if result.deleted_count:
+ logger.info('CamRip File Found ! Successfully deleted from database.')
+ deleted += 1
+ deleted = str(deleted)
+ await k.edit_text(text=f"Successfully deleted {deleted} CamRip files.")
+
+ elif query.data == "pages":
+ await query.answer()
+
+ elif query.data.startswith("send_fall"):
+ temp_var, ident, key, offset = query.data.split("#")
+ search = BUTTONS.get(key)
+ if not search:
+ await query.answer(script.OLD_ALRT_TXT.format(query.from_user.first_name), show_alert=True)
+ return
+ files, n_offset, total = await get_search_results(search, offset=int(offset), filter=True)
+ await send_all(client, query.from_user.id, files, ident)
+ await query.answer(
+ f"Hey {query.from_user.first_name}, All files on this page has been sent successfully to your PM !",
+ show_alert=True)
+
+ elif query.data == "reqinfo":
+ await query.answer(
+ "⚠ ɪɴꜰᴏʀᴍᴀᴛɪᴏɴ ⚠\n\nᴀꜰᴛᴇʀ 10 ᴍɪɴᴜᴛᴇꜱ ᴛʜɪꜱ ᴍᴇꜱꜱᴀɢᴇ ᴡɪʟʟ ʙᴇ ᴀᴜᴛᴏᴍᴀᴛɪᴄᴀʟʟʏ ᴅᴇʟᴇᴛᴇᴅ\n\nɪꜰ ʏᴏᴜ ᴅᴏ ɴᴏᴛ ꜱᴇᴇ ᴛʜᴇ ʀᴇǫᴜᴇsᴛᴇᴅ ᴍᴏᴠɪᴇ / sᴇʀɪᴇs ꜰɪʟᴇ, ʟᴏᴏᴋ ᴀᴛ ᴛʜᴇ ɴᴇxᴛ ᴘᴀɢᴇ\n\n❣ ᴘᴏᴡᴇʀᴇᴅ ʙʏ ᴄɪɴᴇᴍᴀʟᴀ.ᴄᴏᴍ",
+ show_alert=True)
+
+ elif query.data == "minfo":
+ await query.answer(
+ "⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯\nᴍᴏᴠɪᴇ ʀᴇǫᴜᴇꜱᴛ ꜰᴏʀᴍᴀᴛ\n⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯\n\nɢᴏ ᴛᴏ ɢᴏᴏɢʟᴇ ➠ ᴛʏᴘᴇ ᴍᴏᴠɪᴇ ɴᴀᴍᴇ ➠ ᴄᴏᴘʏ ᴄᴏʀʀᴇᴄᴛ ɴᴀᴍᴇ ➠ ᴘᴀꜱᴛᴇ ᴛʜɪꜱ ɢʀᴏᴜᴘ\n\nᴇxᴀᴍᴘʟᴇ : ᴀᴠᴀᴛᴀʀ: ᴛʜᴇ ᴡᴀʏ ᴏғ ᴡᴀᴛᴇʀ\n\n🚯 ᴅᴏɴᴛ ᴜꜱᴇ ➠ ':(!,./)\n\n©️ ᴄɪɴᴇᴍᴀʟᴀ.ᴄᴏᴍ",
+ show_alert=True)
+
+ elif query.data == "sinfo":
+ await query.answer(
+ "⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯\nꜱᴇʀɪᴇꜱ ʀᴇǫᴜᴇꜱᴛ ꜰᴏʀᴍᴀᴛ\n⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯\n\nɢᴏ ᴛᴏ ɢᴏᴏɢʟᴇ ➠ ᴛʏᴘᴇ ᴍᴏᴠɪᴇ ɴᴀᴍᴇ ➠ ᴄᴏᴘʏ ᴄᴏʀʀᴇᴄᴛ ɴᴀᴍᴇ ➠ ᴘᴀꜱᴛᴇ ᴛʜɪꜱ ɢʀᴏᴜᴘ\n\nᴇxᴀᴍᴘʟᴇ : ᴍᴏɴᴇʏ ʜᴇɪsᴛ S01E01\n\n🚯 ᴅᴏɴᴛ ᴜꜱᴇ ➠ ':(!,./)\n\n©️ ᴄɪɴᴇᴍᴀʟᴀ.ᴄᴏᴍ",
+ show_alert=True)
+
+ elif query.data == "tinfo":
+ await query.answer(
+ "▣ ᴛɪᴘs ▣\n\n★ ᴛʏᴘᴇ ᴄᴏʀʀᴇᴄᴛ sᴘᴇʟʟɪɴɢ (ɢᴏᴏɢʟᴇ)\n\n★ ɪғ ʏᴏᴜ ɴᴏᴛ ɢᴇᴛ ʏᴏᴜʀ ғɪʟᴇ ɪɴ ᴛʜᴇ ʙᴜᴛᴛᴏɴ ᴛʜᴇɴ ᴛʜᴇ ɴᴇxᴛ sᴛᴇᴘ ɪs ᴄʟɪᴄᴋ ɴᴇxᴛ ʙᴜᴛᴛᴏɴ.\n\n★ ᴄᴏɴᴛɪɴᴜᴇ ᴛʜɪs ᴍᴇᴛʜᴏᴅ ᴛᴏ ɢᴇᴛᴛɪɴɢ ʏᴏᴜ ғɪʟᴇ\n\n❣ ᴘᴏᴡᴇʀᴇᴅ ʙʏ ᴄɪɴᴇᴍᴀʟᴀ. ᴄᴏᴍ",
+ show_alert=True)
+
+ elif query.data == "fmal":
+ await query.answer(
+ "കോപ്പിറൈറ്റ് ഉള്ളതുകൊണ്ട് ഫയൽ 10 മിനിറ്റിനുള്ളിൽ ഇവിടെനിന്നും ഡിലീറ്റ് ആകുന്നതാണ് അതുകൊണ്ട് ഇവിടെ നിന്നും മറ്റെവിടെക്കെങ്കിലും മാറ്റിയതിന് ശേഷം ഡൗൺലോഡ് ചെയ്യുക!",
+ show_alert=True)
+
+ elif query.data == "ftam":
+ await query.answer(
+ "பதிப்புரிமை காரணமாக, கோப்பு இங்கிருந்து 10 நிமிடங்களில் நீக்கப்படும், எனவே இங்கிருந்து வேறு எங்காவது நகர்த்தப்பட்ட பிறகு பதிவிறக்கவும்!",
+ show_alert=True)
+
+ elif query.data == "fhin":
+ await query.answer(
+ "कॉपीराइट के कारण फ़ाइल यहां से 10 मिनट में डिलीट हो जाएगी इसलिए यहां से कहीं और ले जाकर डाउनलोड करें!",
+ show_alert=True)
+
+ elif query.data == "whyjoin":
+ await query.answer(
+ "⚠ ɪɴꜰᴏʀᴍᴀᴛɪᴏɴ ⚠\nIғ ᴛʜᴇ ɢʀᴏᴜᴘ ᴄᴏᴘʏ ʀɪɢʜᴛ ɪꜱ ʟᴏꜱᴛ , ᴡʜᴇɴ ᴀ ɴᴇᴡ ɢʀᴏᴜᴘ ɪꜱ ꜱᴛᴀʀᴛᴇᴅ, ɪᴛ ᴡɪʟʟ ʙᴇ ɴᴏᴛɪғɪᴇᴅ ᴏɴ ᴛʜɪꜱ ᴄʜᴀɴɴᴇʟ🤥",
+ show_alert=True)
+
+ elif query.data == "surprise":
+ btn = [[
+ InlineKeyboardButton('sᴜʀᴘʀɪsᴇ', callback_data='start')
+ ]]
+ reply_markup = InlineKeyboardMarkup(btn)
+ await client.edit_message_media(
+ query.message.chat.id,
+ query.message.id,
+ InputMediaPhoto(random.choice(PICS))
+ )
+ await query.message.edit_text(
+ text=script.SUR_TXT.format(query.from_user.mention, temp.U_NAME, temp.B_NAME),
+ reply_markup=reply_markup,
+ parse_mode=enums.ParseMode.HTML
+ )
+
+ elif query.data == "start":
+ buttons = [[
+ InlineKeyboardButton('× ᴀᴅᴅ ᴍᴇ ᴛᴏ ʏᴏᴜʀ ɢʀᴏᴜᴘs ×', url=f'http://t.me/{temp.U_NAME}?startgroup=true')
+ ], [
+ InlineKeyboardButton('🔍 sᴇᴀʀᴄʜ', switch_inline_query_current_chat=''),
+ InlineKeyboardButton('ᴏᴡɴ ɪɴғᴏ', url='https://t.me/+ipDgG7Qfrps1ZTJl')
+ ], [
+ InlineKeyboardButton('ʜᴇʟᴘ', callback_data='help'),
+ InlineKeyboardButton('ᴀʙᴏᴜᴛ', callback_data='about')
+ ], [
+ InlineKeyboardButton('ʙᴀᴄᴋ ᴛᴏ sᴛᴀʀᴛ', callback_data='surprise')
+ ]]
+ reply_markup = InlineKeyboardMarkup(buttons)
+ await client.edit_message_media(
+ query.message.chat.id,
+ query.message.id,
+ InputMediaPhoto(random.choice(PICS))
+ )
+ await query.message.edit_text(
+ text=script.START_TXT.format(query.from_user.mention, temp.U_NAME, temp.B_NAME),
+ reply_markup=reply_markup,
+ parse_mode=enums.ParseMode.HTML
+ )
+ await query.answer(MSG_ALRT)
+ elif query.data == "help":
+ buttons = [[
+ InlineKeyboardButton('ᴍᴀɴᴜᴀʟ', callback_data='manuelfilter'),
+ InlineKeyboardButton('ᴀᴜᴛᴏ', callback_data='autofilter'),
+ InlineKeyboardButton('ᴄᴏɴɴᴇᴄᴛ', callback_data='coct')
+ ], [
+ InlineKeyboardButton('ᴇxᴛʀᴀ', callback_data='extra'),
+ InlineKeyboardButton('sᴏɴɢ', callback_data='song'),
+ InlineKeyboardButton('ᴛᴛs', callback_data='tts')
+ ], [
+ InlineKeyboardButton('ᴠɪᴅᴇᴏ', callback_data='video'),
+ InlineKeyboardButton('ᴛɢʀᴀᴘʜ', callback_data='tele'),
+ InlineKeyboardButton('ɴᴇxᴛ', callback_data='aswin')
+ ], [
+ InlineKeyboardButton('ʙᴀᴄᴋ', callback_data='start')
+ ]]
+ reply_markup = InlineKeyboardMarkup(buttons)
+ await client.edit_message_media(
+ query.message.chat.id,
+ query.message.id,
+ InputMediaPhoto(random.choice(PICS))
+ )
+ await query.message.edit_text(
+ text="▣ ▢ ▢"
+ )
+ await query.message.edit_text(
+ text="▣ ▣ ▢"
+ )
+ await query.message.edit_text(
+ text="▣ ▣ ▣"
+ )
+ await query.message.edit_text(
+ text=script.HELP_TXT.format(query.from_user.mention),
+ reply_markup=reply_markup,
+ parse_mode=enums.ParseMode.HTML
+ )
+ elif query.data == "aswin":
+ buttons = [[
+ InlineKeyboardButton('ᴀᴜᴅʙᴏᴏᴋ', callback_data='abook'),
+ InlineKeyboardButton('ᴄᴏᴠɪᴅ', callback_data='corona'),
+ InlineKeyboardButton('ɢᴀᴍᴇs', callback_data='fun')
+ ], [
+ InlineKeyboardButton('ᴘɪɴɢ', callback_data='pings'),
+ InlineKeyboardButton('ᴊsᴏɴᴇ', callback_data='json'),
+ InlineKeyboardButton('sᴛɪᴄᴋɪᴅ', callback_data='sticker')
+ ], [
+ InlineKeyboardButton('ᴡʜᴏɪs', callback_data='whois'),
+ InlineKeyboardButton('ᴜʀʟsʜᴏʀᴛ', callback_data='urlshort'),
+ InlineKeyboardButton('ɴᴇxᴛ', callback_data='aswins')
+ ], [
+ InlineKeyboardButton('ʙᴀᴄᴋ', callback_data='help')
+ ]]
+ reply_markup = InlineKeyboardMarkup(buttons)
+ await client.edit_message_media(
+ query.message.chat.id,
+ query.message.id,
+ InputMediaPhoto(random.choice(PICS))
+ )
+ await query.message.edit_text(
+ text="▣ ▢ ▢"
+ )
+ await query.message.edit_text(
+ text="▣ ▣ ▢"
+ )
+ await query.message.edit_text(
+ text="▣ ▣ ▣"
+ )
+ await query.message.edit_text(
+ text=script.HELP_TXT.format(query.from_user.mention),
+ reply_markup=reply_markup,
+ parse_mode=enums.ParseMode.HTML
+ )
+ elif query.data == "aswins":
+ buttons = [[
+ InlineKeyboardButton('ғᴏɴᴛ', callback_data='font'),
+ InlineKeyboardButton('ɢᴛʀᴀɴs', callback_data='gtrans'),
+ InlineKeyboardButton('ᴄᴀʀʙᴏɴ', callback_data='carb'),
+ ], [
+ InlineKeyboardButton('ᴄᴏᴜɴᴛʀʏ', callback_data='country'),
+ InlineKeyboardButton('ᴏᴘᴇɴᴀɪ', callback_data='opnai'),
+ InlineKeyboardButton('ʜᴏᴍᴇ', callback_data='start')
+ ], [
+ InlineKeyboardButton('ʙᴀᴄᴋ', callback_data='aswin')
+ ]]
+ reply_markup = InlineKeyboardMarkup(buttons)
+ await client.edit_message_media(
+ query.message.chat.id,
+ query.message.id,
+ InputMediaPhoto(random.choice(PICS))
+ )
+ await query.message.edit_text(
+ text="▣ ▢ ▢"
+ )
+ await query.message.edit_text(
+ text="▣ ▣ ▢"
+ )
+ await query.message.edit_text(
+ text="▣ ▣ ▣"
+ )
+ await query.message.edit_text(
+ text=script.HELP_TXT.format(query.from_user.mention),
+ reply_markup=reply_markup,
+ parse_mode=enums.ParseMode.HTML
+ )
+ elif query.data == "about":
+ buttons = [[
+ InlineKeyboardButton('sᴛᴀᴛᴜs', callback_data='stats'),
+ InlineKeyboardButton('sᴏᴜʀᴄᴇ', callback_data='source')
+ ], [
+ InlineKeyboardButton('ʜᴏᴍᴇ', callback_data='start'),
+ InlineKeyboardButton('ᴅɪꜱᴄʟᴀɪᴍᴇʀ', callback_data='disc')
+ ], [
+ InlineKeyboardButton('ᴄʟᴏsᴇ', callback_data='close_data')
+ ]]
+ reply_markup = InlineKeyboardMarkup(buttons)
+ await client.edit_message_media(
+ query.message.chat.id,
+ query.message.id,
+ InputMediaPhoto(random.choice(PICS))
+ )
+ await query.message.edit_text(
+ text=script.ABOUT_TXT.format(temp.B_NAME),
+ reply_markup=reply_markup,
+ parse_mode=enums.ParseMode.HTML
+ )
+ elif query.data == "disc":
+ buttons = [[
+ InlineKeyboardButton('ʙᴀᴄᴋ', callback_data='about')
+ ]]
+ reply_markup = InlineKeyboardMarkup(buttons)
+ await query.message.edit_text(
+ text=script.DISC_TXT,
+ reply_markup=reply_markup,
+ parse_mode=enums.ParseMode.HTML
+ )
+ elif query.data == "source":
+ buttons = [[
+ InlineKeyboardButton('ʀᴇᴘᴏ', url='https://github.com/Devil-Botz/Elsa'),
+ InlineKeyboardButton('ʙᴀᴄᴋ', callback_data='about')
+ ]]
+ reply_markup = InlineKeyboardMarkup(buttons)
+ await query.message.edit_text(
+ text=script.SOURCE_TXT,
+ reply_markup=reply_markup,
+ parse_mode=enums.ParseMode.HTML
+ )
+ elif query.data == "manuelfilter":
+ buttons = [[
+ InlineKeyboardButton('ʙᴀᴄᴋ', callback_data='help'),
+ InlineKeyboardButton('ʙᴜᴛᴛᴏɴs', callback_data='button')
+ ]]
+ reply_markup = InlineKeyboardMarkup(buttons)
+ await query.message.edit_text(
+ text=script.MANUELFILTER_TXT,
+ reply_markup=reply_markup,
+ parse_mode=enums.ParseMode.HTML
+ )
+ elif query.data == "button":
+ buttons = [[
+ InlineKeyboardButton('ʙᴀᴄᴋ', callback_data='manuelfilter')
+ ]]
+ reply_markup = InlineKeyboardMarkup(buttons)
+ await query.message.edit_text(
+ text=script.BUTTON_TXT,
+ reply_markup=reply_markup,
+ parse_mode=enums.ParseMode.HTML
+ )
+ elif query.data == "autofilter":
+ buttons = [[
+ InlineKeyboardButton('ʙᴀᴄᴋ', callback_data='help')
+ ]]
+ reply_markup = InlineKeyboardMarkup(buttons)
+ await query.message.edit_text(
+ text=script.AUTOFILTER_TXT,
+ reply_markup=reply_markup,
+ parse_mode=enums.ParseMode.HTML
+ )
+ elif query.data == "coct":
+ buttons = [[
+ InlineKeyboardButton('ʙᴀᴄᴋ', callback_data='help')
+ ]]
+ reply_markup = InlineKeyboardMarkup(buttons)
+ await query.message.edit_text(
+ text=script.CONNECTION_TXT,
+ reply_markup=reply_markup,
+ parse_mode=enums.ParseMode.HTML
+ )
+ elif query.data == "extra":
+ buttons = [[
+ InlineKeyboardButton('ʙᴀᴄᴋ', callback_data='help'),
+ InlineKeyboardButton('ᴀᴅᴍɪɴ', callback_data='admin')
+ ]]
+ reply_markup = InlineKeyboardMarkup(buttons)
+ await query.message.edit_text(
+ text=script.EXTRAMOD_TXT,
+ reply_markup=reply_markup,
+ parse_mode=enums.ParseMode.HTML
+ )
+ elif query.data == "admin":
+ buttons = [[
+ InlineKeyboardButton('ʙᴀᴄᴋ', callback_data='extra')
+ ]]
+ reply_markup = InlineKeyboardMarkup(buttons)
+ await query.message.edit_text(
+ text=script.ADMIN_TXT,
+ reply_markup=reply_markup,
+ parse_mode=enums.ParseMode.HTML
+ )
+ elif query.data == "song":
+ buttons = [[
+ InlineKeyboardButton('ʙᴀᴄᴋ', callback_data='help')
+ ]]
+ reply_markup = InlineKeyboardMarkup(buttons)
+ await query.message.edit_text(
+ text=script.SONG_TXT,
+ reply_markup=reply_markup,
+ parse_mode=enums.ParseMode.HTML
+ )
+ elif query.data == "video":
+ buttons = [[
+ InlineKeyboardButton('ʙᴀᴄᴋ', callback_data='help')
+ ]]
+ reply_markup = InlineKeyboardMarkup(buttons)
+ await query.message.edit_text(
+ text=script.VIDEO_TXT,
+ reply_markup=reply_markup,
+ parse_mode=enums.ParseMode.HTML
+ )
+ elif query.data == "tts":
+ buttons = [[
+ InlineKeyboardButton('ʙᴀᴄᴋ', callback_data='help')
+ ]]
+ reply_markup = InlineKeyboardMarkup(buttons)
+ await query.message.edit_text(
+ text=script.TTS_TXT,
+ reply_markup=reply_markup,
+ parse_mode=enums.ParseMode.HTML
+ )
+ elif query.data == "gtrans":
+ buttons = [[
+ InlineKeyboardButton('ʙᴀᴄᴋ', callback_data='aswins'),
+ InlineKeyboardButton('𝙻𝙰𝙽𝙶 𝙲𝙾𝙳𝙴𝚂', url='https://cloud.google.com/translate/docs/languages')
+ ]]
+ reply_markup = InlineKeyboardMarkup(buttons)
+ await query.message.edit_text(
+ text=script.GTRANS_TXT,
+ disable_web_page_preview=True,
+ reply_markup=reply_markup,
+ parse_mode=enums.ParseMode.HTML
+ )
+ elif query.data == "country":
+ buttons = [[
+ InlineKeyboardButton('ʙᴀᴄᴋ', callback_data='aswins'),
+ ]]
+ reply_markup = InlineKeyboardMarkup(buttons)
+ await query.message.edit_text(
+ text=script.CON_TXT,
+ disable_web_page_preview=True,
+ reply_markup=reply_markup,
+ parse_mode=enums.ParseMode.HTML
+ )
+ elif query.data == "tele":
+ buttons = [[
+ InlineKeyboardButton('ʙᴀᴄᴋ', callback_data='help')
+ ]]
+ reply_markup = InlineKeyboardMarkup(buttons)
+ await query.message.edit_text(
+ text=script.TELE_TXT,
+ reply_markup=reply_markup,
+ parse_mode=enums.ParseMode.HTML
+ )
+ elif query.data == "corona":
+ buttons = [[
+ InlineKeyboardButton('ʙᴀᴄᴋ', callback_data='aswin')
+ ]]
+ reply_markup = InlineKeyboardMarkup(buttons)
+ await query.message.edit_text(
+ text=script.CORONA_TXT,
+ disable_web_page_preview=True,
+ reply_markup=reply_markup,
+ parse_mode=enums.ParseMode.HTML
+ )
+ elif query.data == "abook":
+ buttons = [[
+ InlineKeyboardButton('ʙᴀᴄᴋ', callback_data='aswin')
+ ]]
+ reply_markup = InlineKeyboardMarkup(buttons)
+ await query.message.edit_text(
+ text=script.ABOOK_TXT,
+ disable_web_page_preview=True,
+ reply_markup=reply_markup,
+ parse_mode=enums.ParseMode.HTML
+ )
+ elif query.data == "opnai":
+ buttons = [[
+ InlineKeyboardButton('ʙᴀᴄᴋ', callback_data='aswin')
+ ]]
+ reply_markup = InlineKeyboardMarkup(buttons)
+ await query.message.edit_text(
+ text=script.OPNAI_TXT,
+ reply_markup=reply_markup,
+ parse_mode=enums.ParseMode.HTML
+ )
+ elif query.data == "sticker":
+ buttons = [[
+ InlineKeyboardButton('ʙᴀᴄᴋ', callback_data='aswin')
+ ]]
+ reply_markup = InlineKeyboardMarkup(buttons)
+ await query.message.edit_text(
+ text=script.STICKER_TXT,
+ disable_web_page_preview=True,
+ reply_markup=reply_markup,
+ parse_mode=enums.ParseMode.HTML
+ )
+ elif query.data == "pings":
+ buttons = [[
+ InlineKeyboardButton('ʙᴀᴄᴋ', callback_data='aswin')
+ ]]
+ reply_markup = InlineKeyboardMarkup(buttons)
+ await query.message.edit_text(
+ text=script.PINGS_TXT,
+ reply_markup=reply_markup,
+ parse_mode=enums.ParseMode.HTML
+ )
+ elif query.data == "json":
+ buttons = [[
+ InlineKeyboardButton('ʙᴀᴄᴋ', callback_data='help')
+ ]]
+ reply_markup = InlineKeyboardMarkup(buttons)
+ await query.message.edit_text(
+ text=script.JSON_TXT,
+ reply_markup=reply_markup,
+ parse_mode=enums.ParseMode.HTML
+ )
+ elif query.data == "urlshort":
+ buttons = [[
+ InlineKeyboardButton('ʙᴀᴄᴋ', callback_data='aswin')
+ ]]
+ reply_markup = InlineKeyboardMarkup(buttons)
+ await query.message.edit_text(
+ text=script.URLSHORT_TXT,
+ disable_web_page_preview=True,
+ reply_markup=reply_markup,
+ parse_mode=enums.ParseMode.HTML
+ )
+ elif query.data == "whois":
+ buttons = [[
+ InlineKeyboardButton('ʙᴀᴄᴋ', callback_data='aswin')
+ ]]
+ reply_markup = InlineKeyboardMarkup(buttons)
+ await query.message.edit_text(
+ text=script.WHOIS_TXT,
+ reply_markup=reply_markup,
+ parse_mode=enums.ParseMode.HTML
+ )
+ elif query.data == "font":
+ buttons = [[
+ InlineKeyboardButton('ʙᴀᴄᴋ', callback_data='aswins')
+ ]]
+ reply_markup = InlineKeyboardMarkup(buttons)
+ await query.message.edit_text(
+ text=script.FONT_TXT,
+ reply_markup=reply_markup,
+ parse_mode=enums.ParseMode.HTML
+ )
+ elif query.data == "carb":
+ buttons = [[
+ InlineKeyboardButton('ʙᴀᴄᴋ', callback_data='aswins')
+ ]]
+ reply_markup = InlineKeyboardMarkup(buttons)
+ await query.message.edit_text(
+ text=script.CARB_TXT,
+ reply_markup=reply_markup,
+ parse_mode=enums.ParseMode.HTML
+ )
+ elif query.data == "fun":
+ buttons = [[
+ InlineKeyboardButton('ʙᴀᴄᴋ', callback_data='aswin')
+ ]]
+ reply_markup = InlineKeyboardMarkup(buttons)
+ await query.message.edit_text(
+ text=script.FUN_TXT,
+ reply_markup=reply_markup,
+ parse_mode=enums.ParseMode.HTML
+ )
+ elif query.data == "stats":
+ buttons = [[
+ InlineKeyboardButton('ʙᴀᴄᴋ', callback_data='start'),
+ InlineKeyboardButton('ʀᴇғʀᴇsʜ', callback_data='rfrsh')
+ ]]
+ await client.edit_message_media(
+ query.message.chat.id,
+ query.message.id,
+ InputMediaPhoto(random.choice(PICS))
+ )
+ reply_markup = InlineKeyboardMarkup(buttons)
+ total = await Media.count_documents()
+ users = await db.total_users_count()
+ chats = await db.total_chat_count()
+ monsize = await db.get_db_size()
+ free = 536870912 - monsize
+ monsize = get_size(monsize)
+ free = get_size(free)
+ await query.message.edit_text(
+ text=script.STATUS_TXT.format(total, users, chats, monsize, free),
+ reply_markup=reply_markup,
+ parse_mode=enums.ParseMode.HTML
+ )
+ elif query.data == "rfrsh":
+ await query.answer("𝙁𝙚𝙩𝙘𝙝𝙞𝙣𝙜 𝙈𝙤𝙣𝙜𝙤𝘿𝙗 𝘿𝙖𝙩𝙖𝘽𝙖𝙨𝙚")
+ buttons = [[
+ InlineKeyboardButton('ʙᴀᴄᴋ', callback_data='stats'),
+ InlineKeyboardButton('ʀᴇғʀᴇsʜ', callback_data='rfrsh')
+ ]]
+ await client.edit_message_media(
+ query.message.chat.id,
+ query.message.id,
+ InputMediaPhoto(random.choice(PICS))
+ )
+ reply_markup = InlineKeyboardMarkup(buttons)
+ total = await Media.count_documents()
+ users = await db.total_users_count()
+ chats = await db.total_chat_count()
+ monsize = await db.get_db_size()
+ free = 536870912 - monsize
+ monsize = get_size(monsize)
+ free = get_size(free)
+ await query.message.edit_text(
+ text=script.STATUS_TXT.format(total, users, chats, monsize, free),
+ reply_markup=reply_markup,
+ parse_mode=enums.ParseMode.HTML
+ )
+ elif query.data.startswith("setgs"):
+ ident, set_type, status, grp_id = query.data.split("#")
+ grpid = await active_connection(str(query.from_user.id))
+
+ if str(grp_id) != str(grpid):
+ await query.message.edit("Your Active Connection Has Been Changed. Go To /settings.")
+ return await query.answer(MSG_ALRT)
+
+ if status == "True":
+ await save_group_settings(grpid, set_type, False)
+ else:
+ await save_group_settings(grpid, set_type, True)
+
+ settings = await get_settings(grpid)
+ try:
+ if settings['auto_delete']:
+ settings = await get_settings(grp_id)
+ except KeyError:
+ await save_group_settings(grp_id, 'auto_delete', True)
+ settings = await get_settings(grp_id)
+
+ if settings is not None:
+ buttons = [
+ [
+ InlineKeyboardButton('Filter Button',
+ callback_data=f'setgs#button#{settings["button"]}#{str(grp_id)}'),
+ InlineKeyboardButton('Single' if settings["button"] else 'Double',
+ callback_data=f'setgs#button#{settings["button"]}#{str(grp_id)}')
+ ],
+ [
+ InlineKeyboardButton('Redirect To', callback_data=f'setgs#botpm#{settings["botpm"]}#{str(grp_id)}'),
+ InlineKeyboardButton('Bot PM' if settings["botpm"] else 'Channel',
+ callback_data=f'setgs#botpm#{settings["botpm"]}#{str(grp_id)}')
+ ],
+ [
+ InlineKeyboardButton('File Secure',
+ callback_data=f'setgs#file_secure#{settings["file_secure"]}#{str(grp_id)}'),
+ InlineKeyboardButton('✅ Yes' if settings["file_secure"] else '❌ No',
+ callback_data=f'setgs#file_secure#{settings["file_secure"]}#{str(grp_id)}')
+ ],
+ [
+ InlineKeyboardButton('IMDB', callback_data=f'setgs#imdb#{settings["imdb"]}#{str(grp_id)}'),
+ InlineKeyboardButton('✅ Yes' if settings["imdb"] else '❌ No',
+ callback_data=f'setgs#imdb#{settings["imdb"]}#{str(grp_id)}')
+ ],
+ [
+ InlineKeyboardButton('Spell Check',
+ callback_data=f'setgs#spell_check#{settings["spell_check"]}#{str(grp_id)}'),
+ InlineKeyboardButton('✅ Yes' if settings["spell_check"] else '❌ No',
+ callback_data=f'setgs#spell_check#{settings["spell_check"]}#{str(grp_id)}')
+ ],
+ [
+ InlineKeyboardButton('Welcome', callback_data=f'setgs#welcome#{settings["welcome"]}#{str(grp_id)}'),
+ InlineKeyboardButton('✅ Yes' if settings["welcome"] else '❌ No',
+ callback_data=f'setgs#welcome#{settings["welcome"]}#{str(grp_id)}')
+ ],
+ [
+ InlineKeyboardButton('Auto Delete',
+ callback_data=f'setgs#auto_delete#{settings["auto_delete"]}#{str(grp_id)}'),
+ InlineKeyboardButton('10 Mins' if settings["auto_delete"] else 'OFF',
+ callback_data=f'setgs#auto_delete#{settings["auto_delete"]}#{str(grp_id)}')
+ ],
+ [
+ InlineKeyboardButton('ShortLink',
+ callback_data=f'setgs#is_shortlink#{settings["is_shortlink"]}#{str(grp_id)}'),
+ InlineKeyboardButton('✅ ON' if settings["is_shortlink"] else '❌ OFF',
+ callback_data=f'setgs#is_shortlink#{settings["is_shortlink"]}#{str(grp_id)}')
+ ],
+ [
+ InlineKeyboardButton("Close", callback_data="close_data")
+ ]
+
+ ]
+ reply_markup = InlineKeyboardMarkup(buttons)
+ await query.message.edit_reply_markup(reply_markup)
+ await query.answer(MSG_ALRT)
+
+
+async def auto_filter(client, msg, spoll=False):
+ reqstr1 = msg.from_user.id if msg.from_user else 0
+ reqstr = await client.get_users(reqstr1)
+ if not spoll:
+ message = msg
+ settings = await get_settings(message.chat.id)
+ if message.text.startswith("/"): return # ignore commands
+ if re.findall("((^\/|^,|^!|^\.|^[\U0001F600-\U000E007F]).*)", message.text):
+ return
+ if len(message.text) < 100:
+ search = message.text
+ files, offset, total_results = await get_search_results(search.lower(), offset=0, filter=True)
+ if not files:
+ if settings["spell_check"]:
+ return await advantage_spell_chok(client, msg)
+ else:
+ await client.send_message(chat_id=LOG_CHANNEL,
+ text=(script.NORSLTS.format(reqstr.id, reqstr.mention, search)))
+ return
+ else:
+ return
+ else:
+ message = msg.message.reply_to_message # msg will be callback query
+ search, files, offset, total_results = spoll
+ settings = await get_settings(message.chat.id)
+ if 'is_shortlink' in settings.keys():
+ ENABLE_SHORTLINK = settings['is_shortlink']
+ else:
+ await save_group_settings(message.chat.id, 'is_shortlink', False)
+ ENABLE_SHORTLINK = False
+ pre = 'filep' if settings['file_secure'] else 'file'
+ if ENABLE_SHORTLINK == True:
+ if settings["button"]:
+ btn = [
+ [
+ InlineKeyboardButton(
+ text=f"[{get_size(file.file_size)}] {file.file_name}", url=await get_shortlink(message.chat.id,
+ f"https://telegram.me/{temp.U_NAME}?start=files_{file.file_id}")
+ ),
+ ]
+ for file in files
+ ]
+ else:
+ btn = [
+ [
+ InlineKeyboardButton(
+ text=f"{file.file_name}",
+ url=await get_shortlink(message.chat.id,
+ f"https://telegram.me/{temp.U_NAME}?start=files_{file.file_id}")
+ ),
+ InlineKeyboardButton(
+ text=f"{get_size(file.file_size)}",
+ url=await get_shortlink(message.chat.id,
+ f"https://telegram.me/{temp.U_NAME}?start=files_{file.file_id}")
+ ),
+ ]
+ for file in files
+ ]
+ else:
+ if settings["button"]:
+ btn = [
+ [
+ InlineKeyboardButton(
+ text=f"[{get_size(file.file_size)}] {file.file_name}", callback_data=f'{pre}#{file.file_id}'
+ ),
+ ]
+ for file in files
+ ]
+ else:
+ btn = [
+ [
+ InlineKeyboardButton(
+ text=f"{file.file_name}",
+ callback_data=f'{pre}#{file.file_id}',
+ ),
+ InlineKeyboardButton(
+ text=f"{get_size(file.file_size)}",
+ callback_data=f'{pre}#{file.file_id}',
+ ),
+ ]
+ for file in files
+ ]
+
+ key = f"{message.chat.id}-{message.id}"
+ btn.insert(0,
+ [
+ InlineKeyboardButton(f' ♀️ {search} ♀️ ', 'qinfo')
+ ]
+ )
+ btn.insert(1,
+ [
+ InlineKeyboardButton("Send All !",
+ callback_data=f"send_fall#{pre}#{message.chat.id}-{message.id}#{0}"),
+ InlineKeyboardButton("ʟᴀɴɢᴜᴀɢᴇs", callback_data=f"languages#{search.replace(' ', '_')}#{key}")
+ ]
+ )
+ btn.insert(2,
+ [
+ InlineKeyboardButton(f'ɪɴꜰᴏ', 'reqinfo'),
+ InlineKeyboardButton(f'ᴍᴏᴠɪᴇ', 'minfo'),
+ InlineKeyboardButton(f'sᴇʀɪᴇs', 'sinfo'),
+ InlineKeyboardButton(f'ᴛɪᴘs', 'tinfo')
+ ]
+ )
+
+ if offset != "":
+ key = f"{message.chat.id}-{message.id}"
+ BUTTONS[key] = search
+ req = message.from_user.id if message.from_user else 0
+ btn.append(
+ [InlineKeyboardButton(text=f"𝐏𝐀𝐆𝐄 1/{math.ceil(int(total_results) / 7)}", callback_data="pages"),
+ InlineKeyboardButton(text="𝐍𝐄𝐗𝐓 ⌦", callback_data=f"next_{req}_{key}_{offset}")]
+ )
+ else:
+ btn.append(
+ [InlineKeyboardButton(text="𝐍𝐎 𝐌𝐎𝐑𝐄 𝐏𝐀𝐆𝐄𝐒 𝐀𝐕𝐀𝐈𝐋𝐀𝐁𝐋𝐄", callback_data="pages")]
+ )
+ imdb = await get_poster(search, file=(files[0]).file_name) if settings["imdb"] else None
+ TEMPLATE = settings['template']
+ if imdb:
+ cap = TEMPLATE.format(
+ query=search,
+ title=imdb['title'],
+ votes=imdb['votes'],
+ aka=imdb["aka"],
+ seasons=imdb["seasons"],
+ box_office=imdb['box_office'],
+ localized_title=imdb['localized_title'],
+ kind=imdb['kind'],
+ imdb_id=imdb["imdb_id"],
+ cast=imdb["cast"],
+ runtime=imdb["runtime"],
+ countries=imdb["countries"],
+ certificates=imdb["certificates"],
+ languages=imdb["languages"],
+ director=imdb["director"],
+ writer=imdb["writer"],
+ producer=imdb["producer"],
+ composer=imdb["composer"],
+ cinematographer=imdb["cinematographer"],
+ music_team=imdb["music_team"],
+ distributors=imdb["distributors"],
+ release_date=imdb['release_date'],
+ year=imdb['year'],
+ genres=imdb['genres'],
+ poster=imdb['poster'],
+ plot=imdb['plot'],
+ rating=imdb['rating'],
+ url=imdb['url'],
+ **locals()
+ )
+ else:
+ cap = f"𝙃𝙚𝙧𝙚 𝙞𝙨 𝙬𝙝𝙖𝙩 𝙞𝙨 𝙛𝙤𝙪𝙣𝙙 𝙮𝙤𝙪𝙧 𝙦𝙪𝙚𝙧𝙮:\n {search}\n👤𝙍𝙚𝙦𝙪𝙚𝙨𝙩𝙚𝙙 𝘽𝙮 : {message.from_user.mention}\n👥𝙂𝙧𝙤𝙪𝙥 : {message.chat.title}"
+ if imdb and imdb.get('poster'):
+ try:
+ if message.chat.id == SUPPORT_CHAT_ID:
+ await message.reply_text(
+ text=f"Hᴇʏ {message.from_user.mention}, {str(total_results)} ʀᴇsᴜʟᴛs ᴀʀᴇ ғᴏᴜɴᴅ ɪɴ ᴍʏ ᴅᴀᴛᴀʙᴀsᴇ ғᴏʀ ʏᴏᴜʀ ᴏᴜᴇʀʏ {search}. Kɪɴᴅʟʏ ᴜsᴇ ɪɴʟɪɴᴇ sᴇᴀʀᴄʜ ᴏʀ ᴍᴀᴋᴇ ᴀ ɢʀᴏᴜᴘ ᴀɴᴅ ᴀᴅᴅ ᴍᴇ ᴀs ᴀᴅᴍɪɴ ᴛᴏ ɢᴇᴛ ᴍᴏᴠɪᴇ ғɪʟᴇs. Tʜɪs ɪs ᴀ sᴜᴘᴘᴏʀᴛ ɢʀᴏᴜᴘ sᴏ ᴛʜᴀᴛ ʏᴏᴜ ᴄᴀɴ'ᴛ ɢᴇᴛ ғɪʟᴇs ғʀᴏᴍ ʜᴇʀᴇ...",
+ reply_markup=InlineKeyboardMarkup(
+ [[
+ InlineKeyboardButton('Rᴇǫᴜᴇsᴛ ʜᴇʀᴇ 🚀', url='https://t.me/moviecafe_01')
+ ]]
+ )
+ )
+ else:
+ hehe = await message.reply_photo(photo=imdb.get('poster'), caption=cap[:1024],
+ reply_markup=InlineKeyboardMarkup(btn))
+ try:
+ if settings['auto_delete']:
+ await asyncio.sleep(600)
+ await hehe.delete()
+ await message.delete()
+ except KeyError:
+ grpid = await active_connection(str(message.from_user.id))
+ await save_group_settings(grpid, 'auto_delete', True)
+ settings = await get_settings(message.chat.id)
+ if settings['auto_delete']:
+ await asyncio.sleep(600)
+ await hehe.delete()
+ await message.delete()
+ except (MediaEmpty, PhotoInvalidDimensions, WebpageMediaEmpty):
+ if message.chat.id == SUPPORT_CHAT_ID:
+ await message.reply_text(
+ text=f"Hᴇʏ {message.from_user.mention}, {str(total_results)} ʀᴇsᴜʟᴛs ᴀʀᴇ ғᴏᴜɴᴅ ɪɴ ᴍʏ ᴅᴀᴛᴀʙᴀsᴇ ғᴏʀ ʏᴏᴜʀ ᴏᴜᴇʀʏ {search}. Kɪɴᴅʟʏ ᴜsᴇ ɪɴʟɪɴᴇ sᴇᴀʀᴄʜ ᴏʀ ᴍᴀᴋᴇ ᴀ ɢʀᴏᴜᴘ ᴀɴᴅ ᴀᴅᴅ ᴍᴇ ᴀs ᴀᴅᴍɪɴ ᴛᴏ ɢᴇᴛ ᴍᴏᴠɪᴇ ғɪʟᴇs. Tʜɪs ɪs ᴀ sᴜᴘᴘᴏʀᴛ ɢʀᴏᴜᴘ sᴏ ᴛʜᴀᴛ ʏᴏᴜ ᴄᴀɴ'ᴛ ɢᴇᴛ ғɪʟᴇs ғʀᴏᴍ ʜᴇʀᴇ...",
+ reply_markup=InlineKeyboardMarkup(
+ [[
+ InlineKeyboardButton('Rᴇǫᴜᴇsᴛ ʜᴇʀᴇ 🚀', url='https://t.me/moviecafe_01')
+ ]]
+ )
+ )
+ else:
+ pic = imdb.get('poster')
+ poster = pic.replace('.jpg', "._V1_UX360.jpg")
+ hmm = await message.reply_photo(photo=poster, caption=cap[:1024],
+ reply_markup=InlineKeyboardMarkup(btn))
+ try:
+ if settings['auto_delete']:
+ await asyncio.sleep(600)
+ await hmm.delete()
+ await message.delete()
+ except KeyError:
+ grpid = await active_connection(str(message.from_user.id))
+ await save_group_settings(grpid, 'auto_delete', True)
+ settings = await get_settings(message.chat.id)
+ if settings['auto_delete']:
+ await asyncio.sleep(600)
+ await hmm.delete()
+ await message.delete()
+ except Exception as e:
+ if message.chat.id == SUPPORT_CHAT_ID:
+ await message.reply_text(
+ text=f"Hᴇʏ {message.from_user.mention}, {str(total_results)} ʀᴇsᴜʟᴛs ᴀʀᴇ ғᴏᴜɴᴅ ɪɴ ᴍʏ ᴅᴀᴛᴀʙᴀsᴇ ғᴏʀ ʏᴏᴜʀ ᴏᴜᴇʀʏ {search}. Kɪɴᴅʟʏ ᴜsᴇ ɪɴʟɪɴᴇ sᴇᴀʀᴄʜ ᴏʀ ᴍᴀᴋᴇ ᴀ ɢʀᴏᴜᴘ ᴀɴᴅ ᴀᴅᴅ ᴍᴇ ᴀs ᴀᴅᴍɪɴ ᴛᴏ ɢᴇᴛ ᴍᴏᴠɪᴇ ғɪʟᴇs. Tʜɪs ɪs ᴀ sᴜᴘᴘᴏʀᴛ ɢʀᴏᴜᴘ sᴏ ᴛʜᴀᴛ ʏᴏᴜ ᴄᴀɴ'ᴛ ɢᴇᴛ ғɪʟᴇs ғʀᴏᴍ ʜᴇʀᴇ...",
+ reply_markup=InlineKeyboardMarkup(
+ [[
+ InlineKeyboardButton('Rᴇǫᴜᴇsᴛ ʜᴇʀᴇ 🚀', url='https://t.me/moviecafe_01')
+ ]]
+ )
+ )
+ else:
+ logger.exception(e)
+ fek = await message.reply_photo(photo=NOR_IMG, caption=cap, reply_markup=InlineKeyboardMarkup(btn))
+ try:
+ if settings['auto_delete']:
+ await asyncio.sleep(600)
+ await fek.delete()
+ await message.delete()
+ except KeyError:
+ grpid = await active_connection(str(message.from_user.id))
+ await save_group_settings(grpid, 'auto_delete', True)
+ settings = await get_settings(message.chat.id)
+ if settings['auto_delete']:
+ await asyncio.sleep(600)
+ await fek.delete()
+ await message.delete()
+ else:
+ if message.chat.id == SUPPORT_CHAT_ID:
+ await message.reply_text(
+ text=f"Hᴇʏ {message.from_user.mention}, {str(total_results)} ʀᴇsᴜʟᴛs ᴀʀᴇ ғᴏᴜɴᴅ ɪɴ ᴍʏ ᴅᴀᴛᴀʙᴀsᴇ ғᴏʀ ʏᴏᴜʀ ᴏᴜᴇʀʏ {search}. Kɪɴᴅʟʏ ᴜsᴇ ɪɴʟɪɴᴇ sᴇᴀʀᴄʜ ᴏʀ ᴍᴀᴋᴇ ᴀ ɢʀᴏᴜᴘ ᴀɴᴅ ᴀᴅᴅ ᴍᴇ ᴀs ᴀᴅᴍɪɴ ᴛᴏ ɢᴇᴛ ᴍᴏᴠɪᴇ ғɪʟᴇs. Tʜɪs ɪs ᴀ sᴜᴘᴘᴏʀᴛ ɢʀᴏᴜᴘ sᴏ ᴛʜᴀᴛ ʏᴏᴜ ᴄᴀɴ'ᴛ ɢᴇᴛ ғɪʟᴇs ғʀᴏᴍ ʜᴇʀᴇ...",
+ reply_markup=InlineKeyboardMarkup(
+ [[
+ InlineKeyboardButton('Rᴇǫᴜᴇsᴛ ʜᴇʀᴇ 🚀', url='https://t.me/moviecafe_01')
+ ]]
+ )
+ )
+ else:
+ fuk = await message.reply_photo(photo=NOR_IMG, caption=cap, reply_markup=InlineKeyboardMarkup(btn))
+ try:
+ if settings['auto_delete']:
+ await asyncio.sleep(600)
+ await fuk.delete()
+ await message.delete()
+ except KeyError:
+ grpid = await active_connection(str(message.from_user.id))
+ await save_group_settings(grpid, 'auto_delete', True)
+ settings = await get_settings(message.chat.id)
+ if settings['auto_delete']:
+ await asyncio.sleep(600)
+ await fuk.delete()
+ await message.delete()
+
+ if spoll:
+ await msg.message.delete()
+
+
+async def advantage_spell_chok(client, msg):
+ mv_id = msg.id
+ mv_rqst = msg.text
+ reqstr1 = msg.from_user.id if msg.from_user else 0
+ reqstr = await client.get_users(reqstr1)
+ settings = await get_settings(msg.chat.id)
+ query = re.sub(
+ r"\b(pl(i|e)*?(s|z+|ease|se|ese|(e+)s(e)?)|((send|snd|giv(e)?|gib)(\sme)?)|movie(s)?|new|latest|br((o|u)h?)*|^h(e|a)?(l)*(o)*|mal(ayalam)?|t(h)?amil|file|that|find|und(o)*|kit(t(i|y)?)?o(w)?|thar(u)?(o)*w?|kittum(o)*|aya(k)*(um(o)*)?|full\smovie|any(one)|with\ssubtitle(s)?)",
+ "", msg.text, flags=re.IGNORECASE) # plis contribute some common words
+ RQST = query.strip()
+ query = query.strip() + " movie"
+ try:
+ movies = await get_poster(mv_rqst, bulk=True)
+ except Exception as e:
+ logger.exception(e)
+ await client.send_message(chat_id=LOG_CHANNEL, text=(script.NORSLTS.format(reqstr.id, reqstr.mention, mv_rqst)))
+ k = await msg.reply(script.I_CUDNT.format(reqstr.mention))
+ await asyncio.sleep(8)
+ await k.delete()
+ return
+ movielist = []
+ if not movies:
+ reqst_gle = mv_rqst.replace(" ", "+")
+ button = [[
+ InlineKeyboardButton("Gᴏᴏɢʟᴇ", url=f"https://www.google.com/search?q={reqst_gle}")
+ ]]
+ await client.send_message(chat_id=LOG_CHANNEL, text=(script.NORSLTS.format(reqstr.id, reqstr.mention, mv_rqst)))
+ k = await msg.reply_photo(
+ photo=SPELL_IMG,
+ caption=script.I_CUDNT.format(mv_rqst),
+ reply_markup=InlineKeyboardMarkup(button)
+ )
+ await asyncio.sleep(30)
+ await k.delete()
+ return
+ movielist += [movie.get('title') for movie in movies]
+ movielist += [f"{movie.get('title')} {movie.get('year')}" for movie in movies]
+ SPELL_CHECK[mv_id] = movielist
+ btn = [
+ [
+ InlineKeyboardButton(
+ text=movie_name.strip(),
+ callback_data=f"spol#{reqstr1}#{k}",
+ )
+ ]
+ for k, movie_name in enumerate(movielist)
+ ]
+ btn.append([InlineKeyboardButton(text="Close", callback_data=f'spol#{reqstr1}#close_spellcheck')])
+ spell_check_del = await msg.reply_photo(
+ photo=(SPELL_IMG),
+ caption=(script.CUDNT_FND.format(reqstr.mention)),
+ reply_markup=InlineKeyboardMarkup(btn)
+ )
+
+ try:
+ if settings['auto_delete']:
+ await asyncio.sleep(600)
+ await spell_check_del.delete()
+ except KeyError:
+ grpid = await active_connection(str(message.from_user.id))
+ await save_group_settings(grpid, 'auto_delete', True)
+ settings = await get_settings(message.chat.id)
+ if settings['auto_delete']:
+ await asyncio.sleep(600)
+ await spell_check_del.delete()
+
+
+async def manual_filters(client, message, text=False):
+ settings = await get_settings(message.chat.id)
+ group_id = message.chat.id
+ name = text or message.text
+ reply_id = message.reply_to_message.id if message.reply_to_message else message.id
+ keywords = await get_filters(group_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)
+
+ if reply_text:
+ reply_text = reply_text.replace("\\n", "\n").replace("\\t", "\t")
+
+ if btn is not None:
+ try:
+ if fileid == "None":
+ if btn == "[]":
+ elsa = await client.send_message(
+ group_id,
+ reply_text,
+ disable_web_page_preview=True,
+ protect_content=True if settings["file_secure"] else False,
+ reply_to_message_id=reply_id
+ )
+ try:
+ if settings['auto_ffilter']:
+ await auto_filter(client, message)
+ except KeyError:
+ grpid = await active_connection(str(message.from_user.id))
+ await save_group_settings(grpid, 'auto_ffilter', True)
+ settings = await get_settings(message.chat.id)
+ if settings['auto_ffilter']:
+ await auto_filter(client, message)
+ try:
+ if settings['auto_delete']:
+ await asyncio.sleep(600)
+ await elsa.delete()
+ except KeyError:
+ grpid = await active_connection(str(message.from_user.id))
+ await save_group_settings(grpid, 'auto_delete', True)
+ settings = await get_settings(message.chat.id)
+ if settings['auto_delete']:
+ await asyncio.sleep(600)
+ await elsa.delete()
+
+ else:
+ button = eval(btn)
+ hmm = await client.send_message(
+ group_id,
+ reply_text,
+ disable_web_page_preview=True,
+ reply_markup=InlineKeyboardMarkup(button),
+ protect_content=True if settings["file_secure"] else False,
+ reply_to_message_id=reply_id
+ )
+ try:
+ if settings['auto_ffilter']:
+ await auto_filter(client, message)
+ except KeyError:
+ grpid = await active_connection(str(message.from_user.id))
+ await save_group_settings(grpid, 'auto_ffilter', True)
+ settings = await get_settings(message.chat.id)
+ if settings['auto_ffilter']:
+ await auto_filter(client, message)
+ try:
+ if settings['auto_delete']:
+ await asyncio.sleep(600)
+ await hmm.delete()
+ except KeyError:
+ grpid = await active_connection(str(message.from_user.id))
+ await save_group_settings(grpid, 'auto_delete', True)
+ settings = await get_settings(message.chat.id)
+ if settings['auto_delete']:
+ await asyncio.sleep(600)
+ await hmm.delete()
+
+ elif btn == "[]":
+ oto = await client.send_cached_media(
+ group_id,
+ fileid,
+ caption=reply_text or "",
+ protect_content=True if settings["file_secure"] else False,
+ reply_to_message_id=reply_id
+ )
+ try:
+ if settings['auto_ffilter']:
+ await auto_filter(client, message)
+ except KeyError:
+ grpid = await active_connection(str(message.from_user.id))
+ await save_group_settings(grpid, 'auto_ffilter', True)
+ settings = await get_settings(message.chat.id)
+ if settings['auto_ffilter']:
+ await auto_filter(client, message)
+ try:
+ if settings['auto_delete']:
+ await asyncio.sleep(600)
+ await oto.delete()
+ except KeyError:
+ grpid = await active_connection(str(message.from_user.id))
+ await save_group_settings(grpid, 'auto_delete', True)
+ settings = await get_settings(message.chat.id)
+ if settings['auto_delete']:
+ await asyncio.sleep(600)
+ await oto.delete()
+
+ else:
+ button = eval(btn)
+ dlt = await message.reply_cached_media(
+ fileid,
+ caption=reply_text or "",
+ reply_markup=InlineKeyboardMarkup(button),
+ reply_to_message_id=reply_id
+ )
+ try:
+ if settings['auto_ffilter']:
+ await auto_filter(client, message)
+ except KeyError:
+ grpid = await active_connection(str(message.from_user.id))
+ await save_group_settings(grpid, 'auto_ffilter', True)
+ settings = await get_settings(message.chat.id)
+ if settings['auto_ffilter']:
+ await auto_filter(client, message)
+ try:
+ if settings['auto_delete']:
+ await asyncio.sleep(600)
+ await dlt.delete()
+ except KeyError:
+ grpid = await active_connection(str(message.from_user.id))
+ await save_group_settings(grpid, 'auto_delete', True)
+ settings = await get_settings(message.chat.id)
+ if settings['auto_delete']:
+ await asyncio.sleep(600)
+ await dlt.delete()
+
+ except Exception as e:
+ logger.exception(e)
+ break
+ else:
+ return False
+
+
+async def global_filters(client, message, text=False):
+ settings = await get_settings(message.chat.id)
+ group_id = message.chat.id
+ name = text or message.text
+ reply_id = message.reply_to_message.id if message.reply_to_message else message.id
+ keywords = await get_gfilters('gfilters')
+ 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_gfilter('gfilters', keyword)
+
+ if reply_text:
+ reply_text = reply_text.replace("\\n", "\n").replace("\\t", "\t")
+
+ if btn is not None:
+ try:
+ if fileid == "None":
+ if btn == "[]":
+ joelkb = await client.send_message(
+ group_id,
+ reply_text,
+ disable_web_page_preview=True,
+ reply_to_message_id=reply_id
+ )
+
+ else:
+ button = eval(btn)
+ hmm = await client.send_message(
+ group_id,
+ reply_text,
+ disable_web_page_preview=True,
+ reply_markup=InlineKeyboardMarkup(button),
+ reply_to_message_id=reply_id
+ )
+
+ elif btn == "[]":
+ oto = await client.send_cached_media(
+ group_id,
+ fileid,
+ caption=reply_text or "",
+ reply_to_message_id=reply_id
+ )
+
+ else:
+ button = eval(btn)
+ dlt = await message.reply_cached_media(
+ fileid,
+ caption=reply_text or "",
+ reply_markup=InlineKeyboardMarkup(button),
+ reply_to_message_id=reply_id
+ )
+
+ except Exception as e:
+ logger.exception(e)
+ break
+ else:
+ return False
+
From dfeb7f5d8412281dab02888128c2577309049d5b Mon Sep 17 00:00:00 2001
From: Soul pc <119080077+soulpc@users.noreply.github.com>
Date: Tue, 19 Dec 2023 10:57:52 +0530
Subject: [PATCH 222/237] Delete plugins/pm_filter.py
---
plugins/pm_filter.py | 1921 ------------------------------------------
1 file changed, 1921 deletions(-)
delete mode 100644 plugins/pm_filter.py
diff --git a/plugins/pm_filter.py b/plugins/pm_filter.py
deleted file mode 100644
index afc8e94..0000000
--- a/plugins/pm_filter.py
+++ /dev/null
@@ -1,1921 +0,0 @@
-# Kanged From @TroJanZheX
-# REDIRECT added https://github.com/Joelkb
-import asyncio
-import re
-import ast
-import math
-import random
-from pyrogram.errors.exceptions.bad_request_400 import MediaEmpty, PhotoInvalidDimensions, WebpageMediaEmpty
-from Script import script
-import pyrogram
-from database.connections_mdb import active_connection, all_connections, delete_connection, if_active, make_active, \
- make_inactive
-from info import ADMINS, AUTH_CHANNEL, FILE_CHANNEL, AUTH_USERS, CUSTOM_FILE_CAPTION, NOR_IMG, AUTH_GROUPS, P_TTI_SHOW_OFF, IMDB, \
- SINGLE_BUTTON, SPELL_CHECK_REPLY, IMDB_TEMPLATE, SPELL_IMG, MSG_ALRT, FILE_FORWARD, MAIN_CHANNEL, LOG_CHANNEL, PICS, SUPPORT_CHAT_ID
-from pyrogram.types import InlineKeyboardMarkup, InlineKeyboardButton, CallbackQuery, InputMediaPhoto
-from pyrogram import Client, filters, enums
-from pyrogram.errors import FloodWait, UserIsBlocked, MessageNotModified, PeerIdInvalid
-from utils import get_size, is_subscribed, get_poster, search_gagala, temp, get_settings, save_group_settings, get_shortlink
-from database.users_chats_db import db
-from database.ia_filterdb import Media, get_file_details, get_search_results, get_bad_files
-from database.filters_mdb import (
- del_all,
- find_filter,
- get_filters,
-)
-from database.gfilters_mdb import (
- find_gfilter,
- get_gfilters,
-)
-import logging
-
-logger = logging.getLogger(__name__)
-logger.setLevel(logging.ERROR)
-
-BUTTONS = {}
-SPELL_CHECK = {}
-FILTER_MODE = {}
-
-@Client.on_message(filters.command('autofilter') & filters.user(ADMINS))
-async def fil_mod(client, message):
- mode_on = ["yes", "on", "true"]
- mode_of = ["no", "off", "false"]
-
- try:
- args = message.text.split(None, 1)[1].lower()
- except:
- return await message.reply("**𝙸𝙽𝙲𝙾𝙼𝙿𝙴𝚃𝙴𝙽𝚃 𝙲𝙾𝙼𝙼𝙰𝙳...**")
-
- m = await message.reply("**𝚂𝙴𝚃𝚃𝙸𝙽𝙶.../**")
-
- if args in mode_on:
- FILTER_MODE[str(message.chat.id)] = "True"
- await m.edit("**𝙰𝚄𝚃𝙾𝙵𝙸𝙻𝚃𝙴𝚁 𝙴𝙽𝙰𝙱𝙻𝙴𝙳**")
-
- elif args in mode_of:
- FILTER_MODE[str(message.chat.id)] = "False"
- await m.edit("**𝙰𝚄𝚃𝙾𝙵𝙸𝙻𝚃𝙴𝚁 𝙳𝙸𝚂𝙰𝙱𝙻𝙴𝙳**")
- else:
- await m.edit("𝚄𝚂𝙴 :- /autofilter on 𝙾𝚁 /autofilter off")
-
-@Client.on_message((filters.group) & filters.text & filters.incoming)
-async def give_filter(client,message):
- await global_filters(client, message)
- group_id = message.chat.id
- name = message.text
-
- keywords = await get_filters(group_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)
-
- if reply_text:
- reply_text = reply_text.replace("\\n", "\n").replace("\\t", "\t")
-
- if btn is not None:
- try:
- if fileid == "None":
- if btn == "[]":
- await message.reply_text(reply_text, disable_web_page_preview=True)
- else:
- button = eval(btn)
- await message.reply_text(
- reply_text,
- disable_web_page_preview=True,
- reply_markup=InlineKeyboardMarkup(button)
- )
- elif btn == "[]":
- await message.reply_cached_media(
- fileid,
- caption=reply_text or ""
- )
- else:
- button = eval(btn)
- await message.reply_cached_media(
- fileid,
- caption=reply_text or "",
- reply_markup=InlineKeyboardMarkup(button)
- )
- except Exception as e:
- print(e)
- break
-
- else:
- if FILTER_MODE.get(str(message.chat.id)) == "False":
- return
- else:
- await auto_filter(client, message)
-
-@Client.on_message(filters.private & filters.text & filters.incoming)
-async def pm_text(bot, message):
- content = message.text
- user = message.from_user.first_name
- user_id = message.from_user.id
- if content.startswith("/") or content.startswith("#"): return # ignore commands and hashtags
- await message.reply_text(
- text=f"ഇവിടെ ചോദിച്ചാൽ സിനിമ കിട്ടില്ല ഗ്രൂപ്പിൽ മാത്രം സിനിമ ചോദിക്കുക..!!\n\nGROUP OR BOT ANY PROMBLEM OR BUGS CONTACT GROUP ADMIN = @ARAKAL_THERAVAD_MOVIES_02_bot!!!",
- reply_markup=InlineKeyboardMarkup([[InlineKeyboardButton("📝ᴊᴏɪɴ ᴛᴏ ʀᴇǫᴜᴇsᴛ ʜᴇʀᴇ ", url=f"https://t.me/ARAKAL_THERAVAD_MOVIES")]])
- )
- await bot.send_message(
- chat_id=LOG_CHANNEL,
- text=f"#𝐏𝐌_𝐌𝐒𝐆\n\nNᴀᴍᴇ : {user}\n\nID : {user_id}\n\nMᴇssᴀɢᴇ : {content}"
- )
-
-@Client.on_callback_query(filters.regex(r"^next"))
-async def next_page(bot, query):
- ident, req, key, offset = query.data.split("_")
- if int(req) not in [query.from_user.id, 0]:
- return await query.answer(script.ALRT_TXT.format(query.from_user.first_name),show_alert=True)
- try:
- offset = int(offset)
- except:
- offset = 0
- search = BUTTONS.get(key)
- if not search:
- await query.answer(script.OLD_ALRT_TXT.format(query.from_user.first_name),show_alert=True)
- return
-
- files, n_offset, total = await get_search_results(search, offset=offset, filter=True)
- try:
- n_offset = int(n_offset)
- except:
- n_offset = 0
-
- if not files:
- return
- settings = await get_settings(query.message.chat.id)
- if 'is_shortlink' in settings.keys():
- ENABLE_SHORTLINK = settings['is_shortlink']
- else:
- await save_group_settings(query.message.chat.id, 'is_shortlink', False)
- ENABLE_SHORTLINK = False
- if ENABLE_SHORTLINK == True:
- if settings['button']:
- btn = [
- [
- InlineKeyboardButton(
- text=f"[{get_size(file.file_size)}] {file.file_name}", url=await get_shortlink(query.message.chat.id, f"https://telegram.me/{temp.U_NAME}?start=files_{file.file_id}")
- ),
- ]
- for file in files
- ]
- else:
- btn = [
- [
- InlineKeyboardButton(
- text=f"{file.file_name}", url=await get_shortlink(query.message.chat.id, f"https://telegram.me/{temp.U_NAME}?start=files_{file.file_id}")
- ),
- InlineKeyboardButton(
- text=f"{get_size(file.file_size)}",
- url=await get_shortlink(query.message.chat.id, f"https://telegram.me/{temp.U_NAME}?start=files_{file.file_id}")
- ),
- ]
- for file in files
- ]
- else:
- if settings['button']:
- btn = [
- [
- InlineKeyboardButton(
- text=f"[{get_size(file.file_size)}] {file.file_name}", callback_data=f'files#{file.file_id}'
- ),
- ]
- for file in files
- ]
- else:
- btn = [
- [
- InlineKeyboardButton(
- text=f"{file.file_name}", callback_data=f'files#{file.file_id}'
- ),
- InlineKeyboardButton(
- text=f"{get_size(file.file_size)}",
- callback_data=f'{pre}#{file.file_id}',
- ),
- ]
- for file in files
- ]
- try:
- if settings['auto_delete']:
- btn.insert(0,
- [
- InlineKeyboardButton(f'😇 Info', 'tips'),
- InlineKeyboardButton(f'📝 𝖳𝗂𝗉𝗌', 'info')
- ]
- )
-
- else:
- btn.insert(0,
- [
- InlineKeyboardButton(f'😇 Info', 'tips'),
- InlineKeyboardButton(f'📝 𝖳𝗂𝗉𝗌', 'info')
- ]
- )
-
- except KeyError:
- grpid = await active_connection(str(query.message.from_user.id))
- await save_group_settings(grpid, 'auto_delete', True)
- settings = await get_settings(query.message.chat.id)
- if settings['auto_delete']:
- btn.insert(0,
- [
- InlineKeyboardButton(f'😇 Info', 'tips'),
- InlineKeyboardButton(f'📝 𝖳𝗂𝗉𝗌', 'info')
- ]
- )
-
- else:
- btn.insert(0,
- [
- InlineKeyboardButton(f'😇 Info', 'tips'),
- InlineKeyboardButton(f'📝 𝖳𝗂𝗉𝗌', 'info')
- ]
- )
- try:
- settings = await get_settings(query.message.chat.id)
- if settings['max_btn']:
- if 0 < offset <= 10:
- off_set = 0
- elif offset == 0:
- off_set = None
- else:
- off_set = offset - 10
- if n_offset == 0:
- btn.append(
- [InlineKeyboardButton("◀️ 𝖡𝖠𝖢𝖪", callback_data=f"next_{req}_{key}_{off_set}"), InlineKeyboardButton(f"{math.ceil(int(offset)/10)+1} / {math.ceil(total/10)}", callback_data="pages")]
- )
- elif off_set is None:
- btn.append([InlineKeyboardButton("📃", callback_data="pages"), InlineKeyboardButton(f"{math.ceil(int(offset)/10)+1} / {math.ceil(total/10)}", callback_data="pages"), InlineKeyboardButton("𝖭𝖤𝖷𝖳 ▶️", callback_data=f"next_{req}_{key}_{n_offset}")])
- else:
- btn.append(
- [
- InlineKeyboardButton("◀️ 𝖡𝖠𝖢𝖪", callback_data=f"next_{req}_{key}_{off_set}"),
- InlineKeyboardButton(f"{math.ceil(int(offset)/10)+1} / {math.ceil(total/10)}", callback_data="pages"),
- InlineKeyboardButton("𝖭𝖤𝖷𝖳 ▶️", callback_data=f"next_{req}_{key}_{n_offset}")
- ],
- )
- else:
- if 0 < offset <= int(MAX_B_TN):
- off_set = 0
- elif offset == 0:
- off_set = None
- else:
- off_set = offset - int(MAX_B_TN)
- if n_offset == 0:
- btn.append(
- [InlineKeyboardButton("◀️ 𝖡𝖠𝖢𝖪", callback_data=f"next_{req}_{key}_{off_set}"), InlineKeyboardButton(f"{math.ceil(int(offset)/int(MAX_B_TN))+1} / {math.ceil(total/int(MAX_B_TN))}", callback_data="pages")]
- )
- elif off_set is None:
- btn.append([InlineKeyboardButton("📃", callback_data="pages"), InlineKeyboardButton(f"{math.ceil(int(offset)/int(MAX_B_TN))+1} / {math.ceil(total/int(MAX_B_TN))}", callback_data="pages"), InlineKeyboardButton("𝖭𝖤𝖷𝖳 ▶️", callback_data=f"next_{req}_{key}_{n_offset}")])
- else:
- btn.append(
- [
- InlineKeyboardButton("◀️ 𝖡𝖠𝖢𝖪", callback_data=f"next_{req}_{key}_{off_set}"),
- InlineKeyboardButton(f"{math.ceil(int(offset)/int(MAX_B_TN))+1} / {math.ceil(total/int(MAX_B_TN))}", callback_data="pages"),
- InlineKeyboardButton("𝖭𝖤𝖷𝖳 ▶️", callback_data=f"next_{req}_{key}_{n_offset}")
- ],
- )
- except KeyError:
- await save_group_settings(query.message.chat.id, 'max_btn', False)
- settings = await get_settings(query.message.chat.id)
- if settings['max_btn']:
- if 0 < offset <= 10:
- off_set = 0
- elif offset == 0:
- off_set = None
- else:
- off_set = offset - 10
- if n_offset == 0:
- btn.append(
- [InlineKeyboardButton("◀️ 𝖡𝖠𝖢𝖪", callback_data=f"next_{req}_{key}_{off_set}"), InlineKeyboardButton(f"{math.ceil(int(offset)/10)+1} / {math.ceil(total/10)}", callback_data="pages")]
- )
- elif off_set is None:
- btn.append([InlineKeyboardButton("📃", callback_data="pages"), InlineKeyboardButton(f"{math.ceil(int(offset)/10)+1} / {math.ceil(total/10)}", callback_data="pages"), InlineKeyboardButton("𝖭𝖤𝖷𝖳 ▶️", callback_data=f"next_{req}_{key}_{n_offset}")])
- else:
- btn.append(
- [
- InlineKeyboardButton("◀️ 𝖡𝖠𝖢𝖪", callback_data=f"next_{req}_{key}_{off_set}"),
- InlineKeyboardButton(f"{math.ceil(int(offset)/10)+1} / {math.ceil(total/10)}", callback_data="pages"),
- InlineKeyboardButton("𝖭𝖤𝖷𝖳 ▶️", callback_data=f"next_{req}_{key}_{n_offset}")
- ],
- )
- else:
- if 0 < offset <= int(MAX_B_TN):
- off_set = 0
- elif offset == 0:
- off_set = None
- else:
- off_set = offset - int(MAX_B_TN)
- if n_offset == 0:
- btn.append(
- [InlineKeyboardButton("◀️ 𝖡𝖠𝖢𝖪", callback_data=f"next_{req}_{key}_{off_set}"), InlineKeyboardButton(f"{math.ceil(int(offset)/int(MAX_B_TN))+1} / {math.ceil(total/int(MAX_B_TN))}", callback_data="pages")]
- )
- elif off_set is None:
- btn.append([InlineKeyboardButton("📃", callback_data="pages"), InlineKeyboardButton(f"{math.ceil(int(offset)/int(MAX_B_TN))+1} / {math.ceil(total/int(MAX_B_TN))}", callback_data="pages"), InlineKeyboardButton("𝖭𝖤𝖷𝖳 ▶️", callback_data=f"next_{req}_{key}_{n_offset}")])
- else:
- btn.append(
- [
- InlineKeyboardButton("◀️ 𝖡𝖠𝖢𝖪", callback_data=f"next_{req}_{key}_{off_set}"),
- InlineKeyboardButton(f"{math.ceil(int(offset)/int(MAX_B_TN))+1} / {math.ceil(total/int(MAX_B_TN))}", callback_data="pages"),
- InlineKeyboardButton("𝖭𝖤𝖷𝖳 ▶️", callback_data=f"next_{req}_{key}_{n_offset}")
- ],
- )
- btn.insert(0, [
- InlineKeyboardButton(f'🎬 {search} 🎬', 'rkbtn')
- ])
- btn.insert(2, [
- InlineKeyboardButton("📤 𝖲𝖾𝗇𝖽 𝖠𝗅𝗅 𝖥𝗂𝗅𝖾𝗌 📤", callback_data=f"send_all#{req}#{key}#{pre}")
- ])
- try:
- await query.edit_message_reply_markup(
- reply_markup=InlineKeyboardMarkup(btn)
- )
- except MessageNotModified:
- pass
- await query.answer()
-
- if 0 < offset <= 10:
- off_set = 0
- elif offset == 0:
- off_set = None
- else:
- off_set = offset - 10
- if n_offset == 0:
- btn.append(
- [InlineKeyboardButton("⌫ 𝐁𝐀𝐂𝐊", callback_data=f"next_{req}_{key}_{off_set}"),
- InlineKeyboardButton(f"𝐏𝐀𝐆𝐄 {math.ceil(int(offset) / 10) + 1} / {math.ceil(total / 10)}",
- callback_data="pages")]
- )
- elif off_set is None:
- btn.append(
- [InlineKeyboardButton(f"{math.ceil(int(offset) / 10) + 1} / {math.ceil(total / 10)}", callback_data="pages"),
- InlineKeyboardButton("𝐍𝐄𝐗𝐓 ⌦", callback_data=f"next_{req}_{key}_{n_offset}")])
- else:
- btn.append(
- [
- InlineKeyboardButton("⌫ 𝐁𝐀𝐂𝐊", callback_data=f"next_{req}_{key}_{off_set}"),
- InlineKeyboardButton(f"𝐏𝐀𝐆𝐄 {math.ceil(int(offset) / 10) + 1} / {math.ceil(total / 10)}", callback_data="pages"),
- InlineKeyboardButton("𝐍𝐄𝐗𝐓 ⌦", callback_data=f"next_{req}_{key}_{n_offset}")
- ],
- )
- try:
- await query.edit_message_reply_markup(
- reply_markup=InlineKeyboardMarkup(btn)
- )
- except MessageNotModified:
- pass
- await query.answer()
-
-# spellcheck error fixing
-@Client.on_callback_query(filters.regex(r"^spol"))
-async def advantage_spoll_choker(bot, query):
- _, user, movie_ = query.data.split('#')
- movies = SPELL_CHECK.get(query.message.reply_to_message.id)
- if not movies:
- return await query.answer(script.OLD_ALRT_TXT.format(query.from_user.first_name), show_alert=True)
- if int(user) != 0 and query.from_user.id != int(user):
- return await query.answer(script.ALRT_TXT.format(query.from_user.first_name),show_alert=True)
- if movie_ == "close_spellcheck":
- return await query.message.delete()
- movie = movies[(int(movie_))]
- await query.answer(script.TOP_ALRT_MSG)
- k = await manual_filters(bot, query.message, text=movie)
- if k == False:
- files, offset, total_results = await get_search_results(movie, offset=0, filter=True)
- if files:
- k = (movie, files, offset, total_results)
- await auto_filter(bot, query, k)
- else:
- reqstr1 = query.from_user.id if query.from_user else 0
- reqstr = await bot.get_users(reqstr1)
- await bot.send_message(chat_id=LOG_CHANNEL, text=(script.NORSLTS.format(reqstr.id, reqstr.mention, movie)))
- k = await query.message.edit(script.MVE_NT_FND)
- await asyncio.sleep(10)
- await k.delete()
-
-
-@Client.on_callback_query()
-async def cb_handler(client: Client, query: CallbackQuery):
- if query.data == "close_data":
- await query.message.delete()
- elif query.data == "delallconfirm":
- userid = query.from_user.id
- chat_type = query.message.chat.type
-
- if chat_type == enums.ChatType.PRIVATE:
- grpid = await active_connection(str(userid))
- if grpid is not None:
- grp_id = grpid
- try:
- chat = await client.get_chat(grpid)
- title = chat.title
- except:
- await query.message.edit_text("Make sure I'm present in your group!!", quote=True)
- return await query.answer(MSG_ALRT)
- else:
- await query.message.edit_text(
- "I'm not connected to any groups!\nCheck /connections or connect to any groups",
- quote=True
- )
- return await query.answer(MSG_ALRT)
-
- elif chat_type in [enums.ChatType.GROUP, enums.ChatType.SUPERGROUP]:
- grp_id = query.message.chat.id
- title = query.message.chat.title
-
- else:
- return await query.answer(MSG_ALRT)
-
- st = await client.get_chat_member(grp_id, userid)
- if (st.status == enums.ChatMemberStatus.OWNER) or (str(userid) in ADMINS):
- await del_all(query.message, grp_id, title)
- else:
- await query.answer("You need to be Group Owner or an Auth User to do that!", show_alert=True)
- elif query.data == "delallcancel":
- userid = query.from_user.id
- chat_type = query.message.chat.type
-
- if chat_type == enums.ChatType.PRIVATE:
- await query.message.reply_to_message.delete()
- await query.message.delete()
-
- elif chat_type in [enums.ChatType.GROUP, enums.ChatType.SUPERGROUP]:
- grp_id = query.message.chat.id
- st = await client.get_chat_member(grp_id, userid)
- if (st.status == enums.ChatMemberStatus.OWNER) or (str(userid) in ADMINS):
- await query.message.delete()
- try:
- await query.message.reply_to_message.delete()
- except:
- pass
- else:
- await query.answer(script.ALRT_TXT.format(query.from_user.first_name),show_alert=True)
- elif "groupcb" in query.data:
- await query.answer()
-
- group_id = query.data.split(":")[1]
-
- act = query.data.split(":")[2]
- hr = await client.get_chat(int(group_id))
- title = hr.title
- user_id = query.from_user.id
-
- if act == "":
- stat = "CONNECT"
- cb = "connectcb"
- else:
- stat = "DISCONNECT"
- cb = "disconnect"
-
- keyboard = InlineKeyboardMarkup([
- [InlineKeyboardButton(f"{stat}", callback_data=f"{cb}:{group_id}"),
- InlineKeyboardButton("DELETE", callback_data=f"deletecb:{group_id}")],
- [InlineKeyboardButton("BACK", callback_data="backcb")]
- ])
-
- await query.message.edit_text(
- f"Group Name : **{title}**\nGroup ID : `{group_id}`",
- reply_markup=keyboard,
- parse_mode=enums.ParseMode.MARKDOWN
- )
- return await query.answer(MSG_ALRT)
- elif "connectcb" in query.data:
- await query.answer()
-
- group_id = query.data.split(":")[1]
-
- hr = await client.get_chat(int(group_id))
-
- title = hr.title
-
- user_id = query.from_user.id
-
- mkact = await make_active(str(user_id), str(group_id))
-
- if mkact:
- await query.message.edit_text(
- f"Connected to **{title}**",
- parse_mode=enums.ParseMode.MARKDOWN
- )
- else:
- await query.message.edit_text('Some error occurred!!', parse_mode=enums.ParseMode.MARKDOWN)
- return await query.answer(MSG_ALRT)
- elif "disconnect" in query.data:
- await query.answer()
-
- group_id = query.data.split(":")[1]
-
- hr = await client.get_chat(int(group_id))
-
- title = hr.title
- user_id = query.from_user.id
-
- mkinact = await make_inactive(str(user_id))
-
- if mkinact:
- await query.message.edit_text(
- f"Disconnected from **{title}**",
- parse_mode=enums.ParseMode.MARKDOWN
- )
- else:
- await query.message.edit_text(
- f"Some error occurred!!",
- parse_mode=enums.ParseMode.MARKDOWN
- )
- return await query.answer(MSG_ALRT)
- elif "deletecb" in query.data:
- await query.answer()
-
- user_id = query.from_user.id
- group_id = query.data.split(":")[1]
-
- delcon = await delete_connection(str(user_id), str(group_id))
-
- if delcon:
- await query.message.edit_text(
- "Successfully deleted connection"
- )
- else:
- await query.message.edit_text(
- f"Some error occurred!!",
- parse_mode=enums.ParseMode.MARKDOWN
- )
- return await query.answer(MSG_ALRT)
- elif query.data == "backcb":
- await query.answer()
-
- userid = query.from_user.id
-
- groupids = await all_connections(str(userid))
- if groupids is None:
- await query.message.edit_text(
- "There are no active connections!! Connect to some groups first.",
- )
- return await query.answer(MSG_ALRT)
- buttons = []
- for groupid in groupids:
- try:
- ttl = await client.get_chat(int(groupid))
- title = ttl.title
- active = await if_active(str(userid), str(groupid))
- act = " - ACTIVE" if active else ""
- buttons.append(
- [
- InlineKeyboardButton(
- text=f"{title}{act}", callback_data=f"groupcb:{groupid}:{act}"
- )
- ]
- )
- except:
- pass
- if buttons:
- await query.message.edit_text(
- "Your connected group details ;\n\n",
- reply_markup=InlineKeyboardMarkup(buttons)
- )
- elif "gfilteralert" in query.data:
- grp_id = query.message.chat.id
- i = query.data.split(":")[1]
- keyword = query.data.split(":")[2]
- reply_text, btn, alerts, fileid = await find_gfilter('gfilters', keyword)
- if alerts is not None:
- alerts = ast.literal_eval(alerts)
- alert = alerts[int(i)]
- alert = alert.replace("\\n", "\n").replace("\\t", "\t")
- await query.answer(alert, show_alert=True)
- elif "alertmessage" in query.data:
- grp_id = query.message.chat.id
- i = query.data.split(":")[1]
- keyword = query.data.split(":")[2]
- reply_text, btn, alerts, fileid = await find_filter(grp_id, keyword)
- if alerts is not None:
- alerts = ast.literal_eval(alerts)
- alert = alerts[int(i)]
- alert = alert.replace("\\n", "\n").replace("\\t", "\t")
- await query.answer(alert, show_alert=True)
- if query.data.startswith("file"):
- ident, file_id = query.data.split("#")
- clicked = query.from_user.id #fetching the ID of the user who clicked the button
- try:
- typed = query.message.reply_to_message.from_user.id #fetching user ID of the user who sent the movie request
- except:
- typed = clicked #if failed, uses the clicked user's ID as requested user ID
- files_ = await get_file_details(file_id)
- if not files_:
- return await query.answer('No such file exist.')
- files = files_[0]
- title = files.file_name
- size = get_size(files.file_size)
- f_caption = files.caption
- settings = await get_settings(query.message.chat.id)
- if CUSTOM_FILE_CAPTION:
- try:
- f_caption = CUSTOM_FILE_CAPTION.format(file_name='' if title is None else title,
- file_size='' if size is None else size,
- file_caption='' if f_caption is None else f_caption)
- except Exception as e:
- logger.exception(e)
- f_caption = f_caption
- if f_caption is None:
- f_caption = f"{files.file_name}"
-
- try:
- if AUTH_CHANNEL and not await is_subscribed(client, query):
- if clicked == typed:
- await query.answer(url=f"https://t.me/{temp.U_NAME}?start={ident}_{file_id}")
- return
- else:
- await query.answer(f"Hᴇʏ {query.from_user.first_name}, Tʜɪs Is Nᴏᴛ Yᴏᴜʀ Mᴏᴠɪᴇ Rᴇǫᴜᴇsᴛ. Rᴇǫᴜᴇsᴛ Yᴏᴜʀ's !", show_alert=True)
- elif settings['botpm']:
- if clicked == typed:
- await query.answer(url=f"https://t.me/{temp.U_NAME}?start={ident}_{file_id}")
- return
- else:
- await query.answer(f"Hᴇʏ {query.from_user.first_name}, Tʜɪs Is Nᴏᴛ Yᴏᴜʀ Mᴏᴠɪᴇ Rᴇǫᴜᴇsᴛ. Rᴇǫᴜᴇsᴛ Yᴏᴜʀ's !", show_alert=True)
- else:
- if clicked == typed:
- file_send=await client.send_cached_media(
- chat_id=FILE_CHANNEL,
- file_id=file_id,
- caption=script.CHANNEL_CAP.format(query.from_user.mention, title, query.message.chat.title),
- protect_content=True if ident == "filep" else False,
- reply_markup=InlineKeyboardMarkup(
- [
- [
- InlineKeyboardButton(f'Eɴɢ', 'feng'),
- InlineKeyboardButton(f'Mᴀʟ', 'fmal'),
- InlineKeyboardButton(f'Tᴀᴍ', 'ftam'),
- InlineKeyboardButton(f'Hɪɴ', 'fhin')
- ],[
- InlineKeyboardButton("🖥 𝗡𝗘𝗪 𝗢𝗧𝗧 𝗨𝗣𝗗𝗔𝗧𝗘𝗦 🖥", url=(MAIN_CHANNEL))
- ]
- ]
- )
- )
- Joel_tgx = await query.message.reply_text(
- script.FILE_MSG.format(query.from_user.mention, title, size),
- parse_mode=enums.ParseMode.HTML,
- reply_markup=InlineKeyboardMarkup(
- [
- [
- InlineKeyboardButton('📥 𝖣𝗈𝗐𝗇𝗅𝗈𝖺𝖽 𝖫𝗂𝗇𝗄 📥 ', url = file_send.link)
- ],[
- InlineKeyboardButton("⚠️ 𝖢𝖺𝗇'𝗍 𝖠𝖼𝖼𝖾𝗌𝗌 ❓ 𝖢𝗅𝗂𝖼𝗄 𝖧𝖾𝗋𝖾 ⚠️", url=(FILE_FORWARD))
- ]
- ]
- )
- )
- if settings['auto_delete']:
- await asyncio.sleep(600)
- await Joel_tgx.delete()
- await file_send.delete()
- else:
- await query.answer(f"Hᴇʏ {query.from_user.first_name}, Tʜɪs Is Nᴏᴛ Yᴏᴜʀ Mᴏᴠɪᴇ Rᴇǫᴜᴇsᴛ. Rᴇǫᴜᴇsᴛ Yᴏᴜʀ's !", show_alert=True)
- await query.answer('Cʜᴇᴄᴋ PM, I ʜᴀᴠᴇ sᴇɴᴛ ғɪʟᴇs ɪɴ PM', show_alert=True)
- except UserIsBlocked:
- await query.answer('𝐔𝐧𝐛𝐥𝐨𝐜𝐤 𝐭𝐡𝐞 𝐛𝐨𝐭 𝐦𝐚𝐡𝐧 !', show_alert=True)
- except PeerIdInvalid:
- await query.answer(url=f"https://t.me/{temp.U_NAME}?start={ident}_{file_id}")
- except Exception as e:
- await query.answer(url=f"https://t.me/{temp.U_NAME}?start={ident}_{file_id}")
- elif query.data.startswith("checksub"):
- if AUTH_CHANNEL and not await is_subscribed(client, query):
- await query.answer("𝑰 𝑳𝒊𝒌𝒆 𝒀𝒐𝒖𝒓 𝑺𝒎𝒂𝒓𝒕𝒏𝒆𝒔𝒔, 𝑩𝒖𝒕 𝑫𝒐𝒏'𝒕 𝑩𝒆 𝑶𝒗𝒆𝒓𝒔𝒎𝒂𝒓𝒕 😒\n@ARAKAL_THERAVAD_MOVIES", show_alert=True)
- return
- ident, file_id = query.data.split("#")
- files_ = await get_file_details(file_id)
- if not files_:
- return await query.answer('No such file exist.')
- files = files_[0]
- title = files.file_name
- size = get_size(files.file_size)
- f_caption = files.caption
- if CUSTOM_FILE_CAPTION:
- try:
- f_caption = CUSTOM_FILE_CAPTION.format(file_name='' if title is None else title,
- file_size='' if size is None else size,
- file_caption='' if f_caption is None else f_caption)
- except Exception as e:
- logger.exception(e)
- f_caption = f_caption
- if f_caption is None:
- f_caption = f"{title}"
- await query.answer()
- await client.send_cached_media(
- chat_id=query.from_user.id,
- file_id=file_id,
- caption=f_caption,
- protect_content=True if ident == 'checksubp' else False
- )
- elif query.data == "predvd":
- k = await client.send_message(chat_id=query.message.chat.id, text="Deleting PreDVDs... Please wait...")
- files, next_offset, total = await get_bad_files(
- 'predvd',
- offset=0)
- deleted = 0
- for file in files:
- file_ids = file.file_id
- result = await Media.collection.delete_one({
- '_id': file_ids,
- })
- if result.deleted_count:
- logger.info('PreDVD File Found ! Successfully deleted from database.')
- deleted+=1
- deleted = str(deleted)
- await k.edit_text(text=f"Successfully deleted {deleted} PreDVD files.")
-
- elif query.data == "camrip":
- k = await client.send_message(chat_id=query.message.chat.id, text="Deleting CamRips... Please wait...")
- files, next_offset, total = await get_bad_files(
- 'camrip',
- offset=0)
- deleted = 0
- for file in files:
- file_ids = file.file_id
- result = await Media.collection.delete_one({
- '_id': file_ids,
- })
- if result.deleted_count:
- logger.info('CamRip File Found ! Successfully deleted from database.')
- deleted+=1
- deleted = str(deleted)
- await k.edit_text(text=f"Successfully deleted {deleted} CamRip files.")
-
- elif query.data == "pages":
- await query.answer()
-
- elif query.data == "reqinfo":
- await query.answer("⚠ ɪɴꜰᴏʀᴍᴀᴛɪᴏɴ ⚠\n\nᴀꜰᴛᴇʀ 10 ᴍɪɴᴜᴛᴇꜱ ᴛʜɪꜱ ᴍᴇꜱꜱᴀɢᴇ ᴡɪʟʟ ʙᴇ ᴀᴜᴛᴏᴍᴀᴛɪᴄᴀʟʟʏ ᴅᴇʟᴇᴛᴇᴅ\n\nɪꜰ ʏᴏᴜ ᴅᴏ ɴᴏᴛ ꜱᴇᴇ ᴛʜᴇ ʀᴇǫᴜᴇsᴛᴇᴅ ᴍᴏᴠɪᴇ / sᴇʀɪᴇs ꜰɪʟᴇ, ʟᴏᴏᴋ ᴀᴛ ᴛʜᴇ ɴᴇxᴛ ᴘᴀɢᴇ\n\n❣ ᴘᴏᴡᴇʀᴇᴅ ʙʏ ᴄɪɴᴇᴍᴀʟᴀ.ᴄᴏᴍ", show_alert=True)
-
- elif query.data == "minfo":
- await query.answer("⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯\nᴍᴏᴠɪᴇ ʀᴇǫᴜᴇꜱᴛ ꜰᴏʀᴍᴀᴛ\n⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯\n\nɢᴏ ᴛᴏ ɢᴏᴏɢʟᴇ ➠ ᴛʏᴘᴇ ᴍᴏᴠɪᴇ ɴᴀᴍᴇ ➠ ᴄᴏᴘʏ ᴄᴏʀʀᴇᴄᴛ ɴᴀᴍᴇ ➠ ᴘᴀꜱᴛᴇ ᴛʜɪꜱ ɢʀᴏᴜᴘ\n\nᴇxᴀᴍᴘʟᴇ : ᴀᴠᴀᴛᴀʀ: ᴛʜᴇ ᴡᴀʏ ᴏғ ᴡᴀᴛᴇʀ\n\n🚯 ᴅᴏɴᴛ ᴜꜱᴇ ➠ ':(!,./)\n\n©️ ᴄɪɴᴇᴍᴀʟᴀ.ᴄᴏᴍ", show_alert=True)
-
- elif query.data == "sinfo":
- await query.answer("⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯\nꜱᴇʀɪᴇꜱ ʀᴇǫᴜᴇꜱᴛ ꜰᴏʀᴍᴀᴛ\n⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯\n\nɢᴏ ᴛᴏ ɢᴏᴏɢʟᴇ ➠ ᴛʏᴘᴇ ᴍᴏᴠɪᴇ ɴᴀᴍᴇ ➠ ᴄᴏᴘʏ ᴄᴏʀʀᴇᴄᴛ ɴᴀᴍᴇ ➠ ᴘᴀꜱᴛᴇ ᴛʜɪꜱ ɢʀᴏᴜᴘ\n\nᴇxᴀᴍᴘʟᴇ : ᴍᴏɴᴇʏ ʜᴇɪsᴛ S01E01\n\n🚯 ᴅᴏɴᴛ ᴜꜱᴇ ➠ ':(!,./)\n\n©️ ᴄɪɴᴇᴍᴀʟᴀ.ᴄᴏᴍ", show_alert=True)
-
- elif query.data == "tinfo":
- await query.answer("▣ ᴛɪᴘs ▣\n\n★ ᴛʏᴘᴇ ᴄᴏʀʀᴇᴄᴛ sᴘᴇʟʟɪɴɢ (ɢᴏᴏɢʟᴇ)\n\n★ ɪғ ʏᴏᴜ ɴᴏᴛ ɢᴇᴛ ʏᴏᴜʀ ғɪʟᴇ ɪɴ ᴛʜᴇ ʙᴜᴛᴛᴏɴ ᴛʜᴇɴ ᴛʜᴇ ɴᴇxᴛ sᴛᴇᴘ ɪs ᴄʟɪᴄᴋ ɴᴇxᴛ ʙᴜᴛᴛᴏɴ.\n\n★ ᴄᴏɴᴛɪɴᴜᴇ ᴛʜɪs ᴍᴇᴛʜᴏᴅ ᴛᴏ ɢᴇᴛᴛɪɴɢ ʏᴏᴜ ғɪʟᴇ\n\n❣ ᴘᴏᴡᴇʀᴇᴅ ʙʏ ᴄɪɴᴇᴍᴀʟᴀ. ᴄᴏᴍ", show_alert=True)
-
- elif query.data == "feng":
- await query.answer("Dᴜᴇ ᴛᴏ ᴄᴏᴘʏʀɪɢʜᴛ ᴛʜᴇ ғɪʟᴇ ᴡɪʟʟ ʙᴇ ᴅᴇʟᴇᴛᴇᴅ ғʀᴏᴍ ʜᴇʀᴇ ɪɴ 10 ᴍɪɴᴜᴛᴇs sᴏ ᴅᴏᴡɴʟᴏᴀᴅ ᴀғᴛᴇʀ ᴍᴏᴠɪɴɢ ғʀᴏᴍ ʜᴇʀᴇ ᴛᴏ sᴏᴍᴇᴡʜᴇʀᴇ ᴇʟsᴇ!", show_alert=True)
-
- elif query.data == "fmal":
- await query.answer("കോപ്പിറൈറ്റ് ഉള്ളതുകൊണ്ട് ഫയൽ 10 മിനിറ്റിനുള്ളിൽ ഇവിടെനിന്നും ഡിലീറ്റ് ആകുന്നതാണ് അതുകൊണ്ട് ഇവിടെ നിന്നും മറ്റെവിടെക്കെങ്കിലും മാറ്റിയതിന് ശേഷം ഡൗൺലോഡ് ചെയ്യുക!", show_alert=True)
-
- elif query.data == "ftam":
- await query.answer("பதிப்புரிமை காரணமாக, கோப்பு இங்கிருந்து 10 நிமிடங்களில் நீக்கப்படும், எனவே இங்கிருந்து வேறு எங்காவது நகர்த்தப்பட்ட பிறகு பதிவிறக்கவும்!", show_alert=True)
-
- elif query.data == "fhin":
- await query.answer("कॉपीराइट के कारण फ़ाइल यहां से 10 मिनट में डिलीट हो जाएगी इसलिए यहां से कहीं और ले जाकर डाउनलोड करें!", show_alert=True)
-
- elif query.data == "surprise":
- btn = [[
- InlineKeyboardButton('sᴜʀᴘʀɪsᴇ', callback_data='start')
- ]]
- reply_markup=InlineKeyboardMarkup(btn)
- await client.edit_message_media(
- query.message.chat.id,
- query.message.id,
- InputMediaPhoto(random.choice(PICS))
- )
- await query.message.edit_text(
- text=script.SUR_TXT.format(query.from_user.mention, temp.U_NAME, temp.B_NAME),
- reply_markup=reply_markup,
- parse_mode=enums.ParseMode.HTML
- )
-
- elif query.data == "start":
- buttons = [[
- InlineKeyboardButton('× ᴀᴅᴅ ᴍᴇ ᴛᴏ ʏᴏᴜʀ ɢʀᴏᴜᴘs ×', url=f'http://t.me/{temp.U_NAME}?startgroup=true')
- ], [
- InlineKeyboardButton('🔍 sᴇᴀʀᴄʜ', switch_inline_query_current_chat=''),
- InlineKeyboardButton('ᴏᴡɴ ɪɴғᴏ', url='https://t.me/oTTGArakalTheravadMovies')
- ], [
- InlineKeyboardButton('ʜᴇʟᴘ', callback_data='help'),
- InlineKeyboardButton('ᴀʙᴏᴜᴛ', callback_data='about')
- ],[
- InlineKeyboardButton('ʙᴀᴄᴋ ᴛᴏ sᴛᴀʀᴛ', callback_data='surprise')
- ]]
- reply_markup = InlineKeyboardMarkup(buttons)
- await client.edit_message_media(
- query.message.chat.id,
- query.message.id,
- InputMediaPhoto(random.choice(PICS))
- )
- await query.message.edit_text(
- text=script.START_TXT.format(query.from_user.mention, temp.U_NAME, temp.B_NAME),
- reply_markup=reply_markup,
- parse_mode=enums.ParseMode.HTML
- )
- await query.answer(MSG_ALRT)
- elif query.data == "help":
- buttons = [[
- InlineKeyboardButton('ᴍᴀɴᴜᴀʟ', callback_data='manuelfilter'),
- InlineKeyboardButton('ᴀᴜᴛᴏ', callback_data='autofilter'),
- InlineKeyboardButton('ᴄᴏɴɴᴇᴄᴛ', callback_data='coct')
- ], [
- InlineKeyboardButton('ᴇxᴛʀᴀ', callback_data='extra'),
- InlineKeyboardButton('sᴏɴɢ', callback_data='song'),
- InlineKeyboardButton('ᴛᴛs', callback_data='tts')
- ], [
- InlineKeyboardButton('ᴠɪᴅᴇᴏ', callback_data='video'),
- InlineKeyboardButton('ᴛɢʀᴀᴘʜ', callback_data='tele'),
- InlineKeyboardButton('ɴᴇxᴛ', callback_data='aswin')
- ], [
- InlineKeyboardButton('ʙᴀᴄᴋ', callback_data='start')
- ]]
- reply_markup = InlineKeyboardMarkup(buttons)
- await client.edit_message_media(
- query.message.chat.id,
- query.message.id,
- InputMediaPhoto(random.choice(PICS))
- )
- await query.message.edit_text(
- text="▣ ▢ ▢"
- )
- await query.message.edit_text(
- text="▣ ▣ ▢"
- )
- await query.message.edit_text(
- text="▣ ▣ ▣"
- )
- await query.message.edit_text(
- text=script.HELP_TXT.format(query.from_user.mention),
- reply_markup=reply_markup,
- parse_mode=enums.ParseMode.HTML
- )
- elif query.data == "aswin":
- buttons = [[
- InlineKeyboardButton('ᴀᴜᴅʙᴏᴏᴋ', callback_data='abook'),
- InlineKeyboardButton('ᴄᴏᴠɪᴅ', callback_data='corona'),
- InlineKeyboardButton('ɢᴀᴍᴇs', callback_data='fun')
- ], [
- InlineKeyboardButton('ᴘɪɴɢ', callback_data='pings'),
- InlineKeyboardButton('ᴊsᴏɴᴇ', callback_data='json'),
- InlineKeyboardButton('sᴛɪᴄᴋɪᴅ', callback_data='sticker')
- ], [
- InlineKeyboardButton('ᴡʜᴏɪs', callback_data='whois'),
- InlineKeyboardButton('ᴜʀʟsʜᴏʀᴛ', callback_data='urlshort'),
- InlineKeyboardButton('ɴᴇxᴛ', callback_data='aswins')
- ], [
- InlineKeyboardButton('ʙᴀᴄᴋ', callback_data='help')
- ]]
- reply_markup = InlineKeyboardMarkup(buttons)
- await client.edit_message_media(
- query.message.chat.id,
- query.message.id,
- InputMediaPhoto(random.choice(PICS))
- )
- await query.message.edit_text(
- text="▣ ▢ ▢"
- )
- await query.message.edit_text(
- text="▣ ▣ ▢"
- )
- await query.message.edit_text(
- text="▣ ▣ ▣"
- )
- await query.message.edit_text(
- text=script.HELP_TXT.format(query.from_user.mention),
- reply_markup=reply_markup,
- parse_mode=enums.ParseMode.HTML
- )
- elif query.data == "aswins":
- buttons = [[
- InlineKeyboardButton('ғᴏɴᴛ', callback_data='font'),
- InlineKeyboardButton('ɢᴛʀᴀɴs', callback_data='gtrans'),
- InlineKeyboardButton('ᴄᴀʀʙᴏɴ', callback_data='carb'),
- ], [
- InlineKeyboardButton('ᴄᴏᴜɴᴛʀʏ', callback_data='country'),
- InlineKeyboardButton('ᴅᴇᴘʟᴏʏ', callback_data='deploy'),
- InlineKeyboardButton('ʜᴏᴍᴇ', callback_data='start')
- ], [
- InlineKeyboardButton('ʙᴀᴄᴋ', callback_data='aswin')
- ]]
- reply_markup = InlineKeyboardMarkup(buttons)
- await client.edit_message_media(
- query.message.chat.id,
- query.message.id,
- InputMediaPhoto(random.choice(PICS))
- )
- await query.message.edit_text(
- text="▣ ▢ ▢"
- )
- await query.message.edit_text(
- text="▣ ▣ ▢"
- )
- await query.message.edit_text(
- text="▣ ▣ ▣"
- )
- await query.message.edit_text(
- text=script.HELP_TXT.format(query.from_user.mention),
- reply_markup=reply_markup,
- parse_mode=enums.ParseMode.HTML
- )
- elif query.data == "about":
- buttons = [[
- InlineKeyboardButton('sᴛᴀᴛᴜs', callback_data='stats'),
- InlineKeyboardButton('sᴏᴜʀᴄᴇ', callback_data='source')
- ], [
- InlineKeyboardButton('ʜᴏᴍᴇ', callback_data='start'),
- InlineKeyboardButton('ᴄʟᴏsᴇ', callback_data='close_data')
- ]]
- reply_markup = InlineKeyboardMarkup(buttons)
- await client.edit_message_media(
- query.message.chat.id,
- query.message.id,
- InputMediaPhoto(random.choice(PICS))
- )
- await query.message.edit_text(
- text=script.ABOUT_TXT.format(temp.B_NAME),
- reply_markup=reply_markup,
- parse_mode=enums.ParseMode.HTML
- )
- elif query.data == "source":
- buttons = [[
- InlineKeyboardButton('ʀᴇᴘᴏ', url='https://github.com/Devil-Botz/Elsa'),
- InlineKeyboardButton('ʙᴀᴄᴋ', callback_data='about')
- ]]
- reply_markup = InlineKeyboardMarkup(buttons)
- await query.message.edit_text(
- text=script.SOURCE_TXT,
- reply_markup=reply_markup,
- parse_mode=enums.ParseMode.HTML
- )
- elif query.data == "manuelfilter":
- buttons = [[
- InlineKeyboardButton('ʙᴀᴄᴋ', callback_data='help'),
- InlineKeyboardButton('ʙᴜᴛᴛᴏɴs', callback_data='button')
- ]]
- reply_markup = InlineKeyboardMarkup(buttons)
- await query.message.edit_text(
- text=script.MANUELFILTER_TXT,
- reply_markup=reply_markup,
- parse_mode=enums.ParseMode.HTML
- )
- elif query.data == "button":
- buttons = [[
- InlineKeyboardButton('ʙᴀᴄᴋ', callback_data='manuelfilter')
- ]]
- reply_markup = InlineKeyboardMarkup(buttons)
- await query.message.edit_text(
- text=script.BUTTON_TXT,
- reply_markup=reply_markup,
- parse_mode=enums.ParseMode.HTML
- )
- elif query.data == "autofilter":
- buttons = [[
- InlineKeyboardButton('ʙᴀᴄᴋ', callback_data='help')
- ]]
- reply_markup = InlineKeyboardMarkup(buttons)
- await query.message.edit_text(
- text=script.AUTOFILTER_TXT,
- reply_markup=reply_markup,
- parse_mode=enums.ParseMode.HTML
- )
- elif query.data == "coct":
- buttons = [[
- InlineKeyboardButton('ʙᴀᴄᴋ', callback_data='help')
- ]]
- reply_markup = InlineKeyboardMarkup(buttons)
- await query.message.edit_text(
- text=script.CONNECTION_TXT,
- reply_markup=reply_markup,
- parse_mode=enums.ParseMode.HTML
- )
- elif query.data == "extra":
- buttons = [[
- InlineKeyboardButton('ʙᴀᴄᴋ', callback_data='help'),
- InlineKeyboardButton('ᴀᴅᴍɪɴ', callback_data='admin')
- ]]
- reply_markup = InlineKeyboardMarkup(buttons)
- await query.message.edit_text(
- text=script.EXTRAMOD_TXT,
- reply_markup=reply_markup,
- parse_mode=enums.ParseMode.HTML
- )
- elif query.data == "admin":
- buttons = [[
- InlineKeyboardButton('ʙᴀᴄᴋ', callback_data='extra')
- ]]
- reply_markup = InlineKeyboardMarkup(buttons)
- await query.message.edit_text(
- text=script.ADMIN_TXT,
- reply_markup=reply_markup,
- parse_mode=enums.ParseMode.HTML
- )
- elif query.data == "song":
- buttons = [[
- InlineKeyboardButton('ʙᴀᴄᴋ', callback_data='help')
- ]]
- reply_markup = InlineKeyboardMarkup(buttons)
- await query.message.edit_text(
- text=script.SONG_TXT,
- reply_markup=reply_markup,
- parse_mode=enums.ParseMode.HTML
- )
- elif query.data == "video":
- buttons = [[
- InlineKeyboardButton('ʙᴀᴄᴋ', callback_data='help')
- ]]
- reply_markup = InlineKeyboardMarkup(buttons)
- await query.message.edit_text(
- text=script.VIDEO_TXT,
- reply_markup=reply_markup,
- parse_mode=enums.ParseMode.HTML
- )
- elif query.data == "tts":
- buttons = [[
- InlineKeyboardButton('ʙᴀᴄᴋ', callback_data='help')
- ]]
- reply_markup = InlineKeyboardMarkup(buttons)
- await query.message.edit_text(
- text=script.TTS_TXT,
- reply_markup=reply_markup,
- parse_mode=enums.ParseMode.HTML
- )
- elif query.data == "gtrans":
- buttons = [[
- InlineKeyboardButton('ʙᴀᴄᴋ', callback_data='aswins'),
- InlineKeyboardButton('𝙻𝙰𝙽𝙶 𝙲𝙾𝙳𝙴𝚂', url='https://cloud.google.com/translate/docs/languages')
- ]]
- reply_markup = InlineKeyboardMarkup(buttons)
- await query.message.edit_text(
- text=script.GTRANS_TXT,
- disable_web_page_preview=True,
- reply_markup=reply_markup,
- parse_mode=enums.ParseMode.HTML
- )
- elif query.data == "country":
- buttons = [[
- InlineKeyboardButton('ʙᴀᴄᴋ', callback_data='aswins'),
- ]]
- reply_markup = InlineKeyboardMarkup(buttons)
- await query.message.edit_text(
- text=script.CON_TXT,
- disable_web_page_preview=True,
- reply_markup=reply_markup,
- parse_mode=enums.ParseMode.HTML
- )
- elif query.data == "tele":
- buttons = [[
- InlineKeyboardButton('ʙᴀᴄᴋ', callback_data='help')
- ]]
- reply_markup = InlineKeyboardMarkup(buttons)
- await query.message.edit_text(
- text=script.TELE_TXT,
- reply_markup=reply_markup,
- parse_mode=enums.ParseMode.HTML
- )
- elif query.data == "corona":
- buttons = [[
- InlineKeyboardButton('ʙᴀᴄᴋ', callback_data='aswin')
- ]]
- reply_markup = InlineKeyboardMarkup(buttons)
- await query.message.edit_text(
- text=script.CORONA_TXT,
- disable_web_page_preview=True,
- reply_markup=reply_markup,
- parse_mode=enums.ParseMode.HTML
- )
- elif query.data == "abook":
- buttons = [[
- InlineKeyboardButton('ʙᴀᴄᴋ', callback_data='aswin')
- ]]
- reply_markup = InlineKeyboardMarkup(buttons)
- await query.message.edit_text(
- text=script.ABOOK_TXT,
- disable_web_page_preview=True,
- reply_markup=reply_markup,
- parse_mode=enums.ParseMode.HTML
- )
- elif query.data == "deploy":
- buttons = [[
- InlineKeyboardButton('ʀᴇᴘᴏ', url='https://github.com/Devil-Botz/Elsa'),
- InlineKeyboardButton('ᴏᴡɴᴇʀ', url='https://t.me/ARAKAL_THERAVAD_GROUP_LINKS')
- ], [
- InlineKeyboardButton('ʙᴀᴄᴋ', callback_data='aswin')
- ]]
- reply_markup = InlineKeyboardMarkup(buttons)
- await query.message.edit_text(
- text=script.DEPLOY_TXT,
- reply_markup=reply_markup,
- parse_mode=enums.ParseMode.HTML
- )
- elif query.data == "sticker":
- buttons = [[
- InlineKeyboardButton('ʙᴀᴄᴋ', callback_data='aswin')
- ]]
- reply_markup = InlineKeyboardMarkup(buttons)
- await query.message.edit_text(
- text=script.STICKER_TXT,
- disable_web_page_preview=True,
- reply_markup=reply_markup,
- parse_mode=enums.ParseMode.HTML
- )
- elif query.data == "pings":
- buttons = [[
- InlineKeyboardButton('ʙᴀᴄᴋ', callback_data='aswin')
- ]]
- reply_markup = InlineKeyboardMarkup(buttons)
- await query.message.edit_text(
- text=script.PINGS_TXT,
- reply_markup=reply_markup,
- parse_mode=enums.ParseMode.HTML
- )
- elif query.data == "json":
- buttons = [[
- InlineKeyboardButton('ʙᴀᴄᴋ', callback_data='help')
- ]]
- reply_markup = InlineKeyboardMarkup(buttons)
- await query.message.edit_text(
- text=script.JSON_TXT,
- reply_markup=reply_markup,
- parse_mode=enums.ParseMode.HTML
- )
- elif query.data == "urlshort":
- buttons = [[
- InlineKeyboardButton('ʙᴀᴄᴋ', callback_data='aswin')
- ]]
- reply_markup = InlineKeyboardMarkup(buttons)
- await query.message.edit_text(
- text=script.URLSHORT_TXT,
- disable_web_page_preview=True,
- reply_markup=reply_markup,
- parse_mode=enums.ParseMode.HTML
- )
- elif query.data == "whois":
- buttons = [[
- InlineKeyboardButton('ʙᴀᴄᴋ', callback_data='aswin')
- ]]
- reply_markup = InlineKeyboardMarkup(buttons)
- await query.message.edit_text(
- text=script.WHOIS_TXT,
- reply_markup=reply_markup,
- parse_mode=enums.ParseMode.HTML
- )
- elif query.data == "font":
- buttons = [[
- InlineKeyboardButton('ʙᴀᴄᴋ', callback_data='aswins')
- ]]
- reply_markup = InlineKeyboardMarkup(buttons)
- await query.message.edit_text(
- text=script.FONT_TXT,
- reply_markup=reply_markup,
- parse_mode=enums.ParseMode.HTML
- )
- elif query.data == "carb":
- buttons = [[
- InlineKeyboardButton('ʙᴀᴄᴋ', callback_data='aswins')
- ]]
- reply_markup = InlineKeyboardMarkup(buttons)
- await query.message.edit_text(
- text=script.CARB_TXT,
- reply_markup=reply_markup,
- parse_mode=enums.ParseMode.HTML
- )
- elif query.data == "fun":
- buttons = [[
- InlineKeyboardButton('ʙᴀᴄᴋ', callback_data='aswin')
- ]]
- reply_markup = InlineKeyboardMarkup(buttons)
- await query.message.edit_text(
- text=script.FUN_TXT,
- reply_markup=reply_markup,
- parse_mode=enums.ParseMode.HTML
- )
- elif query.data == "stats":
- buttons = [[
- InlineKeyboardButton('ʙᴀᴄᴋ', callback_data='start'),
- InlineKeyboardButton('ʀᴇғʀᴇsʜ', callback_data='rfrsh')
- ]]
- await client.edit_message_media(
- query.message.chat.id,
- query.message.id,
- InputMediaPhoto(random.choice(PICS))
- )
- reply_markup = InlineKeyboardMarkup(buttons)
- total = await Media.count_documents()
- users = await db.total_users_count()
- chats = await db.total_chat_count()
- monsize = await db.get_db_size()
- free = 536870912 - monsize
- monsize = get_size(monsize)
- free = get_size(free)
- await query.message.edit_text(
- text=script.STATUS_TXT.format(total, users, chats, monsize, free),
- reply_markup=reply_markup,
- parse_mode=enums.ParseMode.HTML
- )
- elif query.data == "rfrsh":
- await query.answer("𝙁𝙚𝙩𝙘𝙝𝙞𝙣𝙜 𝙈𝙤𝙣𝙜𝙤𝘿𝙗 𝘿𝙖𝙩𝙖𝘽𝙖𝙨𝙚")
- buttons = [[
- InlineKeyboardButton('ʙᴀᴄᴋ', callback_data='stats'),
- InlineKeyboardButton('ʀᴇғʀᴇsʜ', callback_data='rfrsh')
- ]]
- await client.edit_message_media(
- query.message.chat.id,
- query.message.id,
- InputMediaPhoto(random.choice(PICS))
- )
- reply_markup = InlineKeyboardMarkup(buttons)
- total = await Media.count_documents()
- users = await db.total_users_count()
- chats = await db.total_chat_count()
- monsize = await db.get_db_size()
- free = 536870912 - monsize
- monsize = get_size(monsize)
- free = get_size(free)
- await query.message.edit_text(
- text=script.STATUS_TXT.format(total, users, chats, monsize, free),
- reply_markup=reply_markup,
- parse_mode=enums.ParseMode.HTML
- )
- elif query.data.startswith("setgs"):
- ident, set_type, status, grp_id = query.data.split("#")
- grpid = await active_connection(str(query.from_user.id))
-
- if str(grp_id) != str(grpid):
- await query.message.edit("Your Active Connection Has Been Changed. Go To /settings.")
- return await query.answer(MSG_ALRT)
-
- if status == "True":
- await save_group_settings(grpid, set_type, False)
- else:
- await save_group_settings(grpid, set_type, True)
-
- settings = await get_settings(grpid)
- try:
- if settings['auto_delete']:
- settings = await get_settings(grp_id)
- except KeyError:
- await save_group_settings(grp_id, 'auto_delete', True)
- settings = await get_settings(grp_id)
-
- if settings is not None:
- buttons = [
- [
- InlineKeyboardButton('Filter Button',
- callback_data=f'setgs#button#{settings["button"]}#{str(grp_id)}'),
- InlineKeyboardButton('Single' if settings["button"] else 'Double',
- callback_data=f'setgs#button#{settings["button"]}#{str(grp_id)}')
- ],
- [
- InlineKeyboardButton('Redirect To', callback_data=f'setgs#botpm#{settings["botpm"]}#{str(grp_id)}'),
- InlineKeyboardButton('Bot PM' if settings["botpm"] else 'Channel',
- callback_data=f'setgs#botpm#{settings["botpm"]}#{str(grp_id)}')
- ],
- [
- InlineKeyboardButton('File Secure',
- callback_data=f'setgs#file_secure#{settings["file_secure"]}#{str(grp_id)}'),
- InlineKeyboardButton('✅ Yes' if settings["file_secure"] else '❌ No',
- callback_data=f'setgs#file_secure#{settings["file_secure"]}#{str(grp_id)}')
- ],
- [
- InlineKeyboardButton('IMDB', callback_data=f'setgs#imdb#{settings["imdb"]}#{str(grp_id)}'),
- InlineKeyboardButton('✅ Yes' if settings["imdb"] else '❌ No',
- callback_data=f'setgs#imdb#{settings["imdb"]}#{str(grp_id)}')
- ],
- [
- InlineKeyboardButton('Spell Check',
- callback_data=f'setgs#spell_check#{settings["spell_check"]}#{str(grp_id)}'),
- InlineKeyboardButton('✅ Yes' if settings["spell_check"] else '❌ No',
- callback_data=f'setgs#spell_check#{settings["spell_check"]}#{str(grp_id)}')
- ],
- [
- InlineKeyboardButton('Welcome', callback_data=f'setgs#welcome#{settings["welcome"]}#{str(grp_id)}'),
- InlineKeyboardButton('✅ Yes' if settings["welcome"] else '❌ No',
- callback_data=f'setgs#welcome#{settings["welcome"]}#{str(grp_id)}')
- ],
- [
- InlineKeyboardButton('Auto Delete',
- callback_data=f'setgs#auto_delete#{settings["auto_delete"]}#{str(grp_id)}'),
- InlineKeyboardButton('10 Mins' if settings["auto_delete"] else 'OFF',
- callback_data=f'setgs#auto_delete#{settings["auto_delete"]}#{str(grp_id)}')
- ],
- [
- InlineKeyboardButton('ShortLink',
- callback_data=f'setgs#is_shortlink#{settings["is_shortlink"]}#{str(grp_id)}'),
- InlineKeyboardButton('✅ ON' if settings["is_shortlink"] else '❌ OFF',
- callback_data=f'setgs#is_shortlink#{settings["is_shortlink"]}#{str(grp_id)}')
- ],
- [
- InlineKeyboardButton("Close", callback_data="close_data")
- ]
-
- ]
- reply_markup = InlineKeyboardMarkup(buttons)
- await query.message.edit_reply_markup(reply_markup)
- await query.answer(MSG_ALRT)
-
-
-async def auto_filter(client, msg, spoll=False):
- reqstr1 = msg.from_user.id if msg.from_user else 0
- reqstr = await client.get_users(reqstr1)
- if not spoll:
- message = msg
- settings = await get_settings(message.chat.id)
- if message.text.startswith("/"): return # ignore commands
- if re.findall("((^\/|^,|^!|^\.|^[\U0001F600-\U000E007F]).*)", message.text):
- return
- if len(message.text) < 100:
- search = message.text
- files, offset, total_results = await get_search_results(search.lower(), offset=0, filter=True)
- if not files:
- if settings["spell_check"]:
- return await advantage_spell_chok(client, msg)
- else:
- await client.send_message(chat_id=LOG_CHANNEL, text=(script.NORSLTS.format(reqstr.id, reqstr.mention, search)))
- return
- else:
- return
- else:
- message = msg.message.reply_to_message # msg will be callback query
- search, files, offset, total_results = spoll
- settings = await get_settings(message.chat.id)
- if 'is_shortlink' in settings.keys():
- ENABLE_SHORTLINK = settings['is_shortlink']
- else:
- await save_group_settings(message.chat.id, 'is_shortlink', False)
- ENABLE_SHORTLINK = False
- pre = 'filep' if settings['file_secure'] else 'file'
- if ENABLE_SHORTLINK == True:
- if settings["button"]:
- btn = [
- [
- InlineKeyboardButton(
- text=f"[{get_size(file.file_size)}] {file.file_name}", url=await get_shortlink(message.chat.id, f"https://telegram.me/{temp.U_NAME}?start=files_{file.file_id}")
- ),
- ]
- for file in files
- ]
- else:
- btn = [
- [
- InlineKeyboardButton(
- text=f"{file.file_name}",
- url=await get_shortlink(message.chat.id, f"https://telegram.me/{temp.U_NAME}?start=files_{file.file_id}")
- ),
- InlineKeyboardButton(
- text=f"{get_size(file.file_size)}",
- url=await get_shortlink(message.chat.id, f"https://telegram.me/{temp.U_NAME}?start=files_{file.file_id}")
- ),
- ]
- for file in files
- ]
- else:
- if settings["button"]:
- btn = [
- [
- InlineKeyboardButton(
- text=f"[{get_size(file.file_size)}] {file.file_name}", callback_data=f'{pre}#{file.file_id}'
- ),
- ]
- for file in files
- ]
- else:
- btn = [
- [
- InlineKeyboardButton(
- text=f"{file.file_name}",
- callback_data=f'{pre}#{file.file_id}',
- ),
- InlineKeyboardButton(
- text=f"{get_size(file.file_size)}",
- callback_data=f'{pre}#{file.file_id}',
- ),
- ]
- for file in files
- ]
- try:
- if settings['auto_delete']:
- btn.insert(0,
- [
- InlineKeyboardButton(f'😇 Info', 'tips'),
- InlineKeyboardButton(f'📝 𝖳𝗂𝗉𝗌', 'info')
- ]
- )
-
- else:
- btn.insert(0,
- [
- InlineKeyboardButton(f'😇 Info', 'tips'),
- InlineKeyboardButton(f'📝 𝖳𝗂𝗉𝗌', 'info')
- ]
- )
-
- except KeyError:
- grpid = await active_connection(str(query.message.from_user.id))
- await save_group_settings(grpid, 'auto_delete', True)
- settings = await get_settings(query.message.chat.id)
- if settings['auto_delete']:
- btn.insert(0,
- [
- InlineKeyboardButton(f'😇 Info', 'tips'),
- InlineKeyboardButton(f'📝 𝖳𝗂𝗉𝗌', 'info')
- ]
- )
-
- else:
- btn.insert(0,
- [
- InlineKeyboardButton(f'😇 Info', 'tips'),
- InlineKeyboardButton(f'📝 𝖳𝗂𝗉𝗌', 'info')
- ]
- )
- try:
- settings = await get_settings(query.message.chat.id)
- if settings['max_btn']:
- if 0 < offset <= 10:
- off_set = 0
- elif offset == 0:
- off_set = None
- else:
- off_set = offset - 10
- if n_offset == 0:
- btn.append(
- [InlineKeyboardButton("◀️ 𝖡𝖠𝖢𝖪", callback_data=f"next_{req}_{key}_{off_set}"), InlineKeyboardButton(f"{math.ceil(int(offset)/10)+1} / {math.ceil(total/10)}", callback_data="pages")]
- )
- elif off_set is None:
- btn.append([InlineKeyboardButton("📃", callback_data="pages"), InlineKeyboardButton(f"{math.ceil(int(offset)/10)+1} / {math.ceil(total/10)}", callback_data="pages"), InlineKeyboardButton("𝖭𝖤𝖷𝖳 ▶️", callback_data=f"next_{req}_{key}_{n_offset}")])
- else:
- btn.append(
- [
- InlineKeyboardButton("◀️ 𝖡𝖠𝖢𝖪", callback_data=f"next_{req}_{key}_{off_set}"),
- InlineKeyboardButton(f"{math.ceil(int(offset)/10)+1} / {math.ceil(total/10)}", callback_data="pages"),
- InlineKeyboardButton("𝖭𝖤𝖷𝖳 ▶️", callback_data=f"next_{req}_{key}_{n_offset}")
- ],
- )
- else:
- if 0 < offset <= int(MAX_B_TN):
- off_set = 0
- elif offset == 0:
- off_set = None
- else:
- off_set = offset - int(MAX_B_TN)
- if n_offset == 0:
- btn.append(
- [InlineKeyboardButton("◀️ 𝖡𝖠𝖢𝖪", callback_data=f"next_{req}_{key}_{off_set}"), InlineKeyboardButton(f"{math.ceil(int(offset)/int(MAX_B_TN))+1} / {math.ceil(total/int(MAX_B_TN))}", callback_data="pages")]
- )
- elif off_set is None:
- btn.append([InlineKeyboardButton("📃", callback_data="pages"), InlineKeyboardButton(f"{math.ceil(int(offset)/int(MAX_B_TN))+1} / {math.ceil(total/int(MAX_B_TN))}", callback_data="pages"), InlineKeyboardButton("𝖭𝖤𝖷𝖳 ▶️", callback_data=f"next_{req}_{key}_{n_offset}")])
- else:
- btn.append(
- [
- InlineKeyboardButton("◀️ 𝖡𝖠𝖢𝖪", callback_data=f"next_{req}_{key}_{off_set}"),
- InlineKeyboardButton(f"{math.ceil(int(offset)/int(MAX_B_TN))+1} / {math.ceil(total/int(MAX_B_TN))}", callback_data="pages"),
- InlineKeyboardButton("𝖭𝖤𝖷𝖳 ▶️", callback_data=f"next_{req}_{key}_{n_offset}")
- ],
- )
- except KeyError:
- await save_group_settings(query.message.chat.id, 'max_btn', False)
- settings = await get_settings(query.message.chat.id)
- if settings['max_btn']:
- if 0 < offset <= 10:
- off_set = 0
- elif offset == 0:
- off_set = None
- else:
- off_set = offset - 10
- if n_offset == 0:
- btn.append(
- [InlineKeyboardButton("◀️ 𝖡𝖠𝖢𝖪", callback_data=f"next_{req}_{key}_{off_set}"), InlineKeyboardButton(f"{math.ceil(int(offset)/10)+1} / {math.ceil(total/10)}", callback_data="pages")]
- )
- elif off_set is None:
- btn.append([InlineKeyboardButton("📃", callback_data="pages"), InlineKeyboardButton(f"{math.ceil(int(offset)/10)+1} / {math.ceil(total/10)}", callback_data="pages"), InlineKeyboardButton("𝖭𝖤𝖷𝖳 ▶️", callback_data=f"next_{req}_{key}_{n_offset}")])
- else:
- btn.append(
- [
- InlineKeyboardButton("◀️ 𝖡𝖠𝖢𝖪", callback_data=f"next_{req}_{key}_{off_set}"),
- InlineKeyboardButton(f"{math.ceil(int(offset)/10)+1} / {math.ceil(total/10)}", callback_data="pages"),
- InlineKeyboardButton("𝖭𝖤𝖷𝖳 ▶️", callback_data=f"next_{req}_{key}_{n_offset}")
- ],
- )
- else:
- if 0 < offset <= int(MAX_B_TN):
- off_set = 0
- elif offset == 0:
- off_set = None
- else:
- off_set = offset - int(MAX_B_TN)
- if n_offset == 0:
- btn.append(
- [InlineKeyboardButton("◀️ 𝖡𝖠𝖢𝖪", callback_data=f"next_{req}_{key}_{off_set}"), InlineKeyboardButton(f"{math.ceil(int(offset)/int(MAX_B_TN))+1} / {math.ceil(total/int(MAX_B_TN))}", callback_data="pages")]
- )
- elif off_set is None:
- btn.append([InlineKeyboardButton("📃", callback_data="pages"), InlineKeyboardButton(f"{math.ceil(int(offset)/int(MAX_B_TN))+1} / {math.ceil(total/int(MAX_B_TN))}", callback_data="pages"), InlineKeyboardButton("𝖭𝖤𝖷𝖳 ▶️", callback_data=f"next_{req}_{key}_{n_offset}")])
- else:
- btn.append(
- [
- InlineKeyboardButton("◀️ 𝖡𝖠𝖢𝖪", callback_data=f"next_{req}_{key}_{off_set}"),
- InlineKeyboardButton(f"{math.ceil(int(offset)/int(MAX_B_TN))+1} / {math.ceil(total/int(MAX_B_TN))}", callback_data="pages"),
- InlineKeyboardButton("𝖭𝖤𝖷𝖳 ▶️", callback_data=f"next_{req}_{key}_{n_offset}")
- ],
- )
- btn.insert(0, [
- InlineKeyboardButton(f'🎬 {search} 🎬', 'rkbtn')
- ])
- btn.insert(2, [
- InlineKeyboardButton("📤 𝖲𝖾𝗇𝖽 𝖠𝗅𝗅 𝖥𝗂𝗅𝖾𝗌 📤", callback_data=f"send_all#{req}#{key}#{pre}")
- ])
- try:
- await query.edit_message_reply_markup(
- reply_markup=InlineKeyboardMarkup(btn)
- )
- except MessageNotModified:
- pass
- await query.answer()
-
- imdb = await get_poster(search, file=(files[0]).file_name) if settings["imdb"] else None
- TEMPLATE = settings['template']
- if imdb:
- cap = TEMPLATE.format(
- query=search,
- title=imdb['title'],
- votes=imdb['votes'],
- aka=imdb["aka"],
- seasons=imdb["seasons"],
- box_office=imdb['box_office'],
- localized_title=imdb['localized_title'],
- kind=imdb['kind'],
- imdb_id=imdb["imdb_id"],
- cast=imdb["cast"],
- runtime=imdb["runtime"],
- countries=imdb["countries"],
- certificates=imdb["certificates"],
- languages=imdb["languages"],
- director=imdb["director"],
- writer=imdb["writer"],
- producer=imdb["producer"],
- composer=imdb["composer"],
- cinematographer=imdb["cinematographer"],
- music_team=imdb["music_team"],
- distributors=imdb["distributors"],
- release_date=imdb['release_date'],
- year=imdb['year'],
- genres=imdb['genres'],
- poster=imdb['poster'],
- plot=imdb['plot'],
- rating=imdb['rating'],
- url=imdb['url'],
- **locals()
- )
- else:
- Hai 👋 {message.from_user.mention} 😍\n📁 𝗙𝗼𝘂𝗻𝗱 ✨ 𝗙𝗶𝗹𝗲𝘀 𝗙𝗼𝗿 𝗬𝗼𝘂𝗿 𝗤𝘂𝗲𝗿𝘆 : #{search}👇🏻"
- if imdb and imdb.get('poster'):
- try:
- if message.chat.id == SUPPORT_CHAT_ID:
- await message.reply_text(f"Hᴇʏ {message.from_user.mention}, {str(total_results)} ʀᴇsᴜʟᴛs ᴀʀᴇ ғᴏᴜɴᴅ ɪɴ ᴍʏ ᴅᴀᴛᴀʙᴀsᴇ ғᴏʀ ʏᴏᴜʀ ᴏ̨ᴜᴇʀʏ {search}. Kɪɴᴅʟʏ ᴜsᴇ ɪɴʟɪɴᴇ sᴇᴀʀᴄʜ ᴏʀ ᴍᴀᴋᴇ ᴀ ɢʀᴏᴜᴘ ᴀɴᴅ ᴀᴅᴅ ᴍᴇ ᴀs ᴀᴅᴍɪɴ ᴛᴏ ɢᴇᴛ ᴍᴏᴠɪᴇ ғɪʟᴇs. Tʜɪs ɪs ᴀ sᴜᴘᴘᴏʀᴛ ɢʀᴏᴜᴘ sᴏ ᴛʜᴀᴛ ʏᴏᴜ ᴄᴀɴ'ᴛ ɢᴇᴛ ғɪʟᴇs ғʀᴏᴍ ʜᴇʀᴇ...")
- else:
- hehe = await message.reply_photo(photo=imdb.get('poster'), caption=cap[:1024], reply_markup=InlineKeyboardMarkup(btn))
- try:
- if settings['auto_delete']:
- await asyncio.sleep(600)
- await hehe.delete()
- await message.delete()
- await message.reply(f"Hey {message.from_user.mention} \n\nYour Request Has Been Deleted 👍 \n(Due To Avoid Copyrights Issue😌)\n\nIF YOU WANT THAT FILE, REQUEST AGAIN ❤️")
- except KeyError:
- grpid = await active_connection(str(message.from_user.id))
- await save_group_settings(grpid, 'auto_delete', True)
- settings = await get_settings(message.chat.id)
- if settings['auto_delete']:
- await asyncio.sleep(600)
- await hehe.delete()
- await message.delete()
- await message.reply(f"Hey {message.from_user.mention} \n\nYour Request Has Been Deleted 👍 \n(Due To Avoid Copyrights Issue😌)\n\nIF YOU WANT THAT FILE, REQUEST AGAIN ❤️")
- except (MediaEmpty, PhotoInvalidDimensions, WebpageMediaEmpty):
- if message.chat.id == SUPPORT_CHAT_ID:
- await message.reply_text(f"Hᴇʏ {message.from_user.mention}, {str(total_results)} ʀᴇsᴜʟᴛs ᴀʀᴇ ғᴏᴜɴᴅ ɪɴ ᴍʏ ᴅᴀᴛᴀʙᴀsᴇ ғᴏʀ ʏᴏᴜʀ ᴏ̨ᴜᴇʀʏ {search}. Kɪɴᴅʟʏ ᴜsᴇ ɪɴʟɪɴᴇ sᴇᴀʀᴄʜ ᴏʀ ᴍᴀᴋᴇ ᴀ ɢʀᴏᴜᴘ ᴀɴᴅ ᴀᴅᴅ ᴍᴇ ᴀs ᴀᴅᴍɪɴ ᴛᴏ ɢᴇᴛ ᴍᴏᴠɪᴇ ғɪʟᴇs. Tʜɪs ɪs ᴀ sᴜᴘᴘᴏʀᴛ ɢʀᴏᴜᴘ sᴏ ᴛʜᴀᴛ ʏᴏᴜ ᴄᴀɴ'ᴛ ɢᴇᴛ ғɪʟᴇs ғʀᴏᴍ ʜᴇʀᴇ...")
- else:
- pic = imdb.get('poster')
- poster = pic.replace('.jpg', "._V1_UX360.jpg")
- hmm = await message.reply_photo(photo=poster, caption=cap[:1024], reply_markup=InlineKeyboardMarkup(btn))
- try:
- if settings['auto_delete']:
- await asyncio.sleep(600)
- await hmm.delete()
- await message.delete()
- await message.reply(f"Hey {message.from_user.mention} \n\nYour Request Has Been Deleted 👍 \n(Due To Avoid Copyrights Issue😌)\n\nIF YOU WANT THAT FILE, REQUEST AGAIN ❤️")
- except KeyError:
- grpid = await active_connection(str(message.from_user.id))
- await save_group_settings(grpid, 'auto_delete', True)
- settings = await get_settings(message.chat.id)
- if settings['auto_delete']:
- await asyncio.sleep(600)
- await hmm.delete()
- await message.delete()
- await message.reply(f"Hey {message.from_user.mention} \n\nYour Request Has Been Deleted 👍 \n(Due To Avoid Copyrights Issue😌)\n\nIF YOU WANT THAT FILE, REQUEST AGAIN ❤️")
- except Exception as e:
- if message.chat.id == SUPPORT_CHAT_ID:
- await message.reply_text(f"Hᴇʏ {message.from_user.mention}, {str(total_results)} ʀᴇsᴜʟᴛs ᴀʀᴇ ғᴏᴜɴᴅ ɪɴ ᴍʏ ᴅᴀᴛᴀʙᴀsᴇ ғᴏʀ ʏᴏᴜʀ ᴏ̨ᴜᴇʀʏ {search}. Kɪɴᴅʟʏ ᴜsᴇ ɪɴʟɪɴᴇ sᴇᴀʀᴄʜ ᴏʀ ᴍᴀᴋᴇ ᴀ ɢʀᴏᴜᴘ ᴀɴᴅ ᴀᴅᴅ ᴍᴇ ᴀs ᴀᴅᴍɪɴ ᴛᴏ ɢᴇᴛ ᴍᴏᴠɪᴇ ғɪʟᴇs. Tʜɪs ɪs ᴀ sᴜᴘᴘᴏʀᴛ ɢʀᴏᴜᴘ sᴏ ᴛʜᴀᴛ ʏᴏᴜ ᴄᴀɴ'ᴛ ɢᴇᴛ ғɪʟᴇs ғʀᴏᴍ ʜᴇʀᴇ...")
- else:
- logger.exception(e)
- fek = await message.reply_photo(photo=NOR_IMG, caption=cap, reply_markup=InlineKeyboardMarkup(btn))
- try:
- if settings['auto_delete']:
- await asyncio.sleep(600)
- await fek.delete()
- await message.reply(f"Hey {message.from_user.mention} \n\nYour Request Has Been Deleted 👍 \n(Due To Avoid Copyrights Issue😌)\n\nIF YOU WANT THAT FILE, REQUEST AGAIN ❤️")
- await message.delete()
-
- except KeyError:
- grpid = await active_connection(str(message.from_user.id))
- await save_group_settings(grpid, 'auto_delete', True)
- settings = await get_settings(message.chat.id)
- if settings['auto_delete']:
- await asyncio.sleep(600)
- await fek.delete()
- await message.reply(f"Hey {message.from_user.mention} \n\nYour Request Has Been Deleted 👍 \n(Due To Avoid Copyrights Issue😌)\n\nIF YOU WANT THAT FILE, REQUEST AGAIN ❤️")
- await message.delete()
- else:
- if message.chat.id == SUPPORT_CHAT_ID:
- await message.reply_text(f"Hᴇʏ {message.from_user.mention}, {str(total_results)} ʀᴇsᴜʟᴛs ᴀʀᴇ ғᴏᴜɴᴅ ɪɴ ᴍʏ ᴅᴀᴛᴀʙᴀsᴇ ғᴏʀ ʏᴏᴜʀ ᴏ̨ᴜᴇʀʏ {search}. Kɪɴᴅʟʏ ᴜsᴇ ɪɴʟɪɴᴇ sᴇᴀʀᴄʜ ᴏʀ ᴍᴀᴋᴇ ᴀ ɢʀᴏᴜᴘ ᴀɴᴅ ᴀᴅᴅ ᴍᴇ ᴀs ᴀᴅᴍɪɴ ᴛᴏ ɢᴇᴛ ᴍᴏᴠɪᴇ ғɪʟᴇs. Tʜɪs ɪs ᴀ sᴜᴘᴘᴏʀᴛ ɢʀᴏᴜᴘ sᴏ ᴛʜᴀᴛ ʏᴏᴜ ᴄᴀɴ'ᴛ ɢᴇᴛ ғɪʟᴇs ғʀᴏᴍ ʜᴇʀᴇ...")
- else:
- fuk = await message.reply_photo(photo=NOR_IMG, caption=cap, reply_markup=InlineKeyboardMarkup(btn))
- try:
- if settings['auto_delete']:
- await asyncio.sleep(600)
- await fuk.delete()
- await message.reply(f"Hey {message.from_user.mention} \n\nYour Request Has Been Deleted 👍 \n(Due To Avoid Copyrights Issue😌)\n\nIF YOU WANT THAT FILE, REQUEST AGAIN ❤️")
- await message.delete()
- except KeyError:
- grpid = await active_connection(str(message.from_user.id))
- await save_group_settings(grpid, 'auto_delete', True)
- settings = await get_settings(message.chat.id)
- if settings['auto_delete']:
- await asyncio.sleep(600)
- await fuk.delete()
- await message.reply(f"Hey {message.from_user.mention} \n\nYour Request Has Been Deleted 👍 \n(Due To Avoid Copyrights Issue😌)\n\nIF YOU WANT THAT FILE, REQUEST AGAIN ❤️")
- await message.delete()
-
- if spoll:
- await msg.message.delete()
-
-
-async def advantage_spell_chok(client, msg):
- mv_id = msg.id
- mv_rqst = msg.text
- reqstr1 = msg.from_user.id if msg.from_user else 0
- reqstr = await client.get_users(reqstr1)
- settings = await get_settings(msg.chat.id)
- query = re.sub(
- r"\b(pl(i|e)*?(s|z+|ease|se|ese|(e+)s(e)?)|((send|snd|giv(e)?|gib)(\sme)?)|movie(s)?|new|latest|br((o|u)h?)*|^h(e|a)?(l)*(o)*|mal(ayalam)?|t(h)?amil|file|that|find|und(o)*|kit(t(i|y)?)?o(w)?|thar(u)?(o)*w?|kittum(o)*|aya(k)*(um(o)*)?|full\smovie|any(one)|with\ssubtitle(s)?)",
- "", msg.text, flags=re.IGNORECASE) # plis contribute some common words
- RQST = query.strip()
- query = query.strip() + " movie"
- try:
- movies = await get_poster(mv_rqst, bulk=True)
- except Exception as e:
- logger.exception(e)
- await client.send_message(chat_id=LOG_CHANNEL, text=(script.NORSLTS.format(reqstr.id, reqstr.mention, mv_rqst)))
- k = await msg.reply(script.I_CUDNT.format(reqstr.mention))
- await asyncio.sleep(8)
- await k.delete()
- return
- movielist = []
- if not movies:
- reqst_gle = mv_rqst.replace(" ", "+")
- button = [[
- InlineKeyboardButton("Gᴏᴏɢʟᴇ", url=f"https://www.google.com/search?q={reqst_gle}")
- ]]
- await client.send_message(chat_id=LOG_CHANNEL, text=(script.NORSLTS.format(reqstr.id, reqstr.mention, mv_rqst)))
- k = await msg.reply_photo(
- photo=SPELL_IMG,
- caption=script.I_CUDNT.format(mv_rqst),
- reply_markup=InlineKeyboardMarkup(button)
- )
- await asyncio.sleep(30)
- await k.delete()
- return
- movielist += [movie.get('title') for movie in movies]
- movielist += [f"{movie.get('title')} {movie.get('year')}" for movie in movies]
- SPELL_CHECK[mv_id] = movielist
- btn = [
- [
- InlineKeyboardButton(
- text=movie_name.strip(),
- callback_data=f"spol#{reqstr1}#{k}",
- )
- ]
- for k, movie_name in enumerate(movielist)
- ]
- btn.append([InlineKeyboardButton(text="Close", callback_data=f'spol#{reqstr1}#close_spellcheck')])
- spell_check_del = await msg.reply_photo(
- photo=(SPELL_IMG),
- caption=(script.CUDNT_FND.format(reqstr.mention)),
- reply_markup=InlineKeyboardMarkup(btn)
- )
-
- try:
- if settings['auto_delete']:
- await asyncio.sleep(600)
- await spell_check_del.delete()
- except KeyError:
- grpid = await active_connection(str(message.from_user.id))
- await save_group_settings(grpid, 'auto_delete', True)
- settings = await get_settings(message.chat.id)
- if settings['auto_delete']:
- await asyncio.sleep(600)
- await spell_check_del.delete()
-
-async def manual_filters(client, message, text=False):
- settings = await get_settings(message.chat.id)
- group_id = message.chat.id
- name = text or message.text
- reply_id = message.reply_to_message.id if message.reply_to_message else message.id
- keywords = await get_filters(group_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)
-
- if reply_text:
- reply_text = reply_text.replace("\\n", "\n").replace("\\t", "\t")
-
- if btn is not None:
- try:
- if fileid == "None":
- if btn == "[]":
- elsa = await client.send_message(
- group_id,
- reply_text,
- disable_web_page_preview=True,
- protect_content=True if settings["file_secure"] else False,
- reply_to_message_id=reply_id
- )
- try:
- if settings['auto_ffilter']:
- await auto_filter(client, message)
- await asyncio.sleep(600)
- await elsa.delete()
- except KeyError:
- grpid = await active_connection(str(message.from_user.id))
- await save_group_settings(grpid, 'auto_ffilter', True)
- settings = await get_settings(message.chat.id)
- if settings['auto_ffilter']:
- await auto_filter(client, message)
- try:
- if settings['auto_delete']:
- await asyncio.sleep(600)
- await elsa.delete()
- except KeyError:
- grpid = await active_connection(str(message.from_user.id))
- await save_group_settings(grpid, 'auto_delete', True)
- settings = await get_settings(message.chat.id)
- if settings['auto_delete']:
- await asyncio.sleep(600)
- await elsa.delete()
-
- else:
- button = eval(btn)
- hmm = await client.send_message(
- group_id,
- reply_text,
- disable_web_page_preview=True,
- reply_markup=InlineKeyboardMarkup(button),
- protect_content=True if settings["file_secure"] else False,
- reply_to_message_id=reply_id
- )
- try:
- if settings['auto_ffilter']:
- await auto_filter(client, message)
- except KeyError:
- grpid = await active_connection(str(message.from_user.id))
- await save_group_settings(grpid, 'auto_ffilter', True)
- settings = await get_settings(message.chat.id)
- if settings['auto_ffilter']:
- await auto_filter(client, message)
- try:
- if settings['auto_delete']:
- await asyncio.sleep(600)
- await hmm.delete()
- except KeyError:
- grpid = await active_connection(str(message.from_user.id))
- await save_group_settings(grpid, 'auto_delete', True)
- settings = await get_settings(message.chat.id)
- if settings['auto_delete']:
- await asyncio.sleep(600)
- await hmm.delete()
-
- elif btn == "[]":
- oto = await client.send_cached_media(
- group_id,
- fileid,
- caption=reply_text or "",
- protect_content=True if settings["file_secure"] else False,
- reply_to_message_id=reply_id
- )
- try:
- if settings['auto_ffilter']:
- await auto_filter(client, message)
- except KeyError:
- grpid = await active_connection(str(message.from_user.id))
- await save_group_settings(grpid, 'auto_ffilter', True)
- settings = await get_settings(message.chat.id)
- if settings['auto_ffilter']:
- await auto_filter(client, message)
- try:
- if settings['auto_delete']:
- await asyncio.sleep(600)
- await oto.delete()
- except KeyError:
- grpid = await active_connection(str(message.from_user.id))
- await save_group_settings(grpid, 'auto_delete', True)
- settings = await get_settings(message.chat.id)
- if settings['auto_delete']:
- await asyncio.sleep(600)
- await oto.delete()
-
- else:
- button = eval(btn)
- dlt = await message.reply_cached_media(
- fileid,
- caption=reply_text or "",
- reply_markup=InlineKeyboardMarkup(button),
- reply_to_message_id=reply_id
- )
- try:
- if settings['auto_ffilter']:
- await auto_filter(client, message)
- except KeyError:
- grpid = await active_connection(str(message.from_user.id))
- await save_group_settings(grpid, 'auto_ffilter', True)
- settings = await get_settings(message.chat.id)
- if settings['auto_ffilter']:
- await auto_filter(client, message)
- try:
- if settings['auto_delete']:
- await asyncio.sleep(600)
- await dlt.delete()
- except KeyError:
- grpid = await active_connection(str(message.from_user.id))
- await save_group_settings(grpid, 'auto_delete', True)
- settings = await get_settings(message.chat.id)
- if settings['auto_delete']:
- await asyncio.sleep(600)
- await dlt.delete()
-
- except Exception as e:
- logger.exception(e)
- break
- else:
- return False
-
-async def global_filters(client, message, text=False):
- settings = await get_settings(message.chat.id)
- group_id = message.chat.id
- name = text or message.text
- reply_id = message.reply_to_message.id if message.reply_to_message else message.id
- keywords = await get_gfilters('gfilters')
- 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_gfilter('gfilters', keyword)
-
- if reply_text:
- reply_text = reply_text.replace("\\n", "\n").replace("\\t", "\t")
-
- if btn is not None:
- try:
- if fileid == "None":
- if btn == "[]":
- joelkb = await client.send_message(
- group_id,
- reply_text,
- disable_web_page_preview=True,
- reply_to_message_id=reply_id
- )
-
- else:
- button = eval(btn)
- hmm = await client.send_message(
- group_id,
- reply_text,
- disable_web_page_preview=True,
- reply_markup=InlineKeyboardMarkup(button),
- reply_to_message_id=reply_id
- )
-
- elif btn == "[]":
- oto = await client.send_cached_media(
- group_id,
- fileid,
- caption=reply_text or "",
- reply_to_message_id=reply_id
- )
-
- else:
- button = eval(btn)
- dlt = await message.reply_cached_media(
- fileid,
- caption=reply_text or "",
- reply_markup=InlineKeyboardMarkup(button),
- reply_to_message_id=reply_id
- )
-
- except Exception as e:
- logger.exception(e)
- break
- else:
- return False
From 9c00666cd0def61391bc66c6b4c0722df20071b9 Mon Sep 17 00:00:00 2001
From: Soul pc <119080077+soulpc@users.noreply.github.com>
Date: Tue, 19 Dec 2023 10:58:37 +0530
Subject: [PATCH 223/237] Rename pm_filter (6).py to pm_filter.py
---
plugins/{pm_filter (6).py => pm_filter.py} | 0
1 file changed, 0 insertions(+), 0 deletions(-)
rename plugins/{pm_filter (6).py => pm_filter.py} (100%)
diff --git a/plugins/pm_filter (6).py b/plugins/pm_filter.py
similarity index 100%
rename from plugins/pm_filter (6).py
rename to plugins/pm_filter.py
From 8c6e5b97f68c8b90b140ee22e97b026cd203ef32 Mon Sep 17 00:00:00 2001
From: Soul pc <119080077+soulpc@users.noreply.github.com>
Date: Tue, 19 Dec 2023 11:26:06 +0530
Subject: [PATCH 224/237] Update pm_filter.py
---
plugins/pm_filter.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/plugins/pm_filter.py b/plugins/pm_filter.py
index 305cbc9..386a616 100644
--- a/plugins/pm_filter.py
+++ b/plugins/pm_filter.py
@@ -13,7 +13,7 @@
from info import ADMINS, AUTH_CHANNEL, FILE_CHANNEL, AUTH_USERS, CUSTOM_FILE_CAPTION, NOR_IMG, AUTH_GROUPS, \
P_TTI_SHOW_OFF, IMDB, \
SINGLE_BUTTON, SPELL_CHECK_REPLY, IMDB_TEMPLATE, SPELL_IMG, MSG_ALRT, FILE_FORWARD, MAIN_CHANNEL, LOG_CHANNEL, PICS, \
- SUPPORT_CHAT_ID, REQ_CHANNEL
+ SUPPORT_CHAT_ID
from pyrogram.types import InlineKeyboardMarkup, InlineKeyboardButton, CallbackQuery, InputMediaPhoto
from pyrogram import Client, filters, enums
from pyrogram.errors import FloodWait, UserIsBlocked, MessageNotModified, PeerIdInvalid
From 2a14d9b85dce39117e6807e7208b23b50ed8ceb0 Mon Sep 17 00:00:00 2001
From: Soul pc <119080077+soulpc@users.noreply.github.com>
Date: Tue, 19 Dec 2023 11:28:13 +0530
Subject: [PATCH 225/237] Delete plugins/pm_filter.py
---
plugins/pm_filter.py | 1974 ------------------------------------------
1 file changed, 1974 deletions(-)
delete mode 100644 plugins/pm_filter.py
diff --git a/plugins/pm_filter.py b/plugins/pm_filter.py
deleted file mode 100644
index 386a616..0000000
--- a/plugins/pm_filter.py
+++ /dev/null
@@ -1,1974 +0,0 @@
-# Kanged From @TroJanZheX
-# REDIRECT added https://github.com/Joelkb
-import asyncio
-import re
-import ast
-import math
-import random
-from pyrogram.errors.exceptions.bad_request_400 import MediaEmpty, PhotoInvalidDimensions, WebpageMediaEmpty
-from Script import script
-import pyrogram
-from database.connections_mdb import active_connection, all_connections, delete_connection, if_active, make_active, \
- make_inactive
-from info import ADMINS, AUTH_CHANNEL, FILE_CHANNEL, AUTH_USERS, CUSTOM_FILE_CAPTION, NOR_IMG, AUTH_GROUPS, \
- P_TTI_SHOW_OFF, IMDB, \
- SINGLE_BUTTON, SPELL_CHECK_REPLY, IMDB_TEMPLATE, SPELL_IMG, MSG_ALRT, FILE_FORWARD, MAIN_CHANNEL, LOG_CHANNEL, PICS, \
- SUPPORT_CHAT_ID
-from pyrogram.types import InlineKeyboardMarkup, InlineKeyboardButton, CallbackQuery, InputMediaPhoto
-from pyrogram import Client, filters, enums
-from pyrogram.errors import FloodWait, UserIsBlocked, MessageNotModified, PeerIdInvalid
-from utils import get_size, is_subscribed, get_poster, search_gagala, temp, get_settings, save_group_settings, \
- get_shortlink, send_all
-from database.users_chats_db import db
-from database.ia_filterdb import Media, get_file_details, get_search_results, get_bad_files
-from database.filters_mdb import (
- del_all,
- find_filter,
- get_filters,
-)
-from database.gfilters_mdb import (
- find_gfilter,
- get_gfilters,
-)
-import logging
-
-logger = logging.getLogger(__name__)
-logger.setLevel(logging.ERROR)
-
-BUTTONS = {}
-SPELL_CHECK = {}
-FILTER_MODE = {}
-LANGUAGES = ["malayalam", "tamil", "english", "hindi", "telugu", "kannada"]
-
-
-@Client.on_message(filters.command('autofilter') & filters.user(ADMINS))
-async def fil_mod(client, message):
- mode_on = ["yes", "on", "true"]
- mode_of = ["no", "off", "false"]
-
- try:
- args = message.text.split(None, 1)[1].lower()
- except:
- return await message.reply("**𝙸𝙽𝙲𝙾𝙼𝙿𝙴𝚃𝙴𝙽𝚃 𝙲𝙾𝙼𝙼𝙰𝙳...**")
-
- m = await message.reply("**𝚂𝙴𝚃𝚃𝙸𝙽𝙶.../**")
-
- if args in mode_on:
- FILTER_MODE[str(message.chat.id)] = "True"
- await m.edit("**𝙰𝚄𝚃𝙾𝙵𝙸𝙻𝚃𝙴𝚁 𝙴𝙽𝙰𝙱𝙻𝙴𝙳**")
-
- elif args in mode_of:
- FILTER_MODE[str(message.chat.id)] = "False"
- await m.edit("**𝙰𝚄𝚃𝙾𝙵𝙸𝙻𝚃𝙴𝚁 𝙳𝙸𝚂𝙰𝙱𝙻𝙴𝙳**")
- else:
- await m.edit("𝚄𝚂𝙴 :- /autofilter on 𝙾𝚁 /autofilter off")
-
-
-@Client.on_message((filters.group) & filters.text & filters.incoming)
-async def give_filter(client, message):
- await global_filters(client, message)
- group_id = message.chat.id
- name = message.text
-
- keywords = await get_filters(group_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)
-
- if reply_text:
- reply_text = reply_text.replace("\\n", "\n").replace("\\t", "\t")
-
- if btn is not None:
- try:
- if fileid == "None":
- if btn == "[]":
- await message.reply_text(reply_text, disable_web_page_preview=True)
- else:
- button = eval(btn)
- await message.reply_text(
- reply_text,
- disable_web_page_preview=True,
- reply_markup=InlineKeyboardMarkup(button)
- )
- elif btn == "[]":
- await message.reply_cached_media(
- fileid,
- caption=reply_text or ""
- )
- else:
- button = eval(btn)
- await message.reply_cached_media(
- fileid,
- caption=reply_text or "",
- reply_markup=InlineKeyboardMarkup(button)
- )
- except Exception as e:
- print(e)
- break
-
- else:
- if FILTER_MODE.get(str(message.chat.id)) == "False":
- return
- else:
- await auto_filter(client, message)
-
-
-@Client.on_message(filters.private & filters.text & filters.incoming)
-async def pm_text(bot, message):
- content = message.text
- user = message.from_user.first_name
- user_id = message.from_user.id
- if content.startswith("/") or content.startswith("#"): return # ignore commands and hashtags
- await message.reply_text("Your message has been sent to my moderators !",
- reply_markup=InlineKeyboardMarkup(
- [[
- InlineKeyboardButton('📍 Mᴏᴠɪᴇ ɪs ʜᴇʀᴇ 📍', url='https://t.me/moviecafe_01')
- ]]
- )
- )
- await bot.send_message(
- chat_id=LOG_CHANNEL,
- text=f"#PM_MSG\n\nName : {user}\n\nID : {user_id}\n\nMessage : {content}"
- )
-
-
-@Client.on_callback_query(filters.regex(r"^next"))
-async def next_page(bot, query):
- ident, req, key, offset = query.data.split("_")
- if int(req) not in [query.from_user.id, 0]:
- return await query.answer(script.ALRT_TXT.format(query.from_user.first_name), show_alert=True)
- try:
- offset = int(offset)
- except:
- offset = 0
- search = BUTTONS.get(key)
- if not search:
- await query.answer(script.OLD_ALRT_TXT.format(query.from_user.first_name), show_alert=True)
- return
-
- files, n_offset, total = await get_search_results(search, offset=offset, filter=True)
- try:
- n_offset = int(n_offset)
- except:
- n_offset = 0
-
- if not files:
- return
- settings = await get_settings(query.message.chat.id)
- if 'is_shortlink' in settings.keys():
- ENABLE_SHORTLINK = settings['is_shortlink']
- else:
- await save_group_settings(query.message.chat.id, 'is_shortlink', False)
- ENABLE_SHORTLINK = False
- if ENABLE_SHORTLINK == True:
- if settings['button']:
- btn = [
- [
- InlineKeyboardButton(
- text=f"[{get_size(file.file_size)}] {file.file_name}",
- url=await get_shortlink(query.message.chat.id,
- f"https://telegram.me/{temp.U_NAME}?start=files_{file.file_id}")
- ),
- ]
- for file in files
- ]
- else:
- btn = [
- [
- InlineKeyboardButton(
- text=f"{file.file_name}", url=await get_shortlink(query.message.chat.id,
- f"https://telegram.me/{temp.U_NAME}?start=files_{file.file_id}")
- ),
- InlineKeyboardButton(
- text=f"{get_size(file.file_size)}",
- url=await get_shortlink(query.message.chat.id,
- f"https://telegram.me/{temp.U_NAME}?start=files_{file.file_id}")
- ),
- ]
- for file in files
- ]
- else:
- if settings['button']:
- btn = [
- [
- InlineKeyboardButton(
- text=f"[{get_size(file.file_size)}] {file.file_name}", callback_data=f'files#{file.file_id}'
- ),
- ]
- for file in files
- ]
- else:
- btn = [
- [
- InlineKeyboardButton(
- text=f"{file.file_name}", callback_data=f'files#{file.file_id}'
- ),
- InlineKeyboardButton(
- text=f"{get_size(file.file_size)}",
- callback_data=f'files_#{file.file_id}',
- ),
- ]
- for file in files
- ]
- btn.insert(0,
- [
- InlineKeyboardButton(f' ♀️ {search} ♀️ ', 'qinfo')
- ]
- )
- btn.insert(1,
- [
- InlineKeyboardButton("Send All !", callback_data=f"send_fall#files#{key}#{offset}"),
- InlineKeyboardButton("ʟᴀɴɢᴜᴀɢᴇs", callback_data=f"languages#{search.replace(' ', '_')}#{key}")
- ]
- )
- btn.insert(2,
- [
- InlineKeyboardButton(f'ɪɴꜰᴏ', 'reqinfo'),
- InlineKeyboardButton(f'ᴍᴏᴠɪᴇ', 'minfo'),
- InlineKeyboardButton(f'sᴇʀɪᴇs', 'sinfo'),
- InlineKeyboardButton(f'ᴛɪᴘs', 'tinfo')
- ]
- )
-
- if 0 < offset <= 10:
- off_set = 0
- elif offset == 0:
- off_set = None
- else:
- off_set = offset - 10
- if n_offset == 0:
- btn.append(
- [InlineKeyboardButton("⌫ 𝐁𝐀𝐂𝐊", callback_data=f"next_{req}_{key}_{off_set}"),
- InlineKeyboardButton(f"𝐏𝐀𝐆𝐄 {math.ceil(int(offset) / 7) + 1} / {math.ceil(total / 7)}",
- callback_data="pages")]
- )
- elif off_set is None:
- btn.append(
- [InlineKeyboardButton(f"{math.ceil(int(offset) / 7) + 1} / {math.ceil(total / 7)}", callback_data="pages"),
- InlineKeyboardButton("𝐍𝐄𝐗𝐓 ⌦", callback_data=f"next_{req}_{key}_{n_offset}")])
- else:
- btn.append(
- [
- InlineKeyboardButton("⌫ 𝐁𝐀𝐂𝐊", callback_data=f"next_{req}_{key}_{off_set}"),
- InlineKeyboardButton(f"𝐏𝐀𝐆𝐄 {math.ceil(int(offset) / 7) + 1} / {math.ceil(total / 7)}",
- callback_data="pages"),
- InlineKeyboardButton("𝐍𝐄𝐗𝐓 ⌦", callback_data=f"next_{req}_{key}_{n_offset}")
- ],
- )
- try:
- await query.edit_message_reply_markup(
- reply_markup=InlineKeyboardMarkup(btn)
- )
- except MessageNotModified:
- pass
- await query.answer()
-
-
-# Language Code Temp
-
-
-@Client.on_callback_query(filters.regex(r"^languages#"))
-async def languages_cb_handler(client: Client, query: CallbackQuery):
- if int(query.from_user.id) not in [query.message.reply_to_message.from_user.id, 0]:
- return await query.answer(
- f"⚠️ ʜᴇʟʟᴏ {query.from_user.first_name},\nᴛʜɪꜱ ɪꜱ ɴᴏᴛ ʏᴏᴜʀ ᴍᴏᴠɪᴇ ʀᴇQᴜᴇꜱᴛ,\nʀᴇQᴜᴇꜱᴛ ʏᴏᴜʀ'ꜱ...",
- show_alert=True,
- )
-
- _, search, key = query.data.split("#")
-
- btn = [
- [
- InlineKeyboardButton(
- text=lang.title(),
- callback_data=f"fl#{lang.lower()}#{search}#{key}"
- ),
- ]
- for lang in LANGUAGES
- ]
-
- btn.insert(
- 0,
- [
- InlineKeyboardButton(
- text="☟ ꜱᴇʟᴇᴄᴛ ʏᴏᴜʀ ʟᴀɴɢᴜᴀɢᴇꜱ ☟", callback_data="selectlang"
- )
- ],
- )
- req = query.from_user.id
- offset = 0
- btn.append([InlineKeyboardButton(text="↺ ʙᴀᴄᴋ ᴛᴏ ꜰɪʟᴇs ↻", callback_data=f"next_{req}_{key}_{offset}")])
-
- await query.edit_message_reply_markup(InlineKeyboardMarkup(btn))
-
-
-@Client.on_callback_query(filters.regex(r"^fl#"))
-async def filter_languages_cb_handler(client: Client, query: CallbackQuery):
- _, lang, search, key = query.data.split("#")
-
- search = search.replace("_", " ")
- req = query.from_user.id
- chat_id = query.message.chat.id
- message = query.message
- if int(req) not in [query.message.reply_to_message.from_user.id, 0]:
- return await query.answer(
- f"⚠️ ʜᴇʟʟᴏ{query.from_user.first_name},\nᴛʜɪꜱ ɪꜱ ɴᴏᴛ ʏᴏᴜʀ ᴍᴏᴠɪᴇ ʀᴇQᴜᴇꜱᴛ,\nʀᴇQᴜᴇꜱᴛ ʏᴏᴜʀ'ꜱ...",
- show_alert=True,
- )
-
- search = f"{search} {lang}"
-
- files, offset, _ = await get_search_results(search, max_results=10)
- files = [file for file in files if re.search(lang, file.file_name, re.IGNORECASE)]
- if not files:
- await query.answer("🚫 𝗡𝗼 𝗙𝗶𝗹𝗲 𝗪𝗲𝗿𝗲 𝗙𝗼𝘂𝗻𝗱 🚫", show_alert=1)
- return
-
- settings = await get_settings(message.chat.id)
- if 'is_shortlink' in settings.keys():
- ENABLE_SHORTLINK = settings['is_shortlink']
- else:
- await save_group_settings(message.chat.id, 'is_shortlink', False)
- ENABLE_SHORTLINK = False
- pre = 'filep' if settings['file_secure'] else 'file'
- if ENABLE_SHORTLINK == True:
- btn = (
- [
- [
- InlineKeyboardButton(
- text=f"▫️ {get_size(file.file_size)} ⊳ {file.file_name}",
- url=await get_shortlink(
- message.chat.id,
- f"https://telegram.me/{temp.U_NAME}?start=files_{file.file_id}",
- ),
- ),
- ]
- for file in files
- ]
- if settings["button"]
- else [
- [
- InlineKeyboardButton(
- text=f"{file.file_name}",
- url=await get_shortlink(
- message.chat.id,
- f"https://telegram.me/{temp.U_NAME}?start=files_{file.file_id}",
- ),
- ),
- InlineKeyboardButton(
- text=f"{get_size(file.file_size)}",
- url=await get_shortlink(
- message.chat.id,
- f"https://telegram.me/{temp.U_NAME}?start=files_{file.file_id}",
- ),
- ),
- ]
- for file in files
- ]
- )
- elif settings["button"]:
- btn = [
- [
- InlineKeyboardButton(
- text=f"▫️ {get_size(file.file_size)} ⊳ {file.file_name}", callback_data=f'{pre}#{file.file_id}'
- ),
- ]
- for file in files
- ]
- else:
- btn = [
- [
- InlineKeyboardButton(
- text=f"{file.file_name}",
- callback_data=f'{pre}#{file.file_id}',
- ),
- InlineKeyboardButton(
- text=f"{get_size(file.file_size)}",
- callback_data=f'{pre}#{file.file_id}',
- ),
- ]
- for file in files
- ]
- try:
- if settings['auto_delete']:
- btn.insert(
- 0,
- [
- InlineKeyboardButton(f'ɪɴꜰᴏ', 'reqinfo'),
- InlineKeyboardButton(f'ᴍᴏᴠɪᴇ', 'minfo'),
- InlineKeyboardButton(f'ꜱᴇʀɪᴇꜱ', 'sinfo'),
- ],
- )
-
- else:
- btn.insert(
- 0,
- [
- InlineKeyboardButton(f'ɪɴꜰᴏ', 'reqinfo'),
- InlineKeyboardButton(f'ᴍᴏᴠɪᴇ', 'minfo'),
- InlineKeyboardButton(f'ꜱᴇʀɪᴇꜱ', 'sinfo'),
- ],
- )
-
- except KeyError:
- grpid = await active_connection(str(message.from_user.id))
- await save_group_settings(grpid, 'auto_delete', True)
- settings = await get_settings(message.chat.id)
- if settings['auto_delete']:
- btn.insert(
- 0,
- [
- InlineKeyboardButton(f'ɪɴꜰᴏ', 'reqinfo'),
- InlineKeyboardButton(f'ᴍᴏᴠɪᴇ', 'minfo'),
- InlineKeyboardButton(f'ꜱᴇʀɪᴇꜱ', 'sinfo'),
- ],
- )
-
- else:
- btn.insert(
- 0,
- [
- InlineKeyboardButton(f'ɪɴꜰᴏ', 'reqinfo'),
- InlineKeyboardButton(f'ᴍᴏᴠɪᴇ', 'minfo'),
- InlineKeyboardButton(f'ꜱᴇʀɪᴇꜱ', 'sinfo'),
- ],
- )
-
- btn.insert(0, [
- InlineKeyboardButton("! Sᴇɴᴅ Aʟʟ Fɪʟᴇs Tᴏ PM !", callback_data=f"send_fall#files#{key}#{offset}")
- ])
- offset = 0
-
- btn.append([
- InlineKeyboardButton(
- text="↺ ʙᴀᴄᴋ ᴛᴏ ꜰɪʟᴇs ↻",
- callback_data=f"next_{req}_{key}_{offset}"
- ),
- ])
-
- await query.edit_message_reply_markup(reply_markup=InlineKeyboardMarkup(btn))
-
-
-# spellcheck error fixing
-@Client.on_callback_query(filters.regex(r"^spol"))
-async def advantage_spoll_choker(bot, query):
- _, user, movie_ = query.data.split('#')
-
- movies = SPELL_CHECK.get(query.message.reply_to_message.id)
-
- if not movies:
- return await query.answer(script.OLD_ALRT_TXT.format(query.from_user.first_name), show_alert=True)
- if int(user) != 0 and query.from_user.id != int(user):
- return await query.answer(script.ALRT_TXT.format(query.from_user.first_name), show_alert=True)
- if movie_ == "close_spellcheck":
- return await query.message.delete()
- movie = movies[int(movie_)] # Fixed int(movie_) instead of movies[(int(movie_))]
-
- await query.answer(script.TOP_ALRT_MSG)
-
- k = await manual_filters(bot, query.message, text=movie)
-
- if k == False:
- files, offset, total_results = await get_search_results(movie, offset=0, filter=True)
- if files:
- k = (movie, files, offset, total_results)
- await auto_filter(bot, query, k)
- else:
- reqstr1 = query.from_user.id if query.from_user else 0
- reqstr = await bot.get_users(reqstr1)
- await bot.send_message(chat_id=LOG_CHANNEL, text=(script.NORSLTS.format(reqstr.id, reqstr.mention, movie)))
- k = await query.message.edit(script.MVE_NT_FND)
- await asyncio.sleep(10)
- await k.delete()
-
-
-@Client.on_callback_query()
-async def cb_handler(client: Client, query: CallbackQuery):
- if query.data == "close_data":
- await query.message.delete()
- elif query.data == "delallconfirm":
- userid = query.from_user.id
- chat_type = query.message.chat.type
-
- if chat_type == enums.ChatType.PRIVATE:
- grpid = await active_connection(str(userid))
- if grpid is not None:
- grp_id = grpid
- try:
- chat = await client.get_chat(grpid)
- title = chat.title
- except:
- await query.message.edit_text("Make sure I'm present in your group!!", quote=True)
- return await query.answer(MSG_ALRT)
- else:
- await query.message.edit_text(
- "I'm not connected to any groups!\nCheck /connections or connect to any groups",
- quote=True
- )
- return await query.answer(MSG_ALRT)
-
- elif chat_type in [enums.ChatType.GROUP, enums.ChatType.SUPERGROUP]:
- grp_id = query.message.chat.id
- title = query.message.chat.title
-
- else:
- return await query.answer(MSG_ALRT)
-
- st = await client.get_chat_member(grp_id, userid)
- if (st.status == enums.ChatMemberStatus.OWNER) or (str(userid) in ADMINS):
- await del_all(query.message, grp_id, title)
- else:
- await query.answer("You need to be Group Owner or an Auth User to do that!", show_alert=True)
- elif query.data == "delallcancel":
- userid = query.from_user.id
- chat_type = query.message.chat.type
-
- if chat_type == enums.ChatType.PRIVATE:
- await query.message.reply_to_message.delete()
- await query.message.delete()
-
- elif chat_type in [enums.ChatType.GROUP, enums.ChatType.SUPERGROUP]:
- grp_id = query.message.chat.id
- st = await client.get_chat_member(grp_id, userid)
- if (st.status == enums.ChatMemberStatus.OWNER) or (str(userid) in ADMINS):
- await query.message.delete()
- try:
- await query.message.reply_to_message.delete()
- except:
- pass
- else:
- await query.answer(script.ALRT_TXT.format(query.from_user.first_name), show_alert=True)
- elif "groupcb" in query.data:
- await query.answer()
-
- group_id = query.data.split(":")[1]
-
- act = query.data.split(":")[2]
- hr = await client.get_chat(int(group_id))
- title = hr.title
- user_id = query.from_user.id
-
- if act == "":
- stat = "CONNECT"
- cb = "connectcb"
- else:
- stat = "DISCONNECT"
- cb = "disconnect"
-
- keyboard = InlineKeyboardMarkup([
- [InlineKeyboardButton(f"{stat}", callback_data=f"{cb}:{group_id}"),
- InlineKeyboardButton("DELETE", callback_data=f"deletecb:{group_id}")],
- [InlineKeyboardButton("BACK", callback_data="backcb")]
- ])
-
- await query.message.edit_text(
- f"Group Name : **{title}**\nGroup ID : `{group_id}`",
- reply_markup=keyboard,
- parse_mode=enums.ParseMode.MARKDOWN
- )
- return await query.answer(MSG_ALRT)
- elif "connectcb" in query.data:
- await query.answer()
-
- group_id = query.data.split(":")[1]
-
- hr = await client.get_chat(int(group_id))
-
- title = hr.title
-
- user_id = query.from_user.id
-
- mkact = await make_active(str(user_id), str(group_id))
-
- if mkact:
- await query.message.edit_text(
- f"Connected to **{title}**",
- parse_mode=enums.ParseMode.MARKDOWN
- )
- else:
- await query.message.edit_text('Some error occurred!!', parse_mode=enums.ParseMode.MARKDOWN)
- return await query.answer(MSG_ALRT)
- elif "disconnect" in query.data:
- await query.answer()
-
- group_id = query.data.split(":")[1]
-
- hr = await client.get_chat(int(group_id))
-
- title = hr.title
- user_id = query.from_user.id
-
- mkinact = await make_inactive(str(user_id))
-
- if mkinact:
- await query.message.edit_text(
- f"Disconnected from **{title}**",
- parse_mode=enums.ParseMode.MARKDOWN
- )
- else:
- await query.message.edit_text(
- f"Some error occurred!!",
- parse_mode=enums.ParseMode.MARKDOWN
- )
- return await query.answer(MSG_ALRT)
- elif "deletecb" in query.data:
- await query.answer()
-
- user_id = query.from_user.id
- group_id = query.data.split(":")[1]
-
- delcon = await delete_connection(str(user_id), str(group_id))
-
- if delcon:
- await query.message.edit_text(
- "Successfully deleted connection"
- )
- else:
- await query.message.edit_text(
- f"Some error occurred!!",
- parse_mode=enums.ParseMode.MARKDOWN
- )
- return await query.answer(MSG_ALRT)
- elif query.data == "backcb":
- await query.answer()
-
- userid = query.from_user.id
-
- groupids = await all_connections(str(userid))
- if groupids is None:
- await query.message.edit_text(
- "There are no active connections!! Connect to some groups first.",
- )
- return await query.answer(MSG_ALRT)
- buttons = []
- for groupid in groupids:
- try:
- ttl = await client.get_chat(int(groupid))
- title = ttl.title
- active = await if_active(str(userid), str(groupid))
- act = " - ACTIVE" if active else ""
- buttons.append(
- [
- InlineKeyboardButton(
- text=f"{title}{act}", callback_data=f"groupcb:{groupid}:{act}"
- )
- ]
- )
- except:
- pass
- if buttons:
- await query.message.edit_text(
- "Your connected group details ;\n\n",
- reply_markup=InlineKeyboardMarkup(buttons)
- )
- elif "gfilteralert" in query.data:
- grp_id = query.message.chat.id
- i = query.data.split(":")[1]
- keyword = query.data.split(":")[2]
- reply_text, btn, alerts, fileid = await find_gfilter('gfilters', keyword)
- if alerts is not None:
- alerts = ast.literal_eval(alerts)
- alert = alerts[int(i)]
- alert = alert.replace("\\n", "\n").replace("\\t", "\t")
- await query.answer(alert, show_alert=True)
- elif "alertmessage" in query.data:
- grp_id = query.message.chat.id
- i = query.data.split(":")[1]
- keyword = query.data.split(":")[2]
- reply_text, btn, alerts, fileid = await find_filter(grp_id, keyword)
- if alerts is not None:
- alerts = ast.literal_eval(alerts)
- alert = alerts[int(i)]
- alert = alert.replace("\\n", "\n").replace("\\t", "\t")
- await query.answer(alert, show_alert=True)
- if query.data.startswith("file"):
- ident, file_id = query.data.split("#")
- clicked = query.from_user.id # fetching the ID of the user who clicked the button
- try:
- typed = query.message.reply_to_message.from_user.id # fetching user ID of the user who sent the movie request
- except:
- typed = clicked # if failed, uses the clicked user's ID as requested user ID
- files_ = await get_file_details(file_id)
- if not files_:
- return await query.answer('No such file exist.')
- files = files_[0]
- title = files.file_name
- size = get_size(files.file_size)
- f_caption = files.caption
- settings = await get_settings(query.message.chat.id)
- if CUSTOM_FILE_CAPTION:
- try:
- f_caption = CUSTOM_FILE_CAPTION.format(file_name='' if title is None else title,
- file_size='' if size is None else size,
- file_caption='' if f_caption is None else f_caption)
- except Exception as e:
- logger.exception(e)
- f_caption = f_caption
- if f_caption is None:
- f_caption = f"{files.file_name}"
-
- try:
- if (AUTH_CHANNEL or REQ_CHANNEL) and not await is_subscribed(client, query):
- if clicked == typed:
- await query.answer(url=f"https://t.me/{temp.U_NAME}?start={ident}_{file_id}")
- return
- else:
- await query.answer(
- f"Hᴇʏ {query.from_user.first_name}, Tʜɪs Is Nᴏᴛ Yᴏᴜʀ Mᴏᴠɪᴇ Rᴇǫᴜᴇsᴛ. Rᴇǫᴜᴇsᴛ Yᴏᴜʀ's !",
- show_alert=True)
- elif settings['botpm']:
- if clicked == typed:
- await query.answer(url=f"https://t.me/{temp.U_NAME}?start={ident}_{file_id}")
- return
- else:
- await query.answer(
- f"Hᴇʏ {query.from_user.first_name}, Tʜɪs Is Nᴏᴛ Yᴏᴜʀ Mᴏᴠɪᴇ Rᴇǫᴜᴇsᴛ. Rᴇǫᴜᴇsᴛ Yᴏᴜʀ's !",
- show_alert=True)
- else:
- if clicked == typed:
- file_send = await client.send_cached_media(
- chat_id=FILE_CHANNEL,
- file_id=file_id,
- caption=script.CHANNEL_CAP.format(query.from_user.mention, title, query.message.chat.title),
- protect_content=True if ident == "filep" else False,
- reply_markup=InlineKeyboardMarkup(
- [
- [
- InlineKeyboardButton(f'🇮🇳 Mᴀʟ', 'fmal'),
- InlineKeyboardButton(f'🇮🇳 Tᴀᴍ', 'ftam'),
- InlineKeyboardButton(f'🇮🇳 Hɪɴ', 'fhin')
- ], [
- InlineKeyboardButton("📍 ᴄʜᴀɴɴᴇʟ 📍", url=(MAIN_CHANNEL))
- ]
- ]
- )
- )
- Joel_tgx = await query.message.reply_text(
- script.FILE_MSG.format(query.from_user.mention, title, size),
- parse_mode=enums.ParseMode.HTML,
- reply_markup=InlineKeyboardMarkup(
- [
- [
- InlineKeyboardButton('📥 𝖣𝗈𝗐𝗇𝗅𝗈𝖺𝖽 𝖫𝗂𝗇𝗄 📥 ', url=file_send.link)
- ], [
- InlineKeyboardButton("⚠️ 𝖢𝖺𝗇'𝗍 𝖠𝖼𝖼𝖾𝗌𝗌 ❓ 𝖢𝗅𝗂𝖼𝗄 𝖧𝖾𝗋𝖾 ⚠️", url=(FILE_FORWARD))
- ]
- ]
- )
- )
- if settings['auto_delete']:
- await asyncio.sleep(600)
- await Joel_tgx.delete()
- await file_send.delete()
- else:
- await query.answer(
- f"Hᴇʏ {query.from_user.first_name}, Tʜɪs Is Nᴏᴛ Yᴏᴜʀ Mᴏᴠɪᴇ Rᴇǫᴜᴇsᴛ. Rᴇǫᴜᴇsᴛ Yᴏᴜʀ's !",
- show_alert=True)
- await query.answer('Cʜᴇᴄᴋ PM, I ʜᴀᴠᴇ sᴇɴᴛ ғɪʟᴇs ɪɴ PM', show_alert=True)
- except UserIsBlocked:
- await query.answer('𝐔𝐧𝐛𝐥𝐨𝐜𝐤 𝐭𝐡𝐞 𝐛𝐨𝐭 𝐦𝐚𝐡𝐧 !', show_alert=True)
- except PeerIdInvalid:
- await query.answer(url=f"https://t.me/{temp.U_NAME}?start={ident}_{file_id}")
- except Exception as e:
- await query.answer(url=f"https://t.me/{temp.U_NAME}?start={ident}_{file_id}")
- elif query.data.startswith("checksub"):
- if (AUTH_CHANNEL or REQ_CHANNEL) and not await is_subscribed(client, query):
- await query.answer(
- "𝑰 𝑳𝒊𝒌𝒆 𝒀𝒐𝒖𝒓 𝑺𝒎𝒂𝒓𝒕𝒏𝒆𝒔𝒔, 𝑩𝒖𝒕 𝑫𝒐𝒏'𝒕 𝑩𝒆 𝑶𝒗𝒆𝒓𝒔𝒎𝒂𝒓𝒕 😒\n@𝒄𝒊𝒏𝒆𝒎𝒂𝒍𝒂.𝒄𝒐𝒎", show_alert=True)
- return
- ident, file_id = query.data.split("#")
- files_ = await get_file_details(file_id)
- if not files_:
- return await query.answer('No such file exist.')
- files = files_[0]
- title = files.file_name
- size = get_size(files.file_size)
- f_caption = files.caption
- if CUSTOM_FILE_CAPTION:
- try:
- f_caption = CUSTOM_FILE_CAPTION.format(file_name='' if title is None else title,
- file_size='' if size is None else size,
- file_caption='' if f_caption is None else f_caption)
- except Exception as e:
- logger.exception(e)
- f_caption = f_caption
- if f_caption is None:
- f_caption = f"{title}"
- await query.answer()
- await client.send_cached_media(
- chat_id=query.from_user.id,
- file_id=file_id,
- caption=f_caption,
- protect_content=True if ident == 'checksubp' else False
- )
- elif query.data == "predvd":
- k = await client.send_message(chat_id=query.message.chat.id, text="Deleting PreDVDs... Please wait...")
- files, next_offset, total = await get_bad_files(
- 'predvd',
- offset=0)
- deleted = 0
- for file in files:
- file_ids = file.file_id
- result = await Media.collection.delete_one({
- '_id': file_ids,
- })
- if result.deleted_count:
- logger.info('PreDVD File Found ! Successfully deleted from database.')
- deleted += 1
- deleted = str(deleted)
- await k.edit_text(text=f"Successfully deleted {deleted} PreDVD files.")
-
- elif query.data == "camrip":
- k = await client.send_message(chat_id=query.message.chat.id, text="Deleting CamRips... Please wait...")
- files, next_offset, total = await get_bad_files(
- 'camrip',
- offset=0)
- deleted = 0
- for file in files:
- file_ids = file.file_id
- result = await Media.collection.delete_one({
- '_id': file_ids,
- })
- if result.deleted_count:
- logger.info('CamRip File Found ! Successfully deleted from database.')
- deleted += 1
- deleted = str(deleted)
- await k.edit_text(text=f"Successfully deleted {deleted} CamRip files.")
-
- elif query.data == "pages":
- await query.answer()
-
- elif query.data.startswith("send_fall"):
- temp_var, ident, key, offset = query.data.split("#")
- search = BUTTONS.get(key)
- if not search:
- await query.answer(script.OLD_ALRT_TXT.format(query.from_user.first_name), show_alert=True)
- return
- files, n_offset, total = await get_search_results(search, offset=int(offset), filter=True)
- await send_all(client, query.from_user.id, files, ident)
- await query.answer(
- f"Hey {query.from_user.first_name}, All files on this page has been sent successfully to your PM !",
- show_alert=True)
-
- elif query.data == "reqinfo":
- await query.answer(
- "⚠ ɪɴꜰᴏʀᴍᴀᴛɪᴏɴ ⚠\n\nᴀꜰᴛᴇʀ 10 ᴍɪɴᴜᴛᴇꜱ ᴛʜɪꜱ ᴍᴇꜱꜱᴀɢᴇ ᴡɪʟʟ ʙᴇ ᴀᴜᴛᴏᴍᴀᴛɪᴄᴀʟʟʏ ᴅᴇʟᴇᴛᴇᴅ\n\nɪꜰ ʏᴏᴜ ᴅᴏ ɴᴏᴛ ꜱᴇᴇ ᴛʜᴇ ʀᴇǫᴜᴇsᴛᴇᴅ ᴍᴏᴠɪᴇ / sᴇʀɪᴇs ꜰɪʟᴇ, ʟᴏᴏᴋ ᴀᴛ ᴛʜᴇ ɴᴇxᴛ ᴘᴀɢᴇ\n\n❣ ᴘᴏᴡᴇʀᴇᴅ ʙʏ ᴄɪɴᴇᴍᴀʟᴀ.ᴄᴏᴍ",
- show_alert=True)
-
- elif query.data == "minfo":
- await query.answer(
- "⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯\nᴍᴏᴠɪᴇ ʀᴇǫᴜᴇꜱᴛ ꜰᴏʀᴍᴀᴛ\n⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯\n\nɢᴏ ᴛᴏ ɢᴏᴏɢʟᴇ ➠ ᴛʏᴘᴇ ᴍᴏᴠɪᴇ ɴᴀᴍᴇ ➠ ᴄᴏᴘʏ ᴄᴏʀʀᴇᴄᴛ ɴᴀᴍᴇ ➠ ᴘᴀꜱᴛᴇ ᴛʜɪꜱ ɢʀᴏᴜᴘ\n\nᴇxᴀᴍᴘʟᴇ : ᴀᴠᴀᴛᴀʀ: ᴛʜᴇ ᴡᴀʏ ᴏғ ᴡᴀᴛᴇʀ\n\n🚯 ᴅᴏɴᴛ ᴜꜱᴇ ➠ ':(!,./)\n\n©️ ᴄɪɴᴇᴍᴀʟᴀ.ᴄᴏᴍ",
- show_alert=True)
-
- elif query.data == "sinfo":
- await query.answer(
- "⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯\nꜱᴇʀɪᴇꜱ ʀᴇǫᴜᴇꜱᴛ ꜰᴏʀᴍᴀᴛ\n⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯\n\nɢᴏ ᴛᴏ ɢᴏᴏɢʟᴇ ➠ ᴛʏᴘᴇ ᴍᴏᴠɪᴇ ɴᴀᴍᴇ ➠ ᴄᴏᴘʏ ᴄᴏʀʀᴇᴄᴛ ɴᴀᴍᴇ ➠ ᴘᴀꜱᴛᴇ ᴛʜɪꜱ ɢʀᴏᴜᴘ\n\nᴇxᴀᴍᴘʟᴇ : ᴍᴏɴᴇʏ ʜᴇɪsᴛ S01E01\n\n🚯 ᴅᴏɴᴛ ᴜꜱᴇ ➠ ':(!,./)\n\n©️ ᴄɪɴᴇᴍᴀʟᴀ.ᴄᴏᴍ",
- show_alert=True)
-
- elif query.data == "tinfo":
- await query.answer(
- "▣ ᴛɪᴘs ▣\n\n★ ᴛʏᴘᴇ ᴄᴏʀʀᴇᴄᴛ sᴘᴇʟʟɪɴɢ (ɢᴏᴏɢʟᴇ)\n\n★ ɪғ ʏᴏᴜ ɴᴏᴛ ɢᴇᴛ ʏᴏᴜʀ ғɪʟᴇ ɪɴ ᴛʜᴇ ʙᴜᴛᴛᴏɴ ᴛʜᴇɴ ᴛʜᴇ ɴᴇxᴛ sᴛᴇᴘ ɪs ᴄʟɪᴄᴋ ɴᴇxᴛ ʙᴜᴛᴛᴏɴ.\n\n★ ᴄᴏɴᴛɪɴᴜᴇ ᴛʜɪs ᴍᴇᴛʜᴏᴅ ᴛᴏ ɢᴇᴛᴛɪɴɢ ʏᴏᴜ ғɪʟᴇ\n\n❣ ᴘᴏᴡᴇʀᴇᴅ ʙʏ ᴄɪɴᴇᴍᴀʟᴀ. ᴄᴏᴍ",
- show_alert=True)
-
- elif query.data == "fmal":
- await query.answer(
- "കോപ്പിറൈറ്റ് ഉള്ളതുകൊണ്ട് ഫയൽ 10 മിനിറ്റിനുള്ളിൽ ഇവിടെനിന്നും ഡിലീറ്റ് ആകുന്നതാണ് അതുകൊണ്ട് ഇവിടെ നിന്നും മറ്റെവിടെക്കെങ്കിലും മാറ്റിയതിന് ശേഷം ഡൗൺലോഡ് ചെയ്യുക!",
- show_alert=True)
-
- elif query.data == "ftam":
- await query.answer(
- "பதிப்புரிமை காரணமாக, கோப்பு இங்கிருந்து 10 நிமிடங்களில் நீக்கப்படும், எனவே இங்கிருந்து வேறு எங்காவது நகர்த்தப்பட்ட பிறகு பதிவிறக்கவும்!",
- show_alert=True)
-
- elif query.data == "fhin":
- await query.answer(
- "कॉपीराइट के कारण फ़ाइल यहां से 10 मिनट में डिलीट हो जाएगी इसलिए यहां से कहीं और ले जाकर डाउनलोड करें!",
- show_alert=True)
-
- elif query.data == "whyjoin":
- await query.answer(
- "⚠ ɪɴꜰᴏʀᴍᴀᴛɪᴏɴ ⚠\nIғ ᴛʜᴇ ɢʀᴏᴜᴘ ᴄᴏᴘʏ ʀɪɢʜᴛ ɪꜱ ʟᴏꜱᴛ , ᴡʜᴇɴ ᴀ ɴᴇᴡ ɢʀᴏᴜᴘ ɪꜱ ꜱᴛᴀʀᴛᴇᴅ, ɪᴛ ᴡɪʟʟ ʙᴇ ɴᴏᴛɪғɪᴇᴅ ᴏɴ ᴛʜɪꜱ ᴄʜᴀɴɴᴇʟ🤥",
- show_alert=True)
-
- elif query.data == "surprise":
- btn = [[
- InlineKeyboardButton('sᴜʀᴘʀɪsᴇ', callback_data='start')
- ]]
- reply_markup = InlineKeyboardMarkup(btn)
- await client.edit_message_media(
- query.message.chat.id,
- query.message.id,
- InputMediaPhoto(random.choice(PICS))
- )
- await query.message.edit_text(
- text=script.SUR_TXT.format(query.from_user.mention, temp.U_NAME, temp.B_NAME),
- reply_markup=reply_markup,
- parse_mode=enums.ParseMode.HTML
- )
-
- elif query.data == "start":
- buttons = [[
- InlineKeyboardButton('× ᴀᴅᴅ ᴍᴇ ᴛᴏ ʏᴏᴜʀ ɢʀᴏᴜᴘs ×', url=f'http://t.me/{temp.U_NAME}?startgroup=true')
- ], [
- InlineKeyboardButton('🔍 sᴇᴀʀᴄʜ', switch_inline_query_current_chat=''),
- InlineKeyboardButton('ᴏᴡɴ ɪɴғᴏ', url='https://t.me/+ipDgG7Qfrps1ZTJl')
- ], [
- InlineKeyboardButton('ʜᴇʟᴘ', callback_data='help'),
- InlineKeyboardButton('ᴀʙᴏᴜᴛ', callback_data='about')
- ], [
- InlineKeyboardButton('ʙᴀᴄᴋ ᴛᴏ sᴛᴀʀᴛ', callback_data='surprise')
- ]]
- reply_markup = InlineKeyboardMarkup(buttons)
- await client.edit_message_media(
- query.message.chat.id,
- query.message.id,
- InputMediaPhoto(random.choice(PICS))
- )
- await query.message.edit_text(
- text=script.START_TXT.format(query.from_user.mention, temp.U_NAME, temp.B_NAME),
- reply_markup=reply_markup,
- parse_mode=enums.ParseMode.HTML
- )
- await query.answer(MSG_ALRT)
- elif query.data == "help":
- buttons = [[
- InlineKeyboardButton('ᴍᴀɴᴜᴀʟ', callback_data='manuelfilter'),
- InlineKeyboardButton('ᴀᴜᴛᴏ', callback_data='autofilter'),
- InlineKeyboardButton('ᴄᴏɴɴᴇᴄᴛ', callback_data='coct')
- ], [
- InlineKeyboardButton('ᴇxᴛʀᴀ', callback_data='extra'),
- InlineKeyboardButton('sᴏɴɢ', callback_data='song'),
- InlineKeyboardButton('ᴛᴛs', callback_data='tts')
- ], [
- InlineKeyboardButton('ᴠɪᴅᴇᴏ', callback_data='video'),
- InlineKeyboardButton('ᴛɢʀᴀᴘʜ', callback_data='tele'),
- InlineKeyboardButton('ɴᴇxᴛ', callback_data='aswin')
- ], [
- InlineKeyboardButton('ʙᴀᴄᴋ', callback_data='start')
- ]]
- reply_markup = InlineKeyboardMarkup(buttons)
- await client.edit_message_media(
- query.message.chat.id,
- query.message.id,
- InputMediaPhoto(random.choice(PICS))
- )
- await query.message.edit_text(
- text="▣ ▢ ▢"
- )
- await query.message.edit_text(
- text="▣ ▣ ▢"
- )
- await query.message.edit_text(
- text="▣ ▣ ▣"
- )
- await query.message.edit_text(
- text=script.HELP_TXT.format(query.from_user.mention),
- reply_markup=reply_markup,
- parse_mode=enums.ParseMode.HTML
- )
- elif query.data == "aswin":
- buttons = [[
- InlineKeyboardButton('ᴀᴜᴅʙᴏᴏᴋ', callback_data='abook'),
- InlineKeyboardButton('ᴄᴏᴠɪᴅ', callback_data='corona'),
- InlineKeyboardButton('ɢᴀᴍᴇs', callback_data='fun')
- ], [
- InlineKeyboardButton('ᴘɪɴɢ', callback_data='pings'),
- InlineKeyboardButton('ᴊsᴏɴᴇ', callback_data='json'),
- InlineKeyboardButton('sᴛɪᴄᴋɪᴅ', callback_data='sticker')
- ], [
- InlineKeyboardButton('ᴡʜᴏɪs', callback_data='whois'),
- InlineKeyboardButton('ᴜʀʟsʜᴏʀᴛ', callback_data='urlshort'),
- InlineKeyboardButton('ɴᴇxᴛ', callback_data='aswins')
- ], [
- InlineKeyboardButton('ʙᴀᴄᴋ', callback_data='help')
- ]]
- reply_markup = InlineKeyboardMarkup(buttons)
- await client.edit_message_media(
- query.message.chat.id,
- query.message.id,
- InputMediaPhoto(random.choice(PICS))
- )
- await query.message.edit_text(
- text="▣ ▢ ▢"
- )
- await query.message.edit_text(
- text="▣ ▣ ▢"
- )
- await query.message.edit_text(
- text="▣ ▣ ▣"
- )
- await query.message.edit_text(
- text=script.HELP_TXT.format(query.from_user.mention),
- reply_markup=reply_markup,
- parse_mode=enums.ParseMode.HTML
- )
- elif query.data == "aswins":
- buttons = [[
- InlineKeyboardButton('ғᴏɴᴛ', callback_data='font'),
- InlineKeyboardButton('ɢᴛʀᴀɴs', callback_data='gtrans'),
- InlineKeyboardButton('ᴄᴀʀʙᴏɴ', callback_data='carb'),
- ], [
- InlineKeyboardButton('ᴄᴏᴜɴᴛʀʏ', callback_data='country'),
- InlineKeyboardButton('ᴏᴘᴇɴᴀɪ', callback_data='opnai'),
- InlineKeyboardButton('ʜᴏᴍᴇ', callback_data='start')
- ], [
- InlineKeyboardButton('ʙᴀᴄᴋ', callback_data='aswin')
- ]]
- reply_markup = InlineKeyboardMarkup(buttons)
- await client.edit_message_media(
- query.message.chat.id,
- query.message.id,
- InputMediaPhoto(random.choice(PICS))
- )
- await query.message.edit_text(
- text="▣ ▢ ▢"
- )
- await query.message.edit_text(
- text="▣ ▣ ▢"
- )
- await query.message.edit_text(
- text="▣ ▣ ▣"
- )
- await query.message.edit_text(
- text=script.HELP_TXT.format(query.from_user.mention),
- reply_markup=reply_markup,
- parse_mode=enums.ParseMode.HTML
- )
- elif query.data == "about":
- buttons = [[
- InlineKeyboardButton('sᴛᴀᴛᴜs', callback_data='stats'),
- InlineKeyboardButton('sᴏᴜʀᴄᴇ', callback_data='source')
- ], [
- InlineKeyboardButton('ʜᴏᴍᴇ', callback_data='start'),
- InlineKeyboardButton('ᴅɪꜱᴄʟᴀɪᴍᴇʀ', callback_data='disc')
- ], [
- InlineKeyboardButton('ᴄʟᴏsᴇ', callback_data='close_data')
- ]]
- reply_markup = InlineKeyboardMarkup(buttons)
- await client.edit_message_media(
- query.message.chat.id,
- query.message.id,
- InputMediaPhoto(random.choice(PICS))
- )
- await query.message.edit_text(
- text=script.ABOUT_TXT.format(temp.B_NAME),
- reply_markup=reply_markup,
- parse_mode=enums.ParseMode.HTML
- )
- elif query.data == "disc":
- buttons = [[
- InlineKeyboardButton('ʙᴀᴄᴋ', callback_data='about')
- ]]
- reply_markup = InlineKeyboardMarkup(buttons)
- await query.message.edit_text(
- text=script.DISC_TXT,
- reply_markup=reply_markup,
- parse_mode=enums.ParseMode.HTML
- )
- elif query.data == "source":
- buttons = [[
- InlineKeyboardButton('ʀᴇᴘᴏ', url='https://github.com/Devil-Botz/Elsa'),
- InlineKeyboardButton('ʙᴀᴄᴋ', callback_data='about')
- ]]
- reply_markup = InlineKeyboardMarkup(buttons)
- await query.message.edit_text(
- text=script.SOURCE_TXT,
- reply_markup=reply_markup,
- parse_mode=enums.ParseMode.HTML
- )
- elif query.data == "manuelfilter":
- buttons = [[
- InlineKeyboardButton('ʙᴀᴄᴋ', callback_data='help'),
- InlineKeyboardButton('ʙᴜᴛᴛᴏɴs', callback_data='button')
- ]]
- reply_markup = InlineKeyboardMarkup(buttons)
- await query.message.edit_text(
- text=script.MANUELFILTER_TXT,
- reply_markup=reply_markup,
- parse_mode=enums.ParseMode.HTML
- )
- elif query.data == "button":
- buttons = [[
- InlineKeyboardButton('ʙᴀᴄᴋ', callback_data='manuelfilter')
- ]]
- reply_markup = InlineKeyboardMarkup(buttons)
- await query.message.edit_text(
- text=script.BUTTON_TXT,
- reply_markup=reply_markup,
- parse_mode=enums.ParseMode.HTML
- )
- elif query.data == "autofilter":
- buttons = [[
- InlineKeyboardButton('ʙᴀᴄᴋ', callback_data='help')
- ]]
- reply_markup = InlineKeyboardMarkup(buttons)
- await query.message.edit_text(
- text=script.AUTOFILTER_TXT,
- reply_markup=reply_markup,
- parse_mode=enums.ParseMode.HTML
- )
- elif query.data == "coct":
- buttons = [[
- InlineKeyboardButton('ʙᴀᴄᴋ', callback_data='help')
- ]]
- reply_markup = InlineKeyboardMarkup(buttons)
- await query.message.edit_text(
- text=script.CONNECTION_TXT,
- reply_markup=reply_markup,
- parse_mode=enums.ParseMode.HTML
- )
- elif query.data == "extra":
- buttons = [[
- InlineKeyboardButton('ʙᴀᴄᴋ', callback_data='help'),
- InlineKeyboardButton('ᴀᴅᴍɪɴ', callback_data='admin')
- ]]
- reply_markup = InlineKeyboardMarkup(buttons)
- await query.message.edit_text(
- text=script.EXTRAMOD_TXT,
- reply_markup=reply_markup,
- parse_mode=enums.ParseMode.HTML
- )
- elif query.data == "admin":
- buttons = [[
- InlineKeyboardButton('ʙᴀᴄᴋ', callback_data='extra')
- ]]
- reply_markup = InlineKeyboardMarkup(buttons)
- await query.message.edit_text(
- text=script.ADMIN_TXT,
- reply_markup=reply_markup,
- parse_mode=enums.ParseMode.HTML
- )
- elif query.data == "song":
- buttons = [[
- InlineKeyboardButton('ʙᴀᴄᴋ', callback_data='help')
- ]]
- reply_markup = InlineKeyboardMarkup(buttons)
- await query.message.edit_text(
- text=script.SONG_TXT,
- reply_markup=reply_markup,
- parse_mode=enums.ParseMode.HTML
- )
- elif query.data == "video":
- buttons = [[
- InlineKeyboardButton('ʙᴀᴄᴋ', callback_data='help')
- ]]
- reply_markup = InlineKeyboardMarkup(buttons)
- await query.message.edit_text(
- text=script.VIDEO_TXT,
- reply_markup=reply_markup,
- parse_mode=enums.ParseMode.HTML
- )
- elif query.data == "tts":
- buttons = [[
- InlineKeyboardButton('ʙᴀᴄᴋ', callback_data='help')
- ]]
- reply_markup = InlineKeyboardMarkup(buttons)
- await query.message.edit_text(
- text=script.TTS_TXT,
- reply_markup=reply_markup,
- parse_mode=enums.ParseMode.HTML
- )
- elif query.data == "gtrans":
- buttons = [[
- InlineKeyboardButton('ʙᴀᴄᴋ', callback_data='aswins'),
- InlineKeyboardButton('𝙻𝙰𝙽𝙶 𝙲𝙾𝙳𝙴𝚂', url='https://cloud.google.com/translate/docs/languages')
- ]]
- reply_markup = InlineKeyboardMarkup(buttons)
- await query.message.edit_text(
- text=script.GTRANS_TXT,
- disable_web_page_preview=True,
- reply_markup=reply_markup,
- parse_mode=enums.ParseMode.HTML
- )
- elif query.data == "country":
- buttons = [[
- InlineKeyboardButton('ʙᴀᴄᴋ', callback_data='aswins'),
- ]]
- reply_markup = InlineKeyboardMarkup(buttons)
- await query.message.edit_text(
- text=script.CON_TXT,
- disable_web_page_preview=True,
- reply_markup=reply_markup,
- parse_mode=enums.ParseMode.HTML
- )
- elif query.data == "tele":
- buttons = [[
- InlineKeyboardButton('ʙᴀᴄᴋ', callback_data='help')
- ]]
- reply_markup = InlineKeyboardMarkup(buttons)
- await query.message.edit_text(
- text=script.TELE_TXT,
- reply_markup=reply_markup,
- parse_mode=enums.ParseMode.HTML
- )
- elif query.data == "corona":
- buttons = [[
- InlineKeyboardButton('ʙᴀᴄᴋ', callback_data='aswin')
- ]]
- reply_markup = InlineKeyboardMarkup(buttons)
- await query.message.edit_text(
- text=script.CORONA_TXT,
- disable_web_page_preview=True,
- reply_markup=reply_markup,
- parse_mode=enums.ParseMode.HTML
- )
- elif query.data == "abook":
- buttons = [[
- InlineKeyboardButton('ʙᴀᴄᴋ', callback_data='aswin')
- ]]
- reply_markup = InlineKeyboardMarkup(buttons)
- await query.message.edit_text(
- text=script.ABOOK_TXT,
- disable_web_page_preview=True,
- reply_markup=reply_markup,
- parse_mode=enums.ParseMode.HTML
- )
- elif query.data == "opnai":
- buttons = [[
- InlineKeyboardButton('ʙᴀᴄᴋ', callback_data='aswin')
- ]]
- reply_markup = InlineKeyboardMarkup(buttons)
- await query.message.edit_text(
- text=script.OPNAI_TXT,
- reply_markup=reply_markup,
- parse_mode=enums.ParseMode.HTML
- )
- elif query.data == "sticker":
- buttons = [[
- InlineKeyboardButton('ʙᴀᴄᴋ', callback_data='aswin')
- ]]
- reply_markup = InlineKeyboardMarkup(buttons)
- await query.message.edit_text(
- text=script.STICKER_TXT,
- disable_web_page_preview=True,
- reply_markup=reply_markup,
- parse_mode=enums.ParseMode.HTML
- )
- elif query.data == "pings":
- buttons = [[
- InlineKeyboardButton('ʙᴀᴄᴋ', callback_data='aswin')
- ]]
- reply_markup = InlineKeyboardMarkup(buttons)
- await query.message.edit_text(
- text=script.PINGS_TXT,
- reply_markup=reply_markup,
- parse_mode=enums.ParseMode.HTML
- )
- elif query.data == "json":
- buttons = [[
- InlineKeyboardButton('ʙᴀᴄᴋ', callback_data='help')
- ]]
- reply_markup = InlineKeyboardMarkup(buttons)
- await query.message.edit_text(
- text=script.JSON_TXT,
- reply_markup=reply_markup,
- parse_mode=enums.ParseMode.HTML
- )
- elif query.data == "urlshort":
- buttons = [[
- InlineKeyboardButton('ʙᴀᴄᴋ', callback_data='aswin')
- ]]
- reply_markup = InlineKeyboardMarkup(buttons)
- await query.message.edit_text(
- text=script.URLSHORT_TXT,
- disable_web_page_preview=True,
- reply_markup=reply_markup,
- parse_mode=enums.ParseMode.HTML
- )
- elif query.data == "whois":
- buttons = [[
- InlineKeyboardButton('ʙᴀᴄᴋ', callback_data='aswin')
- ]]
- reply_markup = InlineKeyboardMarkup(buttons)
- await query.message.edit_text(
- text=script.WHOIS_TXT,
- reply_markup=reply_markup,
- parse_mode=enums.ParseMode.HTML
- )
- elif query.data == "font":
- buttons = [[
- InlineKeyboardButton('ʙᴀᴄᴋ', callback_data='aswins')
- ]]
- reply_markup = InlineKeyboardMarkup(buttons)
- await query.message.edit_text(
- text=script.FONT_TXT,
- reply_markup=reply_markup,
- parse_mode=enums.ParseMode.HTML
- )
- elif query.data == "carb":
- buttons = [[
- InlineKeyboardButton('ʙᴀᴄᴋ', callback_data='aswins')
- ]]
- reply_markup = InlineKeyboardMarkup(buttons)
- await query.message.edit_text(
- text=script.CARB_TXT,
- reply_markup=reply_markup,
- parse_mode=enums.ParseMode.HTML
- )
- elif query.data == "fun":
- buttons = [[
- InlineKeyboardButton('ʙᴀᴄᴋ', callback_data='aswin')
- ]]
- reply_markup = InlineKeyboardMarkup(buttons)
- await query.message.edit_text(
- text=script.FUN_TXT,
- reply_markup=reply_markup,
- parse_mode=enums.ParseMode.HTML
- )
- elif query.data == "stats":
- buttons = [[
- InlineKeyboardButton('ʙᴀᴄᴋ', callback_data='start'),
- InlineKeyboardButton('ʀᴇғʀᴇsʜ', callback_data='rfrsh')
- ]]
- await client.edit_message_media(
- query.message.chat.id,
- query.message.id,
- InputMediaPhoto(random.choice(PICS))
- )
- reply_markup = InlineKeyboardMarkup(buttons)
- total = await Media.count_documents()
- users = await db.total_users_count()
- chats = await db.total_chat_count()
- monsize = await db.get_db_size()
- free = 536870912 - monsize
- monsize = get_size(monsize)
- free = get_size(free)
- await query.message.edit_text(
- text=script.STATUS_TXT.format(total, users, chats, monsize, free),
- reply_markup=reply_markup,
- parse_mode=enums.ParseMode.HTML
- )
- elif query.data == "rfrsh":
- await query.answer("𝙁𝙚𝙩𝙘𝙝𝙞𝙣𝙜 𝙈𝙤𝙣𝙜𝙤𝘿𝙗 𝘿𝙖𝙩𝙖𝘽𝙖𝙨𝙚")
- buttons = [[
- InlineKeyboardButton('ʙᴀᴄᴋ', callback_data='stats'),
- InlineKeyboardButton('ʀᴇғʀᴇsʜ', callback_data='rfrsh')
- ]]
- await client.edit_message_media(
- query.message.chat.id,
- query.message.id,
- InputMediaPhoto(random.choice(PICS))
- )
- reply_markup = InlineKeyboardMarkup(buttons)
- total = await Media.count_documents()
- users = await db.total_users_count()
- chats = await db.total_chat_count()
- monsize = await db.get_db_size()
- free = 536870912 - monsize
- monsize = get_size(monsize)
- free = get_size(free)
- await query.message.edit_text(
- text=script.STATUS_TXT.format(total, users, chats, monsize, free),
- reply_markup=reply_markup,
- parse_mode=enums.ParseMode.HTML
- )
- elif query.data.startswith("setgs"):
- ident, set_type, status, grp_id = query.data.split("#")
- grpid = await active_connection(str(query.from_user.id))
-
- if str(grp_id) != str(grpid):
- await query.message.edit("Your Active Connection Has Been Changed. Go To /settings.")
- return await query.answer(MSG_ALRT)
-
- if status == "True":
- await save_group_settings(grpid, set_type, False)
- else:
- await save_group_settings(grpid, set_type, True)
-
- settings = await get_settings(grpid)
- try:
- if settings['auto_delete']:
- settings = await get_settings(grp_id)
- except KeyError:
- await save_group_settings(grp_id, 'auto_delete', True)
- settings = await get_settings(grp_id)
-
- if settings is not None:
- buttons = [
- [
- InlineKeyboardButton('Filter Button',
- callback_data=f'setgs#button#{settings["button"]}#{str(grp_id)}'),
- InlineKeyboardButton('Single' if settings["button"] else 'Double',
- callback_data=f'setgs#button#{settings["button"]}#{str(grp_id)}')
- ],
- [
- InlineKeyboardButton('Redirect To', callback_data=f'setgs#botpm#{settings["botpm"]}#{str(grp_id)}'),
- InlineKeyboardButton('Bot PM' if settings["botpm"] else 'Channel',
- callback_data=f'setgs#botpm#{settings["botpm"]}#{str(grp_id)}')
- ],
- [
- InlineKeyboardButton('File Secure',
- callback_data=f'setgs#file_secure#{settings["file_secure"]}#{str(grp_id)}'),
- InlineKeyboardButton('✅ Yes' if settings["file_secure"] else '❌ No',
- callback_data=f'setgs#file_secure#{settings["file_secure"]}#{str(grp_id)}')
- ],
- [
- InlineKeyboardButton('IMDB', callback_data=f'setgs#imdb#{settings["imdb"]}#{str(grp_id)}'),
- InlineKeyboardButton('✅ Yes' if settings["imdb"] else '❌ No',
- callback_data=f'setgs#imdb#{settings["imdb"]}#{str(grp_id)}')
- ],
- [
- InlineKeyboardButton('Spell Check',
- callback_data=f'setgs#spell_check#{settings["spell_check"]}#{str(grp_id)}'),
- InlineKeyboardButton('✅ Yes' if settings["spell_check"] else '❌ No',
- callback_data=f'setgs#spell_check#{settings["spell_check"]}#{str(grp_id)}')
- ],
- [
- InlineKeyboardButton('Welcome', callback_data=f'setgs#welcome#{settings["welcome"]}#{str(grp_id)}'),
- InlineKeyboardButton('✅ Yes' if settings["welcome"] else '❌ No',
- callback_data=f'setgs#welcome#{settings["welcome"]}#{str(grp_id)}')
- ],
- [
- InlineKeyboardButton('Auto Delete',
- callback_data=f'setgs#auto_delete#{settings["auto_delete"]}#{str(grp_id)}'),
- InlineKeyboardButton('10 Mins' if settings["auto_delete"] else 'OFF',
- callback_data=f'setgs#auto_delete#{settings["auto_delete"]}#{str(grp_id)}')
- ],
- [
- InlineKeyboardButton('ShortLink',
- callback_data=f'setgs#is_shortlink#{settings["is_shortlink"]}#{str(grp_id)}'),
- InlineKeyboardButton('✅ ON' if settings["is_shortlink"] else '❌ OFF',
- callback_data=f'setgs#is_shortlink#{settings["is_shortlink"]}#{str(grp_id)}')
- ],
- [
- InlineKeyboardButton("Close", callback_data="close_data")
- ]
-
- ]
- reply_markup = InlineKeyboardMarkup(buttons)
- await query.message.edit_reply_markup(reply_markup)
- await query.answer(MSG_ALRT)
-
-
-async def auto_filter(client, msg, spoll=False):
- reqstr1 = msg.from_user.id if msg.from_user else 0
- reqstr = await client.get_users(reqstr1)
- if not spoll:
- message = msg
- settings = await get_settings(message.chat.id)
- if message.text.startswith("/"): return # ignore commands
- if re.findall("((^\/|^,|^!|^\.|^[\U0001F600-\U000E007F]).*)", message.text):
- return
- if len(message.text) < 100:
- search = message.text
- files, offset, total_results = await get_search_results(search.lower(), offset=0, filter=True)
- if not files:
- if settings["spell_check"]:
- return await advantage_spell_chok(client, msg)
- else:
- await client.send_message(chat_id=LOG_CHANNEL,
- text=(script.NORSLTS.format(reqstr.id, reqstr.mention, search)))
- return
- else:
- return
- else:
- message = msg.message.reply_to_message # msg will be callback query
- search, files, offset, total_results = spoll
- settings = await get_settings(message.chat.id)
- if 'is_shortlink' in settings.keys():
- ENABLE_SHORTLINK = settings['is_shortlink']
- else:
- await save_group_settings(message.chat.id, 'is_shortlink', False)
- ENABLE_SHORTLINK = False
- pre = 'filep' if settings['file_secure'] else 'file'
- if ENABLE_SHORTLINK == True:
- if settings["button"]:
- btn = [
- [
- InlineKeyboardButton(
- text=f"[{get_size(file.file_size)}] {file.file_name}", url=await get_shortlink(message.chat.id,
- f"https://telegram.me/{temp.U_NAME}?start=files_{file.file_id}")
- ),
- ]
- for file in files
- ]
- else:
- btn = [
- [
- InlineKeyboardButton(
- text=f"{file.file_name}",
- url=await get_shortlink(message.chat.id,
- f"https://telegram.me/{temp.U_NAME}?start=files_{file.file_id}")
- ),
- InlineKeyboardButton(
- text=f"{get_size(file.file_size)}",
- url=await get_shortlink(message.chat.id,
- f"https://telegram.me/{temp.U_NAME}?start=files_{file.file_id}")
- ),
- ]
- for file in files
- ]
- else:
- if settings["button"]:
- btn = [
- [
- InlineKeyboardButton(
- text=f"[{get_size(file.file_size)}] {file.file_name}", callback_data=f'{pre}#{file.file_id}'
- ),
- ]
- for file in files
- ]
- else:
- btn = [
- [
- InlineKeyboardButton(
- text=f"{file.file_name}",
- callback_data=f'{pre}#{file.file_id}',
- ),
- InlineKeyboardButton(
- text=f"{get_size(file.file_size)}",
- callback_data=f'{pre}#{file.file_id}',
- ),
- ]
- for file in files
- ]
-
- key = f"{message.chat.id}-{message.id}"
- btn.insert(0,
- [
- InlineKeyboardButton(f' ♀️ {search} ♀️ ', 'qinfo')
- ]
- )
- btn.insert(1,
- [
- InlineKeyboardButton("Send All !",
- callback_data=f"send_fall#{pre}#{message.chat.id}-{message.id}#{0}"),
- InlineKeyboardButton("ʟᴀɴɢᴜᴀɢᴇs", callback_data=f"languages#{search.replace(' ', '_')}#{key}")
- ]
- )
- btn.insert(2,
- [
- InlineKeyboardButton(f'ɪɴꜰᴏ', 'reqinfo'),
- InlineKeyboardButton(f'ᴍᴏᴠɪᴇ', 'minfo'),
- InlineKeyboardButton(f'sᴇʀɪᴇs', 'sinfo'),
- InlineKeyboardButton(f'ᴛɪᴘs', 'tinfo')
- ]
- )
-
- if offset != "":
- key = f"{message.chat.id}-{message.id}"
- BUTTONS[key] = search
- req = message.from_user.id if message.from_user else 0
- btn.append(
- [InlineKeyboardButton(text=f"𝐏𝐀𝐆𝐄 1/{math.ceil(int(total_results) / 7)}", callback_data="pages"),
- InlineKeyboardButton(text="𝐍𝐄𝐗𝐓 ⌦", callback_data=f"next_{req}_{key}_{offset}")]
- )
- else:
- btn.append(
- [InlineKeyboardButton(text="𝐍𝐎 𝐌𝐎𝐑𝐄 𝐏𝐀𝐆𝐄𝐒 𝐀𝐕𝐀𝐈𝐋𝐀𝐁𝐋𝐄", callback_data="pages")]
- )
- imdb = await get_poster(search, file=(files[0]).file_name) if settings["imdb"] else None
- TEMPLATE = settings['template']
- if imdb:
- cap = TEMPLATE.format(
- query=search,
- title=imdb['title'],
- votes=imdb['votes'],
- aka=imdb["aka"],
- seasons=imdb["seasons"],
- box_office=imdb['box_office'],
- localized_title=imdb['localized_title'],
- kind=imdb['kind'],
- imdb_id=imdb["imdb_id"],
- cast=imdb["cast"],
- runtime=imdb["runtime"],
- countries=imdb["countries"],
- certificates=imdb["certificates"],
- languages=imdb["languages"],
- director=imdb["director"],
- writer=imdb["writer"],
- producer=imdb["producer"],
- composer=imdb["composer"],
- cinematographer=imdb["cinematographer"],
- music_team=imdb["music_team"],
- distributors=imdb["distributors"],
- release_date=imdb['release_date'],
- year=imdb['year'],
- genres=imdb['genres'],
- poster=imdb['poster'],
- plot=imdb['plot'],
- rating=imdb['rating'],
- url=imdb['url'],
- **locals()
- )
- else:
- cap = f"𝙃𝙚𝙧𝙚 𝙞𝙨 𝙬𝙝𝙖𝙩 𝙞𝙨 𝙛𝙤𝙪𝙣𝙙 𝙮𝙤𝙪𝙧 𝙦𝙪𝙚𝙧𝙮:\n {search}\n👤𝙍𝙚𝙦𝙪𝙚𝙨𝙩𝙚𝙙 𝘽𝙮 : {message.from_user.mention}\n👥𝙂𝙧𝙤𝙪𝙥 : {message.chat.title}"
- if imdb and imdb.get('poster'):
- try:
- if message.chat.id == SUPPORT_CHAT_ID:
- await message.reply_text(
- text=f"Hᴇʏ {message.from_user.mention}, {str(total_results)} ʀᴇsᴜʟᴛs ᴀʀᴇ ғᴏᴜɴᴅ ɪɴ ᴍʏ ᴅᴀᴛᴀʙᴀsᴇ ғᴏʀ ʏᴏᴜʀ ᴏᴜᴇʀʏ {search}. Kɪɴᴅʟʏ ᴜsᴇ ɪɴʟɪɴᴇ sᴇᴀʀᴄʜ ᴏʀ ᴍᴀᴋᴇ ᴀ ɢʀᴏᴜᴘ ᴀɴᴅ ᴀᴅᴅ ᴍᴇ ᴀs ᴀᴅᴍɪɴ ᴛᴏ ɢᴇᴛ ᴍᴏᴠɪᴇ ғɪʟᴇs. Tʜɪs ɪs ᴀ sᴜᴘᴘᴏʀᴛ ɢʀᴏᴜᴘ sᴏ ᴛʜᴀᴛ ʏᴏᴜ ᴄᴀɴ'ᴛ ɢᴇᴛ ғɪʟᴇs ғʀᴏᴍ ʜᴇʀᴇ...",
- reply_markup=InlineKeyboardMarkup(
- [[
- InlineKeyboardButton('Rᴇǫᴜᴇsᴛ ʜᴇʀᴇ 🚀', url='https://t.me/moviecafe_01')
- ]]
- )
- )
- else:
- hehe = await message.reply_photo(photo=imdb.get('poster'), caption=cap[:1024],
- reply_markup=InlineKeyboardMarkup(btn))
- try:
- if settings['auto_delete']:
- await asyncio.sleep(600)
- await hehe.delete()
- await message.delete()
- except KeyError:
- grpid = await active_connection(str(message.from_user.id))
- await save_group_settings(grpid, 'auto_delete', True)
- settings = await get_settings(message.chat.id)
- if settings['auto_delete']:
- await asyncio.sleep(600)
- await hehe.delete()
- await message.delete()
- except (MediaEmpty, PhotoInvalidDimensions, WebpageMediaEmpty):
- if message.chat.id == SUPPORT_CHAT_ID:
- await message.reply_text(
- text=f"Hᴇʏ {message.from_user.mention}, {str(total_results)} ʀᴇsᴜʟᴛs ᴀʀᴇ ғᴏᴜɴᴅ ɪɴ ᴍʏ ᴅᴀᴛᴀʙᴀsᴇ ғᴏʀ ʏᴏᴜʀ ᴏᴜᴇʀʏ {search}. Kɪɴᴅʟʏ ᴜsᴇ ɪɴʟɪɴᴇ sᴇᴀʀᴄʜ ᴏʀ ᴍᴀᴋᴇ ᴀ ɢʀᴏᴜᴘ ᴀɴᴅ ᴀᴅᴅ ᴍᴇ ᴀs ᴀᴅᴍɪɴ ᴛᴏ ɢᴇᴛ ᴍᴏᴠɪᴇ ғɪʟᴇs. Tʜɪs ɪs ᴀ sᴜᴘᴘᴏʀᴛ ɢʀᴏᴜᴘ sᴏ ᴛʜᴀᴛ ʏᴏᴜ ᴄᴀɴ'ᴛ ɢᴇᴛ ғɪʟᴇs ғʀᴏᴍ ʜᴇʀᴇ...",
- reply_markup=InlineKeyboardMarkup(
- [[
- InlineKeyboardButton('Rᴇǫᴜᴇsᴛ ʜᴇʀᴇ 🚀', url='https://t.me/moviecafe_01')
- ]]
- )
- )
- else:
- pic = imdb.get('poster')
- poster = pic.replace('.jpg', "._V1_UX360.jpg")
- hmm = await message.reply_photo(photo=poster, caption=cap[:1024],
- reply_markup=InlineKeyboardMarkup(btn))
- try:
- if settings['auto_delete']:
- await asyncio.sleep(600)
- await hmm.delete()
- await message.delete()
- except KeyError:
- grpid = await active_connection(str(message.from_user.id))
- await save_group_settings(grpid, 'auto_delete', True)
- settings = await get_settings(message.chat.id)
- if settings['auto_delete']:
- await asyncio.sleep(600)
- await hmm.delete()
- await message.delete()
- except Exception as e:
- if message.chat.id == SUPPORT_CHAT_ID:
- await message.reply_text(
- text=f"Hᴇʏ {message.from_user.mention}, {str(total_results)} ʀᴇsᴜʟᴛs ᴀʀᴇ ғᴏᴜɴᴅ ɪɴ ᴍʏ ᴅᴀᴛᴀʙᴀsᴇ ғᴏʀ ʏᴏᴜʀ ᴏᴜᴇʀʏ {search}. Kɪɴᴅʟʏ ᴜsᴇ ɪɴʟɪɴᴇ sᴇᴀʀᴄʜ ᴏʀ ᴍᴀᴋᴇ ᴀ ɢʀᴏᴜᴘ ᴀɴᴅ ᴀᴅᴅ ᴍᴇ ᴀs ᴀᴅᴍɪɴ ᴛᴏ ɢᴇᴛ ᴍᴏᴠɪᴇ ғɪʟᴇs. Tʜɪs ɪs ᴀ sᴜᴘᴘᴏʀᴛ ɢʀᴏᴜᴘ sᴏ ᴛʜᴀᴛ ʏᴏᴜ ᴄᴀɴ'ᴛ ɢᴇᴛ ғɪʟᴇs ғʀᴏᴍ ʜᴇʀᴇ...",
- reply_markup=InlineKeyboardMarkup(
- [[
- InlineKeyboardButton('Rᴇǫᴜᴇsᴛ ʜᴇʀᴇ 🚀', url='https://t.me/moviecafe_01')
- ]]
- )
- )
- else:
- logger.exception(e)
- fek = await message.reply_photo(photo=NOR_IMG, caption=cap, reply_markup=InlineKeyboardMarkup(btn))
- try:
- if settings['auto_delete']:
- await asyncio.sleep(600)
- await fek.delete()
- await message.delete()
- except KeyError:
- grpid = await active_connection(str(message.from_user.id))
- await save_group_settings(grpid, 'auto_delete', True)
- settings = await get_settings(message.chat.id)
- if settings['auto_delete']:
- await asyncio.sleep(600)
- await fek.delete()
- await message.delete()
- else:
- if message.chat.id == SUPPORT_CHAT_ID:
- await message.reply_text(
- text=f"Hᴇʏ {message.from_user.mention}, {str(total_results)} ʀᴇsᴜʟᴛs ᴀʀᴇ ғᴏᴜɴᴅ ɪɴ ᴍʏ ᴅᴀᴛᴀʙᴀsᴇ ғᴏʀ ʏᴏᴜʀ ᴏᴜᴇʀʏ {search}. Kɪɴᴅʟʏ ᴜsᴇ ɪɴʟɪɴᴇ sᴇᴀʀᴄʜ ᴏʀ ᴍᴀᴋᴇ ᴀ ɢʀᴏᴜᴘ ᴀɴᴅ ᴀᴅᴅ ᴍᴇ ᴀs ᴀᴅᴍɪɴ ᴛᴏ ɢᴇᴛ ᴍᴏᴠɪᴇ ғɪʟᴇs. Tʜɪs ɪs ᴀ sᴜᴘᴘᴏʀᴛ ɢʀᴏᴜᴘ sᴏ ᴛʜᴀᴛ ʏᴏᴜ ᴄᴀɴ'ᴛ ɢᴇᴛ ғɪʟᴇs ғʀᴏᴍ ʜᴇʀᴇ...",
- reply_markup=InlineKeyboardMarkup(
- [[
- InlineKeyboardButton('Rᴇǫᴜᴇsᴛ ʜᴇʀᴇ 🚀', url='https://t.me/moviecafe_01')
- ]]
- )
- )
- else:
- fuk = await message.reply_photo(photo=NOR_IMG, caption=cap, reply_markup=InlineKeyboardMarkup(btn))
- try:
- if settings['auto_delete']:
- await asyncio.sleep(600)
- await fuk.delete()
- await message.delete()
- except KeyError:
- grpid = await active_connection(str(message.from_user.id))
- await save_group_settings(grpid, 'auto_delete', True)
- settings = await get_settings(message.chat.id)
- if settings['auto_delete']:
- await asyncio.sleep(600)
- await fuk.delete()
- await message.delete()
-
- if spoll:
- await msg.message.delete()
-
-
-async def advantage_spell_chok(client, msg):
- mv_id = msg.id
- mv_rqst = msg.text
- reqstr1 = msg.from_user.id if msg.from_user else 0
- reqstr = await client.get_users(reqstr1)
- settings = await get_settings(msg.chat.id)
- query = re.sub(
- r"\b(pl(i|e)*?(s|z+|ease|se|ese|(e+)s(e)?)|((send|snd|giv(e)?|gib)(\sme)?)|movie(s)?|new|latest|br((o|u)h?)*|^h(e|a)?(l)*(o)*|mal(ayalam)?|t(h)?amil|file|that|find|und(o)*|kit(t(i|y)?)?o(w)?|thar(u)?(o)*w?|kittum(o)*|aya(k)*(um(o)*)?|full\smovie|any(one)|with\ssubtitle(s)?)",
- "", msg.text, flags=re.IGNORECASE) # plis contribute some common words
- RQST = query.strip()
- query = query.strip() + " movie"
- try:
- movies = await get_poster(mv_rqst, bulk=True)
- except Exception as e:
- logger.exception(e)
- await client.send_message(chat_id=LOG_CHANNEL, text=(script.NORSLTS.format(reqstr.id, reqstr.mention, mv_rqst)))
- k = await msg.reply(script.I_CUDNT.format(reqstr.mention))
- await asyncio.sleep(8)
- await k.delete()
- return
- movielist = []
- if not movies:
- reqst_gle = mv_rqst.replace(" ", "+")
- button = [[
- InlineKeyboardButton("Gᴏᴏɢʟᴇ", url=f"https://www.google.com/search?q={reqst_gle}")
- ]]
- await client.send_message(chat_id=LOG_CHANNEL, text=(script.NORSLTS.format(reqstr.id, reqstr.mention, mv_rqst)))
- k = await msg.reply_photo(
- photo=SPELL_IMG,
- caption=script.I_CUDNT.format(mv_rqst),
- reply_markup=InlineKeyboardMarkup(button)
- )
- await asyncio.sleep(30)
- await k.delete()
- return
- movielist += [movie.get('title') for movie in movies]
- movielist += [f"{movie.get('title')} {movie.get('year')}" for movie in movies]
- SPELL_CHECK[mv_id] = movielist
- btn = [
- [
- InlineKeyboardButton(
- text=movie_name.strip(),
- callback_data=f"spol#{reqstr1}#{k}",
- )
- ]
- for k, movie_name in enumerate(movielist)
- ]
- btn.append([InlineKeyboardButton(text="Close", callback_data=f'spol#{reqstr1}#close_spellcheck')])
- spell_check_del = await msg.reply_photo(
- photo=(SPELL_IMG),
- caption=(script.CUDNT_FND.format(reqstr.mention)),
- reply_markup=InlineKeyboardMarkup(btn)
- )
-
- try:
- if settings['auto_delete']:
- await asyncio.sleep(600)
- await spell_check_del.delete()
- except KeyError:
- grpid = await active_connection(str(message.from_user.id))
- await save_group_settings(grpid, 'auto_delete', True)
- settings = await get_settings(message.chat.id)
- if settings['auto_delete']:
- await asyncio.sleep(600)
- await spell_check_del.delete()
-
-
-async def manual_filters(client, message, text=False):
- settings = await get_settings(message.chat.id)
- group_id = message.chat.id
- name = text or message.text
- reply_id = message.reply_to_message.id if message.reply_to_message else message.id
- keywords = await get_filters(group_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)
-
- if reply_text:
- reply_text = reply_text.replace("\\n", "\n").replace("\\t", "\t")
-
- if btn is not None:
- try:
- if fileid == "None":
- if btn == "[]":
- elsa = await client.send_message(
- group_id,
- reply_text,
- disable_web_page_preview=True,
- protect_content=True if settings["file_secure"] else False,
- reply_to_message_id=reply_id
- )
- try:
- if settings['auto_ffilter']:
- await auto_filter(client, message)
- except KeyError:
- grpid = await active_connection(str(message.from_user.id))
- await save_group_settings(grpid, 'auto_ffilter', True)
- settings = await get_settings(message.chat.id)
- if settings['auto_ffilter']:
- await auto_filter(client, message)
- try:
- if settings['auto_delete']:
- await asyncio.sleep(600)
- await elsa.delete()
- except KeyError:
- grpid = await active_connection(str(message.from_user.id))
- await save_group_settings(grpid, 'auto_delete', True)
- settings = await get_settings(message.chat.id)
- if settings['auto_delete']:
- await asyncio.sleep(600)
- await elsa.delete()
-
- else:
- button = eval(btn)
- hmm = await client.send_message(
- group_id,
- reply_text,
- disable_web_page_preview=True,
- reply_markup=InlineKeyboardMarkup(button),
- protect_content=True if settings["file_secure"] else False,
- reply_to_message_id=reply_id
- )
- try:
- if settings['auto_ffilter']:
- await auto_filter(client, message)
- except KeyError:
- grpid = await active_connection(str(message.from_user.id))
- await save_group_settings(grpid, 'auto_ffilter', True)
- settings = await get_settings(message.chat.id)
- if settings['auto_ffilter']:
- await auto_filter(client, message)
- try:
- if settings['auto_delete']:
- await asyncio.sleep(600)
- await hmm.delete()
- except KeyError:
- grpid = await active_connection(str(message.from_user.id))
- await save_group_settings(grpid, 'auto_delete', True)
- settings = await get_settings(message.chat.id)
- if settings['auto_delete']:
- await asyncio.sleep(600)
- await hmm.delete()
-
- elif btn == "[]":
- oto = await client.send_cached_media(
- group_id,
- fileid,
- caption=reply_text or "",
- protect_content=True if settings["file_secure"] else False,
- reply_to_message_id=reply_id
- )
- try:
- if settings['auto_ffilter']:
- await auto_filter(client, message)
- except KeyError:
- grpid = await active_connection(str(message.from_user.id))
- await save_group_settings(grpid, 'auto_ffilter', True)
- settings = await get_settings(message.chat.id)
- if settings['auto_ffilter']:
- await auto_filter(client, message)
- try:
- if settings['auto_delete']:
- await asyncio.sleep(600)
- await oto.delete()
- except KeyError:
- grpid = await active_connection(str(message.from_user.id))
- await save_group_settings(grpid, 'auto_delete', True)
- settings = await get_settings(message.chat.id)
- if settings['auto_delete']:
- await asyncio.sleep(600)
- await oto.delete()
-
- else:
- button = eval(btn)
- dlt = await message.reply_cached_media(
- fileid,
- caption=reply_text or "",
- reply_markup=InlineKeyboardMarkup(button),
- reply_to_message_id=reply_id
- )
- try:
- if settings['auto_ffilter']:
- await auto_filter(client, message)
- except KeyError:
- grpid = await active_connection(str(message.from_user.id))
- await save_group_settings(grpid, 'auto_ffilter', True)
- settings = await get_settings(message.chat.id)
- if settings['auto_ffilter']:
- await auto_filter(client, message)
- try:
- if settings['auto_delete']:
- await asyncio.sleep(600)
- await dlt.delete()
- except KeyError:
- grpid = await active_connection(str(message.from_user.id))
- await save_group_settings(grpid, 'auto_delete', True)
- settings = await get_settings(message.chat.id)
- if settings['auto_delete']:
- await asyncio.sleep(600)
- await dlt.delete()
-
- except Exception as e:
- logger.exception(e)
- break
- else:
- return False
-
-
-async def global_filters(client, message, text=False):
- settings = await get_settings(message.chat.id)
- group_id = message.chat.id
- name = text or message.text
- reply_id = message.reply_to_message.id if message.reply_to_message else message.id
- keywords = await get_gfilters('gfilters')
- 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_gfilter('gfilters', keyword)
-
- if reply_text:
- reply_text = reply_text.replace("\\n", "\n").replace("\\t", "\t")
-
- if btn is not None:
- try:
- if fileid == "None":
- if btn == "[]":
- joelkb = await client.send_message(
- group_id,
- reply_text,
- disable_web_page_preview=True,
- reply_to_message_id=reply_id
- )
-
- else:
- button = eval(btn)
- hmm = await client.send_message(
- group_id,
- reply_text,
- disable_web_page_preview=True,
- reply_markup=InlineKeyboardMarkup(button),
- reply_to_message_id=reply_id
- )
-
- elif btn == "[]":
- oto = await client.send_cached_media(
- group_id,
- fileid,
- caption=reply_text or "",
- reply_to_message_id=reply_id
- )
-
- else:
- button = eval(btn)
- dlt = await message.reply_cached_media(
- fileid,
- caption=reply_text or "",
- reply_markup=InlineKeyboardMarkup(button),
- reply_to_message_id=reply_id
- )
-
- except Exception as e:
- logger.exception(e)
- break
- else:
- return False
-
From 0cdee21234bd0ee24318c93ae1af51a079d3663c Mon Sep 17 00:00:00 2001
From: Soul pc <119080077+soulpc@users.noreply.github.com>
Date: Tue, 19 Dec 2023 11:28:27 +0530
Subject: [PATCH 226/237] Add files via upload
---
plugins/pm_filter (7).py | 1975 ++++++++++++++++++++++++++++++++++++++
1 file changed, 1975 insertions(+)
create mode 100644 plugins/pm_filter (7).py
diff --git a/plugins/pm_filter (7).py b/plugins/pm_filter (7).py
new file mode 100644
index 0000000..fe65487
--- /dev/null
+++ b/plugins/pm_filter (7).py
@@ -0,0 +1,1975 @@
+import asyncio
+import re
+import ast
+import math
+import random
+lock = asyncio.Lock()
+
+from pyrogram.errors.exceptions.bad_request_400 import MediaEmpty, PhotoInvalidDimensions, WebpageMediaEmpty
+from Script import script
+import pyrogram
+from database.connections_mdb import active_connection, all_connections, delete_connection, if_active, make_active, \
+ make_inactive
+from info import ADMINS, AUTH_CHANNEL, AUTH_USERS, SUPPORT_CHAT_ID, SUPPORT_CHAT, CUSTOM_FILE_CAPTION, PICS, AUTH_GROUPS, P_TTI_SHOW_OFF, NOR_IMG, LOG_CHANNEL, SPELL_IMG, MAX_B_TN, IMDB, \
+ SINGLE_BUTTON, SPELL_CHECK_REPLY, IMDB_TEMPLATE, NO_RESULTS_MSG
+from pyrogram.types import InlineKeyboardMarkup, InlineKeyboardButton, CallbackQuery, InputMediaPhoto
+from pyrogram import Client, filters, enums
+from pyrogram.errors import FloodWait, UserIsBlocked, MessageNotModified, PeerIdInvalid
+from utils import get_size, is_subscribed, get_poster, search_gagala, temp, get_settings, save_group_settings, send_all
+from database.users_chats_db import db
+from database.ia_filterdb import Media, get_file_details, get_search_results, get_bad_files
+from database.filters_mdb import (
+ del_all,
+ find_filter,
+ get_filters,
+)
+from database.gfilters_mdb import (
+ find_gfilter,
+ get_gfilters,
+ del_allg
+)
+import logging
+
+logger = logging.getLogger(__name__)
+logger.setLevel(logging.ERROR)
+
+BUTTONS = {}
+SPELL_CHECK = {}
+
+
+@Client.on_message(filters.group & filters.text & filters.incoming)
+async def give_filter(client, message):
+ if message.chat.id != SUPPORT_CHAT_ID:
+ glob = await global_filters(client, message)
+ if glob == False:
+ manual = await manual_filters(client, message)
+ if manual == False:
+ settings = await get_settings(message.chat.id)
+ try:
+ if settings['auto_ffilter']:
+ await auto_filter(client, message)
+ except KeyError:
+ grpid = await active_connection(str(message.from_user.id))
+ await save_group_settings(grpid, 'auto_ffilter', True)
+ settings = await get_settings(message.chat.id)
+ if settings['auto_ffilter']:
+ await auto_filter(client, message)
+ else: #a better logic to avoid repeated lines of code in auto_filter function
+ search = message.text
+ temp_files, temp_offset, total_results = await get_search_results(chat_id=message.chat.id, query=search.lower(), offset=0, filter=True)
+ if total_results == 0:
+ return
+ else:
+ return await message.reply_text(f"👋 𝖧𝖾𝗒 {message.from_user.mention} \n📁 {str(total_results)} 𝖱𝖾𝗌𝗎𝗅𝗍𝗌 𝖺𝗋𝖾 𝖿𝗈𝗎𝗇𝖽 𝖿𝗈𝗋 𝗒𝗈𝗎𝗋 𝗊𝗎𝖾𝗋𝗒 {search}.\n\nKindly ask movies and series here ⬇\n@blaster_arena & @blaster_movies")
+
+@Client.on_message(filters.private & filters.text & filters.incoming)
+async def pv_filter(client, message):
+ kd = await global_filters(client, message)
+ if kd == False:
+ await auto_filter(client, message)
+
+@Client.on_callback_query(filters.regex(r"^next"))
+async def next_page(bot, query):
+ ident, req, key, offset = query.data.split("_")
+ if int(req) not in [query.from_user.id, 0]:
+ return await query.answer(script.ALRT_TXT.format(query.from_user.first_name), show_alert=True)
+ try:
+ offset = int(offset)
+ except:
+ offset = 0
+ search = BUTTONS.get(key)
+ if not search:
+ await query.answer(script.OLD_ALRT_TXT.format(query.from_user.first_name),show_alert=True)
+ return
+
+ files, n_offset, total = await get_search_results(query.message.chat.id, search, offset=offset, filter=True)
+ try:
+ n_offset = int(n_offset)
+ except:
+ n_offset = 0
+
+ if not files:
+ return
+ settings = await get_settings(query.message.chat.id)
+ pre = 'filep' if settings['file_secure'] else 'file'
+ temp.FILES_IDS[key] = files
+ if settings['button']:
+ btn = [
+ [
+ InlineKeyboardButton(
+ text=f"🔖{get_size(file.file_size)}🔮{file.file_name}", callback_data=f'{pre}#{file.file_id}'
+ ),
+ ]
+ for file in files
+ ]
+ else:
+ btn = [
+ [
+ InlineKeyboardButton(
+ text=f"{file.file_name}", callback_data=f'{pre}#{file.file_id}'
+ ),
+ InlineKeyboardButton(
+ text=f"{get_size(file.file_size)}",
+ callback_data=f'{pre}#{file.file_id}',
+ ),
+ ]
+ for file in files
+ ]
+ try:
+ if settings['auto_delete']:
+ btn.insert(0,
+ [
+ InlineKeyboardButton(f'😇 Info', 'tips'),
+ InlineKeyboardButton(f'📝 𝖳𝗂𝗉𝗌', 'info')
+ ]
+ )
+
+ else:
+ btn.insert(0,
+ [
+ InlineKeyboardButton(f'😇 Info', 'tips'),
+ InlineKeyboardButton(f'📝 𝖳𝗂𝗉𝗌', 'info')
+ ]
+ )
+
+ except KeyError:
+ grpid = await active_connection(str(query.message.from_user.id))
+ await save_group_settings(grpid, 'auto_delete', True)
+ settings = await get_settings(query.message.chat.id)
+ if settings['auto_delete']:
+ btn.insert(0,
+ [
+ InlineKeyboardButton(f'😇 Info', 'tips'),
+ InlineKeyboardButton(f'📝 𝖳𝗂𝗉𝗌', 'info')
+ ]
+ )
+
+ else:
+ btn.insert(0,
+ [
+ InlineKeyboardButton(f'😇 Info', 'tips'),
+ InlineKeyboardButton(f'📝 𝖳𝗂𝗉𝗌', 'info')
+ ]
+ )
+ try:
+ settings = await get_settings(query.message.chat.id)
+ if settings['max_btn']:
+ if 0 < offset <= 10:
+ off_set = 0
+ elif offset == 0:
+ off_set = None
+ else:
+ off_set = offset - 10
+ if n_offset == 0:
+ btn.append(
+ [InlineKeyboardButton("◀️ 𝖡𝖠𝖢𝖪", callback_data=f"next_{req}_{key}_{off_set}"), InlineKeyboardButton(f"{math.ceil(int(offset)/10)+1} / {math.ceil(total/10)}", callback_data="pages")]
+ )
+ elif off_set is None:
+ btn.append([InlineKeyboardButton("📃", callback_data="pages"), InlineKeyboardButton(f"{math.ceil(int(offset)/10)+1} / {math.ceil(total/10)}", callback_data="pages"), InlineKeyboardButton("𝖭𝖤𝖷𝖳 ▶️", callback_data=f"next_{req}_{key}_{n_offset}")])
+ else:
+ btn.append(
+ [
+ InlineKeyboardButton("◀️ 𝖡𝖠𝖢𝖪", callback_data=f"next_{req}_{key}_{off_set}"),
+ InlineKeyboardButton(f"{math.ceil(int(offset)/10)+1} / {math.ceil(total/10)}", callback_data="pages"),
+ InlineKeyboardButton("𝖭𝖤𝖷𝖳 ▶️", callback_data=f"next_{req}_{key}_{n_offset}")
+ ],
+ )
+ else:
+ if 0 < offset <= int(MAX_B_TN):
+ off_set = 0
+ elif offset == 0:
+ off_set = None
+ else:
+ off_set = offset - int(MAX_B_TN)
+ if n_offset == 0:
+ btn.append(
+ [InlineKeyboardButton("◀️ 𝖡𝖠𝖢𝖪", callback_data=f"next_{req}_{key}_{off_set}"), InlineKeyboardButton(f"{math.ceil(int(offset)/int(MAX_B_TN))+1} / {math.ceil(total/int(MAX_B_TN))}", callback_data="pages")]
+ )
+ elif off_set is None:
+ btn.append([InlineKeyboardButton("📃", callback_data="pages"), InlineKeyboardButton(f"{math.ceil(int(offset)/int(MAX_B_TN))+1} / {math.ceil(total/int(MAX_B_TN))}", callback_data="pages"), InlineKeyboardButton("𝖭𝖤𝖷𝖳 ▶️", callback_data=f"next_{req}_{key}_{n_offset}")])
+ else:
+ btn.append(
+ [
+ InlineKeyboardButton("◀️ 𝖡𝖠𝖢𝖪", callback_data=f"next_{req}_{key}_{off_set}"),
+ InlineKeyboardButton(f"{math.ceil(int(offset)/int(MAX_B_TN))+1} / {math.ceil(total/int(MAX_B_TN))}", callback_data="pages"),
+ InlineKeyboardButton("𝖭𝖤𝖷𝖳 ▶️", callback_data=f"next_{req}_{key}_{n_offset}")
+ ],
+ )
+ except KeyError:
+ await save_group_settings(query.message.chat.id, 'max_btn', False)
+ settings = await get_settings(query.message.chat.id)
+ if settings['max_btn']:
+ if 0 < offset <= 10:
+ off_set = 0
+ elif offset == 0:
+ off_set = None
+ else:
+ off_set = offset - 10
+ if n_offset == 0:
+ btn.append(
+ [InlineKeyboardButton("◀️ 𝖡𝖠𝖢𝖪", callback_data=f"next_{req}_{key}_{off_set}"), InlineKeyboardButton(f"{math.ceil(int(offset)/10)+1} / {math.ceil(total/10)}", callback_data="pages")]
+ )
+ elif off_set is None:
+ btn.append([InlineKeyboardButton("📃", callback_data="pages"), InlineKeyboardButton(f"{math.ceil(int(offset)/10)+1} / {math.ceil(total/10)}", callback_data="pages"), InlineKeyboardButton("𝖭𝖤𝖷𝖳 ▶️", callback_data=f"next_{req}_{key}_{n_offset}")])
+ else:
+ btn.append(
+ [
+ InlineKeyboardButton("◀️ 𝖡𝖠𝖢𝖪", callback_data=f"next_{req}_{key}_{off_set}"),
+ InlineKeyboardButton(f"{math.ceil(int(offset)/10)+1} / {math.ceil(total/10)}", callback_data="pages"),
+ InlineKeyboardButton("𝖭𝖤𝖷𝖳 ▶️", callback_data=f"next_{req}_{key}_{n_offset}")
+ ],
+ )
+ else:
+ if 0 < offset <= int(MAX_B_TN):
+ off_set = 0
+ elif offset == 0:
+ off_set = None
+ else:
+ off_set = offset - int(MAX_B_TN)
+ if n_offset == 0:
+ btn.append(
+ [InlineKeyboardButton("◀️ 𝖡𝖠𝖢𝖪", callback_data=f"next_{req}_{key}_{off_set}"), InlineKeyboardButton(f"{math.ceil(int(offset)/int(MAX_B_TN))+1} / {math.ceil(total/int(MAX_B_TN))}", callback_data="pages")]
+ )
+ elif off_set is None:
+ btn.append([InlineKeyboardButton("📃", callback_data="pages"), InlineKeyboardButton(f"{math.ceil(int(offset)/int(MAX_B_TN))+1} / {math.ceil(total/int(MAX_B_TN))}", callback_data="pages"), InlineKeyboardButton("𝖭𝖤𝖷𝖳 ▶️", callback_data=f"next_{req}_{key}_{n_offset}")])
+ else:
+ btn.append(
+ [
+ InlineKeyboardButton("◀️ 𝖡𝖠𝖢𝖪", callback_data=f"next_{req}_{key}_{off_set}"),
+ InlineKeyboardButton(f"{math.ceil(int(offset)/int(MAX_B_TN))+1} / {math.ceil(total/int(MAX_B_TN))}", callback_data="pages"),
+ InlineKeyboardButton("𝖭𝖤𝖷𝖳 ▶️", callback_data=f"next_{req}_{key}_{n_offset}")
+ ],
+ )
+ btn.insert(0, [
+ InlineKeyboardButton(f'🎬 {search} 🎬', 'rkbtn')
+ ])
+ btn.insert(2, [
+ InlineKeyboardButton("📤 𝖲𝖾𝗇𝖽 𝖠𝗅𝗅 𝖥𝗂𝗅𝖾𝗌 📤", callback_data=f"send_all#{req}#{key}#{pre}")
+ ])
+ try:
+ await query.edit_message_reply_markup(
+ reply_markup=InlineKeyboardMarkup(btn)
+ )
+ except MessageNotModified:
+ pass
+ await query.answer()
+
+
+@Client.on_callback_query(filters.regex(r"^spol"))
+async def advantage_spoll_choker(bot, query):
+ _, user, movie_, key = query.data.split('#')
+ movies = temp.SPELL_CHECK.get(key)
+ if not movies:
+ return await query.answer(script.OLD_ALRT_TXT.format(query.from_user.first_name), show_alert=True)
+ if int(user) != 0 and query.from_user.id != int(user):
+ return await query.answer(script.ALRT_TXT.format(query.from_user.first_name), show_alert=True)
+ if movie_ == "close_spellcheck":
+ return await query.message.delete()
+ movie = movies[(int(movie_))]
+ await query.answer(script.TOP_ALRT_MSG)
+ gl = await global_filters(bot, query.message, text=movie)
+ if gl == False:
+ k = await manual_filters(bot, query.message, text=movie)
+ if k == False:
+ files, offset, total_results = await get_search_results(query.message.chat.id, movie, offset=0, filter=True)
+ if files:
+ k = (movie, files, offset, total_results)
+ await auto_filter(bot, query, k)
+ else:
+ reqstr1 = query.from_user.id if query.from_user else 0
+ reqstr = await bot.get_users(reqstr1)
+ if NO_RESULTS_MSG:
+ await bot.send_message(chat_id=LOG_CHANNEL, text=(script.NORSLTS.format(reqstr.id, reqstr.mention, movie)))
+ k = await query.message.edit(script.MVE_NT_FND)
+ await asyncio.sleep(10)
+ await k.delete()
+
+
+@Client.on_callback_query()
+async def cb_handler(client: Client, query: CallbackQuery):
+ if query.data == "close_data":
+ await query.message.delete()
+ elif query.data == "gfiltersdeleteallconfirm":
+ await del_allg(query.message, 'gfilters')
+ await query.answer("Done !")
+ return
+ elif query.data == "gfiltersdeleteallcancel":
+ await query.message.reply_to_message.delete()
+ await query.message.delete()
+ await query.answer("Process Cancelled !")
+ return
+ elif query.data == "delallconfirm":
+ userid = query.from_user.id
+ chat_type = query.message.chat.type
+
+ if chat_type == enums.ChatType.PRIVATE:
+ grpid = await active_connection(str(userid))
+ if grpid is not None:
+ grp_id = grpid
+ try:
+ chat = await client.get_chat(grpid)
+ title = chat.title
+ except:
+ await query.message.edit_text("Make sure I'm present in your group!!", quote=True)
+ return await query.answer('𝖯𝗂𝗋𝖺𝖼𝗒 𝗂𝗌 𝖢𝗋𝗂𝗆𝖾 !')
+ else:
+ await query.message.edit_text(
+ "I'm not connected to any groups!\nCheck /connections or connect to any groups",
+ quote=True
+ )
+ return await query.answer('𝖯𝗂𝗋𝖺𝖼𝗒 𝗂𝗌 𝖢𝗋𝗂𝗆𝖾 !')
+
+ elif chat_type in [enums.ChatType.GROUP, enums.ChatType.SUPERGROUP]:
+ grp_id = query.message.chat.id
+ title = query.message.chat.title
+
+ else:
+ return await query.answer('𝖯𝗂𝗋𝖺𝖼𝗒 𝗂𝗌 𝖢𝗋𝗂𝗆𝖾 !')
+
+ st = await client.get_chat_member(grp_id, userid)
+ if (st.status == enums.ChatMemberStatus.OWNER) or (str(userid) in ADMINS):
+ await del_all(query.message, grp_id, title)
+ else:
+ await query.answer("You need to be Group Owner or an Auth User to do that!", show_alert=True)
+ elif query.data == "delallcancel":
+ userid = query.from_user.id
+ chat_type = query.message.chat.type
+
+ if chat_type == enums.ChatType.PRIVATE:
+ await query.message.reply_to_message.delete()
+ await query.message.delete()
+
+ elif chat_type in [enums.ChatType.GROUP, enums.ChatType.SUPERGROUP]:
+ grp_id = query.message.chat.id
+ st = await client.get_chat_member(grp_id, userid)
+ if (st.status == enums.ChatMemberStatus.OWNER) or (str(userid) in ADMINS):
+ await query.message.delete()
+ try:
+ await query.message.reply_to_message.delete()
+ except:
+ pass
+ else:
+ await query.answer("That's not for you!!", show_alert=True)
+ elif "groupcb" in query.data:
+ await query.answer()
+
+ group_id = query.data.split(":")[1]
+
+ act = query.data.split(":")[2]
+ hr = await client.get_chat(int(group_id))
+ title = hr.title
+ user_id = query.from_user.id
+
+ if act == "":
+ stat = "CONNECT"
+ cb = "connectcb"
+ else:
+ stat = "DISCONNECT"
+ cb = "disconnect"
+
+ keyboard = InlineKeyboardMarkup([
+ [InlineKeyboardButton(f"{stat}", callback_data=f"{cb}:{group_id}"),
+ InlineKeyboardButton("DELETE", callback_data=f"deletecb:{group_id}")],
+ [InlineKeyboardButton("BACK", callback_data="backcb")]
+ ])
+
+ await query.message.edit_text(
+ f"Group Name : **{title}**\nGroup ID : `{group_id}`",
+ reply_markup=keyboard,
+ parse_mode=enums.ParseMode.MARKDOWN
+ )
+ return await query.answer('𝖯𝗂𝗋𝖺𝖼𝗒 𝗂𝗌 𝖢𝗋𝗂𝗆𝖾 !')
+ elif "connectcb" in query.data:
+ await query.answer()
+
+ group_id = query.data.split(":")[1]
+
+ hr = await client.get_chat(int(group_id))
+
+ title = hr.title
+
+ user_id = query.from_user.id
+
+ mkact = await make_active(str(user_id), str(group_id))
+
+ if mkact:
+ await query.message.edit_text(
+ f"Connected to **{title}**",
+ parse_mode=enums.ParseMode.MARKDOWN
+ )
+ else:
+ await query.message.edit_text('Disconnected from', parse_mode=enums.ParseMode.MARKDOWN)
+ return await query.answer('𝖯𝗂𝗋𝖺𝖼𝗒 𝗂𝗌 𝖢𝗋𝗂𝗆𝖾 !')
+ elif "disconnect" in query.data:
+ await query.answer()
+
+ group_id = query.data.split(":")[1]
+
+ hr = await client.get_chat(int(group_id))
+
+ title = hr.title
+ user_id = query.from_user.id
+
+ mkinact = await make_inactive(str(user_id))
+
+ if mkinact:
+ await query.message.edit_text(
+ f"Disconnected from **{title}**",
+ parse_mode=enums.ParseMode.MARKDOWN
+ )
+ else:
+ await query.message.edit_text(
+ f"Some error occurred!!",
+ parse_mode=enums.ParseMode.MARKDOWN
+ )
+ return await query.answer('𝖯𝗂𝗋𝖺𝖼𝗒 𝗂𝗌 𝖢𝗋𝗂𝗆𝖾 !')
+ elif "deletecb" in query.data:
+ await query.answer()
+
+ user_id = query.from_user.id
+ group_id = query.data.split(":")[1]
+
+ delcon = await delete_connection(str(user_id), str(group_id))
+
+ if delcon:
+ await query.message.edit_text(
+ "Successfully deleted connection"
+ )
+ else:
+ await query.message.edit_text(
+ f"Some error occurred!!",
+ parse_mode=enums.ParseMode.MARKDOWN
+ )
+ return await query.answer('𝖯𝗂𝗋𝖺𝖼𝗒 𝗂𝗌 𝖢𝗋𝗂𝗆𝖾 !')
+ elif query.data == "backcb":
+ await query.answer()
+
+ userid = query.from_user.id
+
+ groupids = await all_connections(str(userid))
+ if groupids is None:
+ await query.message.edit_text(
+ "There are no active connections!! Connect to some groups first.",
+ )
+ return await query.answer('𝖯𝗂𝗋𝖺𝖼𝗒 𝗂𝗌 𝖢𝗋𝗂𝗆𝖾 !')
+ buttons = []
+ for groupid in groupids:
+ try:
+ ttl = await client.get_chat(int(groupid))
+ title = ttl.title
+ active = await if_active(str(userid), str(groupid))
+ act = " - ACTIVE" if active else ""
+ buttons.append(
+ [
+ InlineKeyboardButton(
+ text=f"{title}{act}", callback_data=f"groupcb:{groupid}:{act}"
+ )
+ ]
+ )
+ except:
+ pass
+ if buttons:
+ await query.message.edit_text(
+ "Your connected group details ;\n\n",
+ reply_markup=InlineKeyboardMarkup(buttons)
+ )
+ elif "gfilteralert" in query.data:
+ grp_id = query.message.chat.id
+ i = query.data.split(":")[1]
+ keyword = query.data.split(":")[2]
+ reply_text, btn, alerts, fileid = await find_gfilter('gfilters', keyword)
+ if alerts is not None:
+ alerts = ast.literal_eval(alerts)
+ alert = alerts[int(i)]
+ alert = alert.replace("\\n", "\n").replace("\\t", "\t")
+ await query.answer(alert, show_alert=True)
+ elif "alertmessage" in query.data:
+ grp_id = query.message.chat.id
+ i = query.data.split(":")[1]
+ keyword = query.data.split(":")[2]
+ reply_text, btn, alerts, fileid = await find_filter(grp_id, keyword)
+ if alerts is not None:
+ alerts = ast.literal_eval(alerts)
+ alert = alerts[int(i)]
+ alert = alert.replace("\\n", "\n").replace("\\t", "\t")
+ await query.answer(alert, show_alert=True)
+ if query.data.startswith("file"):
+ clicked = query.from_user.id
+ try:
+ typed = query.message.reply_to_message.from_user.id
+ except:
+ typed = query.from_user.id
+ ident, file_id = query.data.split("#")
+ files_ = await get_file_details(file_id)
+ if not files_:
+ return await query.answer('No such file exist.')
+ files = files_[0]
+ title = files.file_name
+ size = get_size(files.file_size)
+ f_caption = files.caption
+ settings = await get_settings(query.message.chat.id)
+ if CUSTOM_FILE_CAPTION:
+ try:
+ f_caption = CUSTOM_FILE_CAPTION.format(file_name='' if title is None else title,
+ file_size='' if size is None else size,
+ file_caption='' if f_caption is None else f_caption)
+ except Exception as e:
+ logger.exception(e)
+ f_caption = f_caption
+ if f_caption is None:
+ f_caption = f"{files.file_name}"
+
+ try:
+ if AUTH_CHANNEL and not await is_subscribed(client, query):
+ if clicked == typed:
+ await query.answer(url=f"https://t.me/{temp.U_NAME}?start={ident}_{file_id}")
+ return
+ else:
+ await query.answer(f"𝖧𝖾𝗒 {query.from_user.first_name}, 𝖳𝗁𝗂𝗌 𝗂𝗌 𝗇𝗈𝗍 𝗒𝗈𝗎𝗋 𝗋𝖾𝗊𝗎𝖾𝗌𝗍 !", show_alert=True)
+ elif settings['botpm']:
+ if clicked == typed:
+ await query.answer(url=f"https://t.me/{temp.U_NAME}?start={ident}_{file_id}")
+ return
+ else:
+ await query.answer(f"𝖧𝖾𝗒 {query.from_user.first_name}, 𝖳𝗁𝗂𝗌 𝗂𝗌 𝗇𝗈𝗍 𝗒𝗈𝗎𝗋 𝗋𝖾𝗊𝗎𝖾𝗌𝗍 !", show_alert=True)
+ else:
+ if clicked == typed:
+ await client.send_cached_media(
+ chat_id=query.from_user.id,
+ file_id=file_id,
+ caption=f_caption,
+ protect_content=True if ident == "filep" else False,
+ reply_markup=InlineKeyboardMarkup( [ [ InlineKeyboardButton('⚔️ 𝖯𝖨𝖱𝖮 𝖴𝖯𝖣𝖠𝖳𝖤𝖲 ⚔️', url="https://t.me/piroxbots") ] ] ))
+ else:
+ await query.answer(f"𝖧𝖾𝗒 {query.from_user.first_name}, 𝖳𝗁𝗂𝗌 𝗂𝗌 𝗇𝗈𝗍 𝗒𝗈𝗎𝗋 𝗋𝖾𝗊𝗎𝖾𝗌𝗍 !", show_alert=True)
+ await query.answer('𝖢𝗁𝖾𝖼𝗄 𝖯𝖬, 𝖨 𝗁𝖺𝗏𝖾 𝗌𝖾𝗇𝗍 𝖿𝗂𝗅𝖾𝗌 𝗂𝗇 𝖯𝖬', show_alert=True)
+ except UserIsBlocked:
+ await query.answer('𝖴𝗇𝖻𝗅𝗈𝖼𝗄 𝗍𝗁𝖾 𝖻𝗈𝗍 𝗆𝖺𝗇𝗁 !', show_alert=True)
+ except PeerIdInvalid:
+ await query.answer(url=f"https://t.me/{temp.U_NAME}?start={ident}_{file_id}")
+ except Exception as e:
+ await query.answer(url=f"https://t.me/{temp.U_NAME}?start={ident}_{file_id}")
+ elif query.data.startswith("checksub"):
+ if AUTH_CHANNEL and not await is_subscribed(client, query):
+ await query.answer("𝖨 𝖫𝗂𝗄𝖾 𝖸𝗈𝗎𝗋 𝖲𝗆𝖺𝗋𝗍𝗇𝖾𝗌𝗌, 𝖡𝗎𝗍 𝖣𝗈𝗇'𝗍 𝖡𝖾 𝖮𝗏𝖾𝗋𝗌𝗆𝖺𝗋𝗍 😒 \n𝖩𝗈𝗂𝗇 𝖴𝗉𝖽𝖺𝗍𝖾 𝖢𝗁𝖺𝗇𝗇𝖾𝗅 𝖿𝗂𝗋𝗌𝗍 ;)", show_alert=True)
+ return
+ ident, file_id = query.data.split("#")
+ files_ = await get_file_details(file_id)
+ if not files_:
+ return await query.answer('No such file exist.')
+ files = files_[0]
+ title = files.file_name
+ size = get_size(files.file_size)
+ f_caption = files.caption
+ if CUSTOM_FILE_CAPTION:
+ try:
+ f_caption = CUSTOM_FILE_CAPTION.format(file_name='' if title is None else title,
+ file_size='' if size is None else size,
+ file_caption='' if f_caption is None else f_caption)
+ except Exception as e:
+ logger.exception(e)
+ f_caption = f_caption
+ if f_caption is None:
+ f_caption = f"{title}"
+ await query.answer()
+ await client.send_cached_media(
+ chat_id=query.from_user.id,
+ file_id=file_id,
+ caption=f_caption,
+ protect_content=True if ident == 'checksubp' else False,
+ reply_markup=InlineKeyboardMarkup( [ [ InlineKeyboardButton('⚔️ 𝖯𝖨𝖱𝖮 𝖴𝖯𝖣𝖠𝖳𝖤𝖲 ⚔️', url="https://t.me/piroxbots") ] ] ))
+ elif query.data == "pages":
+ await query.answer()
+
+ elif query.data.startswith("send_all"):
+ _, req, key, pre = query.data.split("#")
+ if int(req) not in [query.from_user.id, 0]:
+ return await query.answer(script.ALRT_TXT.format(query.from_user.first_name), show_alert=True)
+
+ await query.answer(url=f"https://t.me/{temp.U_NAME}?start=all_{key}_{pre}")
+
+
+ elif query.data.startswith("killfilesdq"):
+ ident, keyword = query.data.split("#")
+ await query.message.edit_text(f"Fetching Files for your query {keyword} on DB... Please wait...")
+ files, total = await get_bad_files(keyword)
+ await query.message.edit_text(f"Found {total} files for your query {keyword} !\n\nFile deletion process will start in 5 seconds !")
+ await asyncio.sleep(5)
+ deleted = 0
+ async with lock:
+ try:
+ for file in files:
+ file_ids = file.file_id
+ file_name = file.file_name
+ result = await Media.collection.delete_one({
+ '_id': file_ids,
+ })
+ if result.deleted_count:
+ logger.info(f'File Found for your query {keyword}! Successfully deleted {file_name} from database.')
+ deleted += 1
+ if deleted % 20 == 0:
+ await query.message.edit_text(f"Process started for deleting files from DB. Successfully deleted {str(deleted)} files from DB for your query {keyword} !\n\nPlease wait...")
+ except Exception as e:
+ logger.exception(e)
+ await query.message.edit_text(f'Error: {e}')
+ else:
+ await query.message.edit_text(f"Process Completed for file deletion !\n\nSuccessfully deleted {str(deleted)} files from database for your query {keyword}.")
+
+ elif query.data.startswith("opnsetgrp"):
+ ident, grp_id = query.data.split("#")
+ userid = query.from_user.id if query.from_user else None
+ st = await client.get_chat_member(grp_id, userid)
+ if (
+ st.status != enums.ChatMemberStatus.ADMINISTRATOR
+ and st.status != enums.ChatMemberStatus.OWNER
+ and str(userid) not in ADMINS
+ ):
+ await query.answer("𝖸𝗈𝗎 𝖽𝗈𝗇'𝗍 𝗁𝖺𝗏𝖾 𝗋𝗂𝗀𝗁𝗍𝗌 𝗍𝗈 𝖽𝗈 𝗍𝗁𝗂𝗌 !", show_alert=True)
+ return
+ title = query.message.chat.title
+ settings = await get_settings(grp_id)
+ if settings is not None:
+ buttons = [
+ [
+ InlineKeyboardButton('𝖥𝗂𝗅𝗍𝖾𝗋 𝖡𝗎𝗍𝗍𝗈𝗇',
+ callback_data=f'setgs#button#{settings["button"]}#{str(grp_id)}'),
+ InlineKeyboardButton('𝖲𝗂𝗇𝗀𝗅𝖾 𝖡𝗎𝗍𝗍𝗈𝗇' if settings["button"] else '𝖣𝗈𝗎𝖻𝗅𝖾',
+ callback_data=f'setgs#button#{settings["button"]}#{str(grp_id)}')
+ ],
+ [
+ InlineKeyboardButton('𝖥𝗂𝗅𝖾 𝖲𝖾𝗇𝖽 𝖬𝗈𝖽𝖾', callback_data=f'setgs#botpm#{settings["botpm"]}#{str(grp_id)}'),
+ InlineKeyboardButton('𝖬𝖺𝗇𝗎𝖺𝗅 𝖲𝗍𝖺𝗋𝗍' if settings["botpm"] else '𝖠𝗎𝗍𝗈 𝖲𝖾𝗇𝖽',
+ callback_data=f'setgs#botpm#{settings["botpm"]}#{str(grp_id)}')
+ ],
+ [
+ InlineKeyboardButton('𝖯𝗋𝗈𝗍𝖾𝖼𝗍 𝖢𝗈𝗇𝗍𝖾𝗇𝗍',
+ callback_data=f'setgs#file_secure#{settings["file_secure"]}#{str(grp_id)}'),
+ InlineKeyboardButton('✅ 𝖮𝗇' if settings["file_secure"] else '❌ 𝖮𝖿𝖿',
+ callback_data=f'setgs#file_secure#{settings["file_secure"]}#{str(grp_id)}')
+ ],
+ [
+ InlineKeyboardButton('𝖨𝖬𝖣𝖻', callback_data=f'setgs#imdb#{settings["imdb"]}#{str(grp_id)}'),
+ InlineKeyboardButton('✅ 𝖮𝗇' if settings["imdb"] else '❌ 𝖮𝖿𝖿',
+ callback_data=f'setgs#imdb#{settings["imdb"]}#{str(grp_id)}')
+ ],
+ [
+ InlineKeyboardButton('𝖲𝗉𝖾𝗅𝗅 𝖢𝗁𝖾𝖼𝗄',
+ callback_data=f'setgs#spell_check#{settings["spell_check"]}#{str(grp_id)}'),
+ InlineKeyboardButton('✅ 𝖮𝗇' if settings["spell_check"] else '❌ 𝖮𝖿𝖿',
+ callback_data=f'setgs#spell_check#{settings["spell_check"]}#{str(grp_id)}')
+ ],
+ [
+ InlineKeyboardButton('𝖶𝖾𝗅𝖼𝗈𝗆𝖾 𝖬𝖾𝗌𝗌𝖺𝗀𝖾', callback_data=f'setgs#welcome#{settings["welcome"]}#{str(grp_id)}'),
+ InlineKeyboardButton('✅ 𝖮𝗇' if settings["welcome"] else '❌ 𝖮𝖿𝖿',
+ callback_data=f'setgs#welcome#{settings["welcome"]}#{str(grp_id)}')
+ ],
+ [
+ InlineKeyboardButton('𝖠𝗎𝗍𝗈 𝖣𝖾𝗅𝖾𝗍𝖾',
+ callback_data=f'setgs#auto_delete#{settings["auto_delete"]}#{str(grp_id)}'),
+ InlineKeyboardButton('5 𝖬𝗂𝗇' if settings["auto_delete"] else '❌ 𝖮𝖿𝖿',
+ callback_data=f'setgs#auto_delete#{settings["auto_delete"]}#{str(grp_id)}')
+ ],
+ [
+ InlineKeyboardButton('𝖠𝗎𝗍𝗈-𝖥𝗂𝗅𝗍𝖾𝗋',
+ callback_data=f'setgs#auto_ffilter#{settings["auto_ffilter"]}#{str(grp_id)}'),
+ InlineKeyboardButton('✅ 𝖮𝗇' if settings["auto_ffilter"] else '❌ 𝖮𝖿𝖿',
+ callback_data=f'setgs#auto_ffilter#{settings["auto_ffilter"]}#{str(grp_id)}')
+ ],
+ [
+ InlineKeyboardButton('𝖬𝖺𝗑 𝖡𝗎𝗍𝗍𝗈𝗇𝗌',
+ callback_data=f'setgs#max_btn#{settings["max_btn"]}#{str(grp_id)}'),
+ InlineKeyboardButton('10' if settings["max_btn"] else f'{MAX_B_TN}',
+ callback_data=f'setgs#max_btn#{settings["max_btn"]}#{str(grp_id)}')
+ ]
+ ]
+ reply_markup = InlineKeyboardMarkup(buttons)
+ await query.message.edit_text(
+ text=f"𝖢𝗁𝖺𝗇𝗀𝖾 𝖸𝗈𝗎𝗋 𝖲𝖾𝗍𝗍𝗂𝗇𝗀𝗌 𝖥𝗈𝗋 {title} 𝖠𝗌 𝖸𝗈𝗎𝗋 𝖶𝗂𝗌𝗁",
+ disable_web_page_preview=True,
+ parse_mode=enums.ParseMode.HTML
+ )
+ await query.message.edit_reply_markup(reply_markup)
+
+ elif query.data.startswith("opnsetpm"):
+ ident, grp_id = query.data.split("#")
+ userid = query.from_user.id if query.from_user else None
+ st = await client.get_chat_member(grp_id, userid)
+ if (
+ st.status != enums.ChatMemberStatus.ADMINISTRATOR
+ and st.status != enums.ChatMemberStatus.OWNER
+ and str(userid) not in ADMINS
+ ):
+ await query.answer("𝖸𝗈𝗎 𝖽𝗈𝗇'𝗍 𝗁𝖺𝗏𝖾 𝗋𝗂𝗀𝗁𝗍𝗌 𝗍𝗈 𝖽𝗈 𝗍𝗁𝗂𝗌 !", show_alert=True)
+ return
+ title = query.message.chat.title
+ settings = await get_settings(grp_id)
+ btn2 = [[
+ InlineKeyboardButton("➡ 𝖮𝗉𝖾𝗇 𝗂𝗇 𝖯𝖬 ➡", url=f"t.me/{temp.U_NAME}")
+ ]]
+ reply_markup = InlineKeyboardMarkup(btn2)
+ await query.message.edit_text(f"𝖸𝗈𝗎𝗋 𝗌𝖾𝗍𝗍𝗂𝗇𝗀𝗌 𝗆𝖾𝗇𝗎 𝖿𝗈𝗋 {title} 𝗁𝖺𝗌 𝖻𝖾𝖾𝗇 𝗌𝖾𝗇𝗍 𝗍𝗈 𝗒𝗈𝗎𝗋 𝖯𝖬")
+ await query.message.edit_reply_markup(reply_markup)
+ if settings is not None:
+ buttons = [
+ [
+ InlineKeyboardButton('𝖥𝗂𝗅𝗍𝖾𝗋 𝖡𝗎𝗍𝗍𝗈𝗇',
+ callback_data=f'setgs#button#{settings["button"]}#{str(grp_id)}'),
+ InlineKeyboardButton('𝖲𝗂𝗇𝗀𝗅𝖾 𝖡𝗎𝗍𝗍𝗈𝗇' if settings["button"] else '𝖣𝗈𝗎𝖻𝗅𝖾',
+ callback_data=f'setgs#button#{settings["button"]}#{str(grp_id)}')
+ ],
+ [
+ InlineKeyboardButton('𝖥𝗂𝗅𝖾 𝖲𝖾𝗇𝖽 𝖬𝗈𝖽𝖾', callback_data=f'setgs#botpm#{settings["botpm"]}#{str(grp_id)}'),
+ InlineKeyboardButton('𝖬𝖺𝗇𝗎𝖺𝗅 𝖲𝗍𝖺𝗋𝗍' if settings["botpm"] else '𝖠𝗎𝗍𝗈 𝖲𝖾𝗇𝖽',
+ callback_data=f'setgs#botpm#{settings["botpm"]}#{str(grp_id)}')
+ ],
+ [
+ InlineKeyboardButton('𝖯𝗋𝗈𝗍𝖾𝖼𝗍 𝖢𝗈𝗇𝗍𝖾𝗇𝗍',
+ callback_data=f'setgs#file_secure#{settings["file_secure"]}#{str(grp_id)}'),
+ InlineKeyboardButton('✅ 𝖮𝗇' if settings["file_secure"] else '❌ 𝖮𝖿𝖿',
+ callback_data=f'setgs#file_secure#{settings["file_secure"]}#{str(grp_id)}')
+ ],
+ [
+ InlineKeyboardButton('𝖨𝖬𝖣𝖻', callback_data=f'setgs#imdb#{settings["imdb"]}#{str(grp_id)}'),
+ InlineKeyboardButton('✅ 𝖮𝗇' if settings["imdb"] else '❌ 𝖮𝖿𝖿',
+ callback_data=f'setgs#imdb#{settings["imdb"]}#{str(grp_id)}')
+ ],
+ [
+ InlineKeyboardButton('𝖲𝗉𝖾𝗅𝗅 𝖢𝗁𝖾𝖼𝗄',
+ callback_data=f'setgs#spell_check#{settings["spell_check"]}#{str(grp_id)}'),
+ InlineKeyboardButton('✅ 𝖮𝗇' if settings["spell_check"] else '❌ 𝖮𝖿𝖿',
+ callback_data=f'setgs#spell_check#{settings["spell_check"]}#{str(grp_id)}')
+ ],
+ [
+ InlineKeyboardButton('𝖶𝖾𝗅𝖼𝗈𝗆𝖾 𝖬𝖾𝗌𝗌𝖺𝗀𝖾', callback_data=f'setgs#welcome#{settings["welcome"]}#{str(grp_id)}'),
+ InlineKeyboardButton('✅ 𝖮𝗇' if settings["welcome"] else '❌ 𝖮𝖿𝖿',
+ callback_data=f'setgs#welcome#{settings["welcome"]}#{str(grp_id)}')
+ ],
+ [
+ InlineKeyboardButton('𝖠𝗎𝗍𝗈 𝖣𝖾𝗅𝖾𝗍𝖾',
+ callback_data=f'setgs#auto_delete#{settings["auto_delete"]}#{str(grp_id)}'),
+ InlineKeyboardButton('5 𝖬𝗂𝗇' if settings["auto_delete"] else '❌ 𝖮𝖿𝖿',
+ callback_data=f'setgs#auto_delete#{settings["auto_delete"]}#{str(grp_id)}')
+ ],
+ [
+ InlineKeyboardButton('𝖠𝗎𝗍𝗈-𝖥𝗂𝗅𝗍𝖾𝗋',
+ callback_data=f'setgs#auto_ffilter#{settings["auto_ffilter"]}#{str(grp_id)}'),
+ InlineKeyboardButton('✅ 𝖮𝗇' if settings["auto_ffilter"] else '❌ 𝖮𝖿𝖿',
+ callback_data=f'setgs#auto_ffilter#{settings["auto_ffilter"]}#{str(grp_id)}')
+ ],
+ [
+ InlineKeyboardButton('𝖬𝖺𝗑 𝖡𝗎𝗍𝗍𝗈𝗇𝗌',
+ callback_data=f'setgs#max_btn#{settings["max_btn"]}#{str(grp_id)}'),
+ InlineKeyboardButton('10' if settings["max_btn"] else f'{MAX_B_TN}',
+ callback_data=f'setgs#max_btn#{settings["max_btn"]}#{str(grp_id)}')
+ ]
+ ]
+ reply_markup = InlineKeyboardMarkup(buttons)
+ await client.send_message(
+ chat_id=userid,
+ text=f"𝖢𝗁𝖺𝗇𝗀𝖾 𝖸𝗈𝗎𝗋 𝖲𝖾𝗍𝗍𝗂𝗇𝗀𝗌 𝖥𝗈𝗋 {title} 𝖠𝗌 𝖸𝗈𝗎𝗋 𝖶𝗂𝗌𝗁",
+ reply_markup=reply_markup,
+ disable_web_page_preview=True,
+ parse_mode=enums.ParseMode.HTML,
+ reply_to_message_id=query.message.id
+ )
+
+ elif query.data.startswith("show_option"):
+ ident, from_user = query.data.split("#")
+ btn = [[
+ InlineKeyboardButton("⚠ 𝖴𝗇𝖺𝗏𝖺𝗂𝖺𝗅𝖺𝖻𝗅𝖾 ⚠", callback_data=f"unavailable#{from_user}"),
+ InlineKeyboardButton("✅ 𝖴𝗉𝗅𝗈𝖺𝖽𝖾𝖽 ✅", callback_data=f"uploaded#{from_user}")
+ ],[
+ InlineKeyboardButton("🔰 𝖠𝗅𝗋𝖾𝖺𝖽𝗒 𝖠𝗏𝖺𝗂𝗅𝖺𝖻𝗅𝖾 🔰", callback_data=f"already_available#{from_user}")
+ ]]
+ btn2 = [[
+ InlineKeyboardButton("❕ 𝖵𝗂𝖾𝗐 𝖲𝗍𝖺𝗍𝗎𝗌 ❕", url=f"{query.message.link}")
+ ]]
+ if query.from_user.id in ADMINS:
+ user = await client.get_users(from_user)
+ reply_markup = InlineKeyboardMarkup(btn)
+ await query.message.edit_reply_markup(reply_markup)
+ await query.answer("𝖧𝖾𝗋𝖾 𝖺𝗋𝖾 𝗍𝗁𝖾 𝗈𝗉𝗍𝗂𝗈𝗇𝗌")
+ else:
+ await query.answer("𝖸𝗈𝗎 𝖽𝗈𝗇'𝗍 𝗁𝖺𝗏𝖾 𝗌𝗎𝖿𝖿𝗂𝖼𝗂𝖾𝗇𝗍 𝗋𝗂𝗀𝗁𝗍𝗌 𝗍𝗈 𝖽𝗈 𝗍𝗁𝗂𝗌 !", show_alert=True)
+
+ elif query.data.startswith("unavailable"):
+ ident, from_user = query.data.split("#")
+ btn = [[
+ InlineKeyboardButton("⚠ 𝖴𝗇𝖺𝗏𝖺𝗂𝖺𝗅𝖺𝖻𝗅𝖾 ⚠", callback_data=f"unalert#{from_user}")
+ ]]
+ btn2 = [[
+ InlineKeyboardButton("❕ 𝖵𝗂𝖾𝗐 𝖲𝗍𝖺𝗍𝗎𝗌 ❕", url=f"{query.message.link}")
+ ]]
+ if query.from_user.id in ADMINS:
+ user = await client.get_users(from_user)
+ reply_markup = InlineKeyboardMarkup(btn)
+ content = query.message.text
+ await query.message.edit_text(f"