diff --git a/Dockerfile b/Dockerfile index 5a82830b2..039085a3d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,12 +1,11 @@ -FROM python:3.8-slim-buster +FROM python:3.10-slim-buster -RUN apt update && apt upgrade -y -RUN apt install git -y +RUN apt update && apt upgrade -y && apt install git -y COPY requirements.txt /requirements.txt -RUN cd / -RUN pip3 install -U pip && pip3 install -U -r requirements.txt +RUN pip3 install --upgrade pip && pip3 install -r requirements.txt RUN mkdir /LazyPrincess WORKDIR /LazyPrincess COPY start.sh /start.sh -CMD ["/bin/bash", "/start.sh"] +EXPOSE 3000 +CMD ["cyclic.sh", "/start.sh"] diff --git a/Procfile b/Procfile index ab94349c4..a18caa2cb 100644 --- a/Procfile +++ b/Procfile @@ -1 +1 @@ -web: python3 bot.py \ No newline at end of file +web: python3 bot.py diff --git a/README.md b/README.md index f4fb098da..356dfd257 100644 --- a/README.md +++ b/README.md @@ -7,8 +7,7 @@ ## ⚡️Features -- [x] 🔥 New feature : - - [+] ⚡️ Added `Artificial Inteligence` feature and many more feature ⚡️ +- [x] 🔥 New features - [+] ⚡️ Added `file renaming` feature ⚡️ - super premium repo... - [+] ⚡️ Support 2GB + Files ⚡️ @@ -60,7 +59,7 @@ You can deploy this bot anywhere.
Deploy To Heroku


- + Deploy

diff --git a/Script.py b/Script.py index 05fb8cee8..f02ad601e 100644 --- a/Script.py +++ b/Script.py @@ -1,6 +1,6 @@ class script(object): - START_TXT = """Hello {}, -Myself {},\n\nTrust me ! I can't even imagine how super-fast i can drive your Database channel \n\nAre you ready for Long Drive Baby...🤪""" + START_TXT = """ʜᴇʟʟᴏ {}, +Sᴏʀʀʏ ɪ ᴏɴʟʏ ᴡᴏʀᴋ ᴏɴ ᴍᴏᴠɪᴇ ʙᴏꜱꜱ Gʀᴏᴜᴘ. Nᴏ ᴏᴛʜᴇʀ ᴄᴏᴍᴍᴀɴᴅ ᴡɪʟʟ ᴡᴏʀᴋ ᴏɴ ᴛʜɪs ʙᴏᴛ ᴇxᴄᴇᴘᴛ sᴛᴀʀᴛ. ᴅᴏɴ’ᴛ ᴡᴀsᴛᴇ ʏᴏᴜʀ ᴛɪᴍᴇ""" LZTHMB_TEXT = """Hello {}, Glad to see you here. It seems that you really love LazyDeveloper's work.\n\nThumbnail extracting feature will be available soon, please join Dev Channel and stay tuned for next update.\n\n 🐞 Report Bug here: LazyDev Support """ @@ -16,19 +16,14 @@ class script(object): ALRDY_UPLDD_TEXT = """✅ Content is already uploaded.\n\nName:{}\nPlease make sure about your spelling before submiting request...""" HELP_TXT = """𝙷𝙴𝚈 {} Here is the help for my COMMANDS.""" - ABOUT_TXT = """✯ 𝙼𝚈 𝙽𝙰𝙼𝙴: {} -✯ 𝙲𝚁𝙴𝙰𝚃𝙾𝚁: LazyDeveloper -✯ 𝙻𝙸𝙱𝚁𝙰𝚁𝚈: 𝙿𝚈𝚁𝙾𝙶𝚁𝙰𝙼 -✯ 𝙻𝙰𝙽𝙶𝚄𝙰𝙶𝙴: 𝙿𝚈𝚃𝙷𝙾𝙽 𝟹 -✯ 𝙳𝙰𝚃𝙰 𝙱𝙰𝚂𝙴: 𝙼𝙾𝙽𝙶𝙾 𝙳𝙱 -✯ 𝙱𝙾𝚃 𝚂𝙴𝚁𝚅𝙴𝚁: 𝙷𝙴𝚁𝙾𝙺𝚄 -✯ 𝙱𝚄𝙸𝙻𝙳 𝚂𝚃𝙰𝚃𝚄𝚂: v1.0.1 [ 𝙱𝙴𝚃𝙰 ]""" + ABOUT_TXT = """ʜᴇʟʟᴏ {}, +Sᴏʀʀʏ ɪ ᴏɴʟʏ ᴡᴏʀᴋ ᴏɴ ᴍᴏᴠɪᴇ ʙᴏꜱꜱ Gʀᴏᴜᴘ. Nᴏ ᴏᴛʜᴇʀ ᴄᴏᴍᴍᴀɴᴅ ᴡɪʟʟ ᴡᴏʀᴋ ᴏɴ ᴛʜɪs ʙᴏᴛ ᴇxᴄᴇᴘᴛ sᴛᴀʀᴛ. ᴅᴏɴ’ᴛ ᴡᴀsᴛᴇ ʏᴏᴜʀ ᴛɪᴍᴇ""" SOURCE_TXT = """NOTE: -- Lazy Princess is an open source project. -- Source - https://github.com/LazyDeveloperr/LazyPrincess +- ꜱᴏʀʀyy..... +- ᴛʜɪꜱ ʙᴏᴛ ɪꜱ ɴᴏᴛ ᴀ ᴏᴩᴇɴ ꜱᴏᴜʀᴄᴇ ʙᴏᴛ DEVS: -- LazyDeveloper""" +- ꜱʜᴀʜɪᴅ""" MANUELFILTER_TXT = """Help: Filters - Filter is the feature were users can set automated replies for a particular keyword and LazyPriness will respond whenever that keyword hits the message @@ -119,7 +114,7 @@ class script(object): Name - {} """ PROGRESS_BAR = """\n -╭━━━━❰ PROGRESS BAR ❱━➣ +╭━━━━❰ ᴩʟᴇᴀꜱᴇ ᴡᴀɪᴛ ❱━➣ ┣⪼ 🗂️ : {1} | {2} ┣⪼ ⏳️ : {0}% ┣⪼ 🚀 : {3}/s diff --git a/app.json b/app.json index 93954b9c0..478702f93 100644 --- a/app.json +++ b/app.json @@ -16,7 +16,7 @@ "inline" ], "website": "https://github.com/LazyDeveloperr/LazyPrincess", - "repository": "https://github.com/LazyDeveloperr/LazyPrincess", + "repository": "https://github.com/Vikramved/LazyNew", "env": { "BOT_TOKEN": { "description": "Your bot token.", diff --git a/ai_LazyDeveloper.py b/bg_LazyDeveloper.py similarity index 100% rename from ai_LazyDeveloper.py rename to bg_LazyDeveloper.py diff --git a/bot.py b/bot.py index 8b146b756..2e63005b1 100644 --- a/bot.py +++ b/bot.py @@ -18,7 +18,7 @@ from aiohttp import web from plugins import web_server -PORT = "8080" +PORT = "3000" class Bot(Client): diff --git a/database/ia_filterdb.py b/database/ia_filterdb.py index e8dcce491..34ba294ee 100644 --- a/database/ia_filterdb.py +++ b/database/ia_filterdb.py @@ -66,7 +66,7 @@ async def save_file(media): -async def get_search_results(query, file_type=None, max_results=10, offset=0, filter=False): +async def get_search_results(query, file_type=None, max_results=5, offset=0, filter=False): """For given query return (results, next_offset)""" query = query.strip() diff --git a/database/lazy_ffmpeg.py b/database/lazy_ffmpeg.py deleted file mode 100644 index a24af909e..000000000 --- a/database/lazy_ffmpeg.py +++ /dev/null @@ -1,50 +0,0 @@ -import time -import os -import asyncio -from PIL import Image -from hachoir.metadata import extractMetadata -from hachoir.parser import createParser - -async def fix_thumb(c_thumb): - width = 0 - height = 0 - try: - if c_thumb != None: - metadata = extractMetadata(createParser(c_thumb)) - if metadata.has("width"): - width = metadata.get("width") - if metadata.has("height"): - height = metadata.get("height") - Image.open(c_thumb).convert("RGB").save(c_thumb) - img = Image.open(c_thumb) - img.resize((320, height)) - img.save(c_thumb, "JPEG") - except Exception as e: - print(e) - c_thumb = None - - return width, height, c_thumb - -async def take_screen_shot(video_file, output_directory, ttl): - out_put_file_name = f"{output_directory}/{time.time()}.jpg" - file_genertor_command = [ - "ffmpeg", - "-ss", - str(ttl), - "-i", - video_file, - "-vframes", - "1", - out_put_file_name - ] - process = await asyncio.create_subprocess_exec( - *file_genertor_command, - stdout=asyncio.subprocess.PIPE, - stderr=asyncio.subprocess.PIPE, - ) - stdout, stderr = await process.communicate() - e_response = stderr.decode().strip() - t_response = stdout.decode().strip() - if os.path.lexists(out_put_file_name): - return out_put_file_name - return None diff --git a/database/lazy_set.py b/database/lazy_set.py deleted file mode 100644 index 237f1ac22..000000000 --- a/database/lazy_set.py +++ /dev/null @@ -1,36 +0,0 @@ -from typing import Dict, List -def escape_invalid_curly_brackets(text: str, valids: List[str]) -> str: - new_text = "" - idx = 0 - while idx < len(text): - if text[idx] == "{": - if idx + 1 < len(text) and text[idx + 1] == "{": - idx += 2 - new_text += "{{{{" - continue - else: - success = False - for v in valids: - if text[idx:].startswith('{' + v + '}'): - success = True - break - if success: - new_text += text[idx: idx + len(v) + 2] - idx += len(v) + 2 - continue - else: - new_text += "{{" - - elif text[idx] == "}": - if idx + 1 < len(text) and text[idx + 1] == "}": - idx += 2 - new_text += "}}}}" - continue - else: - new_text += "}}" - - else: - new_text += text[idx] - idx += 1 - - return new_text diff --git a/database/lazy_utils.py b/database/lazy_utils.py deleted file mode 100644 index 436617732..000000000 --- a/database/lazy_utils.py +++ /dev/null @@ -1,88 +0,0 @@ - # Credit @LazyDeveloper. - # Please Don't remove credit. - # Born to make history @LazyDeveloper ! - - # Thank you LazyDeveloper for helping us in this Journey - -import math -import time -from Script import script -from pyrogram.types import InlineKeyboardButton, InlineKeyboardMarkup -from pyrogram import enums - -async def progress_for_pyrogram(current, total, ud_type, message, start): - - now = time.time() - diff = now - start - if round(diff % 10.00) == 0 or current == total: - # if round(current / total * 100, 0) % 5 == 0: - percentage = current * 100 / total - speed = current / diff - elapsed_time = round(diff) * 1000 - time_to_completion = round((total - current) / speed) * 1000 - estimated_total_time = elapsed_time + time_to_completion - - elapsed_time = TimeFormatter(milliseconds=elapsed_time) - estimated_total_time = TimeFormatter(milliseconds=estimated_total_time) - - progress = "{0}{1}".format( - ''.join(["█" for i in range(math.floor(percentage / 5))]), - ''.join(["░" for i in range(20 - math.floor(percentage / 5))])) - - tmp = progress + script.PROGRESS_BAR.format( - round(percentage, 2), - humanbytes(current), - humanbytes(total), - humanbytes(speed), - # elapsed_time if elapsed_time != '' else "0 s", - estimated_total_time if estimated_total_time != '' else "0 s" - ) - try: - await message.edit( - text="{}\n\n{}".format(ud_type, tmp), - reply_markup=InlineKeyboardMarkup( [[ - InlineKeyboardButton("⨳ C L Ф S Ξ ⨳", callback_data="cancel") - ]] - ) - ) - except: - pass - -def humanbytes(size): - # https://stackoverflow.com/a/49361727/4723940 - # 2**10 = 1024 - if not size: - return "" - power = 2**10 - n = 0 - Dic_powerN = {0: ' ', 1: 'K', 2: 'M', 3: 'G', 4: 'T'} - while size > power: - size /= power - n += 1 - return str(round(size, 2)) + " " + Dic_powerN[n] + 'B' - -def TimeFormatter(milliseconds: int) -> str: - seconds, milliseconds = divmod(int(milliseconds), 1000) - minutes, seconds = divmod(seconds, 60) - hours, minutes = divmod(minutes, 60) - days, hours = divmod(hours, 24) - tmp = ((str(days) + "d, ") if days else "") + \ - ((str(hours) + "h, ") if hours else "") + \ - ((str(minutes) + "m, ") if minutes else "") + \ - ((str(seconds) + "s, ") if seconds else "") + \ - ((str(milliseconds) + "ms, ") if milliseconds else "") - return tmp[:-2] - -def convert(seconds): - seconds = seconds % (24 * 3600) - hour = seconds // 3600 - seconds %= 3600 - minutes = seconds // 60 - seconds %= 60 - return "%d:%02d:%02d" % (hour, minutes, seconds) - - - - - - diff --git a/database/users_chats_db.py b/database/users_chats_db.py index a6ead18fa..d079f28c9 100644 --- a/database/users_chats_db.py +++ b/database/users_chats_db.py @@ -1,4 +1,3 @@ -# https://github.com/odysseusmax/animated-lamp/blob/master/bot/database/database.py import motor.motor_asyncio from info import DATABASE_NAME, DATABASE_URI, IMDB, IMDB_TEMPLATE, MELCOW_NEW_USERS, P_TTI_SHOW_OFF, SINGLE_BUTTON, SPELL_CHECK_REPLY, PROTECT_CONTENT @@ -12,10 +11,9 @@ def __init__(self, uri, database_name): def new_user(self, id, name): return dict( - id = id, - name = name, + id=id, + name=name, _id=int(id), - file_id=None, caption=None, ban_status=dict( is_banned=False, @@ -25,8 +23,8 @@ def new_user(self, id, name): def new_group(self, id, title): return dict( - id = id, - title = title, + id=id, + title=title, chat_status=dict( is_disabled=False, reason="", @@ -38,7 +36,7 @@ async def add_user(self, id, name): await self.col.insert_one(user) async def is_user_exist(self, id): - user = await self.col.find_one({'id':int(id)}) + user = await self.col.find_one({'id': int(id)}) return bool(user) async def total_users_count(self): @@ -64,19 +62,17 @@ async def get_ban_status(self, id): is_banned=False, ban_reason='' ) - user = await self.col.find_one({'id':int(id)}) + user = await self.col.find_one({'id': int(id)}) if not user: return default return user.get('ban_status', default) async def get_all_users(self): return self.col.find({}) - async def delete_user(self, user_id): await self.col.delete_many({'id': int(user_id)}) - async def get_banned(self): users = self.col.find({'ban_status.is_banned': True}) chats = self.grp.find({'chat_status.is_disabled': True}) @@ -87,22 +83,20 @@ async def get_banned(self): async def add_chat(self, chat, title): chat = self.new_group(chat, title) await self.grp.insert_one(chat) - async def get_chat(self, chat): - chat = await self.grp.find_one({'id':int(chat)}) + chat = await self.grp.find_one({'id': int(chat)}) return False if not chat else chat.get('chat_status') - + async def re_enable_chat(self, id): - chat_status=dict( + chat_status = dict( is_disabled=False, reason="", - ) + ) await self.grp.update_one({'id': int(id)}, {'$set': {'chat_status': chat_status}}) async def update_settings(self, id, settings): await self.grp.update_one({'id': int(id)}, {'$set': {'settings': settings}}) - async def get_settings(self, id): default = { @@ -114,51 +108,27 @@ async def get_settings(self, id): 'welcome': MELCOW_NEW_USERS, 'template': IMDB_TEMPLATE } - chat = await self.grp.find_one({'id':int(id)}) + chat = await self.grp.find_one({'id': int(id)}) if chat: return chat.get('settings', default) return default - async def disable_chat(self, chat, reason="No Reason"): - chat_status=dict( + chat_status = dict( is_disabled=True, reason=reason, - ) + ) await self.grp.update_one({'id': int(chat)}, {'$set': {'chat_status': chat_status}}) - async def total_chat_count(self): count = await self.grp.count_documents({}) return count - async def get_all_chats(self): return self.grp.find({}) - - + async def get_db_size(self): return (await self.db.command("dbstats"))['dataSize'] - - # Credit @LazyDeveloper. - # Please Don't remove credit. - # Born to make history @LazyDeveloper ! => Remember this name forever <= - - # Thank you LazyDeveloper for helping us in this Journey - - async def set_thumbnail(self, id, file_id): - await self.col.update_one({'id': int(id)}, {'$set': {'file_id': file_id}}) - - async def get_thumbnail(self, id): - try: - thumbnail = await self.col.find_one({'id': int(id)}) - if thumbnail: - return thumbnail.get('file_id') - else: - return None - except Exception as e: - print(e) - # Born to make history @LazyDeveloper ! => Remember this name forever <= async def set_caption(self, id, caption): await self.col.update_one({'id': int(id)}, {'$set': {'caption': caption}}) diff --git a/info.py b/info.py index ee66be11b..c3f2c31a8 100644 --- a/info.py +++ b/info.py @@ -12,60 +12,57 @@ def is_enabled(value, default): # Bot information SESSION = environ.get('SESSION', 'Media_search') -API_ID = int(environ['API_ID']) -API_HASH = environ['API_HASH'] -BOT_TOKEN = environ['BOT_TOKEN'] +API_ID = int(environ['API_ID','15428219']) +API_HASH = environ['API_HASH','0042e5b26181a1e95ca40a7f7c51eaa7'] +BOT_TOKEN = environ['BOT_TOKEN','6051467458:AAH498GLzq3by-D22gJrdbNH0FwCFBSi13o'] # Bot settings CACHE_TIME = int(environ.get('CACHE_TIME', 300)) USE_CAPTION_FILTER = bool(environ.get('USE_CAPTION_FILTER', False)) -PICS = (environ.get('PICS', 'https://telegra.ph/file/7e56d907542396289fee4.jpg https://telegra.ph/file/9aa8dd372f4739fe02d85.jpg https://telegra.ph/file/adffc5ce502f5578e2806.jpg https://telegra.ph/file/6937b60bc2617597b92fd.jpg https://telegra.ph/file/09a7abaab340143f9c7e7.jpg https://telegra.ph/file/5a82c4a59bd04d415af1c.jpg https://telegra.ph/file/323986d3bd9c4c1b3cb26.jpg https://telegra.ph/file/b8a82dcb89fb296f92ca0.jpg https://telegra.ph/file/31adab039a85ed88e22b0.jpg https://telegra.ph/file/c0e0f4c3ed53ac8438f34.jpg https://telegra.ph/file/eede835fb3c37e07c9cee.jpg https://telegra.ph/file/e17d2d068f71a9867d554.jpg https://telegra.ph/file/8fb1ae7d995e8735a7c25.jpg https://telegra.ph/file/8fed19586b4aa019ec215.jpg https://telegra.ph/file/8e6c923abd6139083e1de.jpg https://telegra.ph/file/0049d801d29e83d68b001.jpg')).split() +PICS = (environ.get('PICS', 'https://telegra.ph/file/752902d61af6aade198b6.jpg')).split() # Admins, Channels & Users -ADMINS = [int(admin) if id_pattern.search(admin) else admin for admin in environ.get('ADMINS', '').split()] -CHANNELS = [int(ch) if id_pattern.search(ch) else ch for ch in environ.get('CHANNELS', '0').split()] -auth_users = [int(user) if id_pattern.search(user) else user for user in environ.get('AUTH_USERS', '').split()] +ADMINS = [int(admin) if id_pattern.search(admin) else admin for admin in environ.get('ADMINS', '1653535224').split()] +CHANNELS = [int(ch) if id_pattern.search(ch) else ch for ch in environ.get('CHANNELS', '-1001794801335').split()] +auth_users = [int(user) if id_pattern.search(user) else user for user in environ.get('AUTH_USERS', '1653535224').split()] AUTH_USERS = (auth_users + ADMINS) if auth_users else [] -auth_channel = environ.get('AUTH_CHANNEL') +auth_channel = environ.get('AUTH_CHANNEL','-1001663310507') auth_grp = environ.get('AUTH_GROUP') AUTH_CHANNEL = int(auth_channel) if auth_channel and id_pattern.search(auth_channel) else None AUTH_GROUPS = [int(ch) for ch in auth_grp.split()] if auth_grp else None # MongoDB information -DATABASE_URI = environ.get('DATABASE_URI', "") -DATABASE_NAME = environ.get('DATABASE_NAME', "LazyDeveloper") +DATABASE_URI = environ.get('DATABASE_URI', "mongodb+srv://LZ:LZ@lazy.bpfbprq.mongodb.net/?retryWrites=true&w=majority") +DATABASE_NAME = environ.get('DATABASE_NAME', "movieboss") COLLECTION_NAME = environ.get('COLLECTION_NAME', 'Telegram_files') # Others -LOG_CHANNEL = int(environ.get('LOG_CHANNEL', 0)) -SUPPORT_CHAT = environ.get('SUPPORT_CHAT', 'LazyDeveloper') +LOG_CHANNEL = int(environ.get('LOG_CHANNEL', "-1001592766451")) +SUPPORT_CHAT = environ.get('SUPPORT_CHAT', 'MovieBossTG') 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) -CUSTOM_FILE_CAPTION = environ.get("CUSTOM_FILE_CAPTION", "⚡File uploaded by [Movies Adaa™](https://t.me/real_MoviesAdda2)⚡\n\n🎦 File Name: {file_caption}\n⚙️ Size: {file_size}\n\n ❤️WE LOVE YOU❤️\n🔥 ↭ Join Now [MoviesAdda™](https://t.me/real_MoviesAdda2) ↭ 🔥") -BATCH_FILE_CAPTION = environ.get("BATCH_FILE_CAPTION", CUSTOM_FILE_CAPTION) +IMDB = is_enabled((environ.get('IMDB', "False")), True) +SINGLE_BUTTON = is_enabled((environ.get('SINGLE_BUTTON', "True")), False) +CUSTOM_FILE_CAPTION = environ.get("CUSTOM_FILE_CAPTION", "Fɪʟᴇ ɴᴀᴍᴇ:{file_name}\n\n=========== • ✠ •\n===========\n◽️ ɢʀᴏᴜᴩ : @MovieBossTG\n◽️ ᴏᴡɴᴇʀ : @GT_ben\n=========== • ✠ •\n===========") +BATCH_FILE_CAPTION = environ.get("BATCH_FILE_CAPTION", "{file_caption}) IMDB_TEMPLATE = environ.get("IMDB_TEMPLATE", "Your Query: {query} \n‌‌‌‌IMDb Data by: @LazyDeveloper \n\n🏷 Title: {title}\n🎭 Genres: {genres}\n📆 Year: {year}\n🌟 Rating: {rating} / 10 \n\n♥️ we are nothing without you ♥️ \n\n💛 Please Share Us 💛\n\n⚠️Click on the button 👇 below to get your query privately") LONG_IMDB_DESCRIPTION = is_enabled(environ.get("LONG_IMDB_DESCRIPTION", "False"), False) SPELL_CHECK_REPLY = is_enabled(environ.get("SPELL_CHECK_REPLY", "True"), False) -MAX_LIST_ELM = environ.get("MAX_LIST_ELM", None) +MAX_LIST_ELM = environ.get("MAX_LIST_ELM", "5") 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) -PROTECT_CONTENT = is_enabled((environ.get('PROTECT_CONTENT', "True")), False) +WELCOM_PIC = environ.get("WELCOM_PIC", "https://telegra.ph/file/752902d61af6aade198b6.jpg") +WELCOM_TEXT = environ.get("WELCOM_TEXT", "ʜᴇy {user} ᴡᴇʟᴄᴏᴍᴇ ᴛᴏ {chat}\n\nനിങ്ങൾക് ഇവിടെ ഏത് സിനിമയും റിക്വസ്റ്റ് ചെയ്യാം. ശെരിയായ സ്പെല്ലിങ് ആയാൽ മാത്രമേ നിങ്ങൾക് സിനിമ ലഭിക്കുകയൊള്ളു\n\nyᴏᴜ ᴄᴀɴ ʀᴇqᴜᴇꜱᴛ ᴀɴy ᴍᴏᴠɪᴇ ʜᴇʀᴇ. yᴏᴜ ᴡɪʟʟ ɢᴇᴛ ᴛʜᴇ ᴍᴏᴠɪᴇ ᴏɴʟy ɪꜰ ɪᴛ ɪꜱ ꜱᴩᴇʟʟᴇᴅ ᴄᴏʀʀᴇᴄᴛʟy\nᴍᴏᴠɪᴇ ʀᴇqᴜᴇꜱᴛ ᴇxᴀᴍᴩʟᴇ\n🎪 ᴠɪᴋʀᴀᴍ 2022\nꜱᴇʀɪᴇꜱ ʀᴇqᴜᴇꜱᴛ ᴇxᴀᴍᴩʟᴇ\n🎪 ᴍᴏɴᴇy ʜᴇɪꜱᴛ S01E01") +PROTECT_CONTENT = is_enabled((environ.get('PROTECT_CONTENT', "False")), False) PUBLIC_FILE_STORE = is_enabled((environ.get('PUBLIC_FILE_STORE', "False")), False) #LazyRenamer Configs FLOOD = int(environ.get("FLOOD", "10")) -LAZY_MODE = bool(environ.get("LAZY_MODE")) +LAZY_MODE = bool(environ.get("LAZY_MODE","False")) #Add user id of the user in this field those who you want to be Authentic user for file renaming features -lazy_renamers = [int(lazrenamers) if id_pattern.search(lazrenamers) else lazrenamers for lazrenamers in environ.get('LAZY_RENAMERS', '').split()] -LAZY_RENAMERS = (lazy_renamers + ADMINS) if lazy_renamers else [] -REQ_CHANNEL = int(environ.get('REQ_CHANNEL')) +lazy_renamers = [int(lazrenamers) if id_pattern.search(lazrenamers) else lazrenamers for lazrenamers in environ.get('LAZY_RENAMERS', '1653535224').split()] +REQ_CHANNEL = int(environ.get('REQ_CHANNEL',"-1001903921399")) -#ai -AI = is_enabled((environ.get("AI","True")), False) -OPENAI_API = environ.get("OPENAI_API","") -LAZY_AI_LOGS = int(environ.get("LAZY_AI_LOGS","")) #GIVE YOUR NEW LOG CHANNEL ID TO STORE MESSAGES THAT THEY SEARCH IN BOT PM.... [ i have added this to keep an eye on the users message, to avoid misuse of LazyPrincess ] # Requested Content template variables --- ADMIN_USRNM = environ.get('ADMIN_USRNM','real_heros') # WITHOUT @ MAIN_CHANNEL_USRNM = environ.get('MAIN_CHANNEL_USRNM','Channel_UserName') # WITHOUT @ @@ -74,16 +71,14 @@ def is_enabled(value, default): MOVIE_GROUP_USERNAME = environ.get('MOVIE_GROUP_USERNAME', "+qAxoGBvSc34yNmU1") #[ without @ ] # Url Shortner -URL_MODE = is_enabled((environ.get("URL_MODE","True")), False) +URL_MODE = is_enabled((environ.get("URL_MODE","False")), False) URL_SHORTENR_WEBSITE = environ.get('URL_SHORTENR_WEBSITE', 'omegalinks.in') #Always use website url from api section URL_SHORTNER_WEBSITE_API = environ.get('URL_SHORTNER_WEBSITE_API', '3e3ea22a23eecb70d24ab987ccdc596efb72f9a8') LZURL_PRIME_USERS = [int(lazyurlers) if id_pattern.search(lazyurlers) else lazyurlers for lazyurlers in environ.get('LZURL_PRIME_USERS', '5965340120').split()] # Auto Delete For Group Message (Self Delete) # -SELF_DELETE_SECONDS = int(environ.get('SELF_DELETE_SECONDS', 180)) -SELF_DELETE = environ.get('SELF_DELETE', True) -if SELF_DELETE == "True": - SELF_DELETE = True +SELF_DELETE_SECONDS = int(environ.get('SELF_DELETE_SECONDS', 1800)) +SELF_DELETE = is_enabled((environ.get('SELF_DELETE','True')), False) # Download Tutorial Button # DOWNLOAD_TEXT_NAME = "📥 HOW TO DOWNLOAD 📥" diff --git a/plugins/commands.py b/plugins/commands.py index 07086a3df..ec7e02db0 100644 --- a/plugins/commands.py +++ b/plugins/commands.py @@ -23,12 +23,10 @@ async def start(client, message): if message.chat.type in [enums.ChatType.GROUP, enums.ChatType.SUPERGROUP]: buttons = [ [ - InlineKeyboardButton('🔔 Updates 🤖', url='https://t.me/LazyDeveloper') + InlineKeyboardButton('◽️ᴍᴏᴠɪᴇ ɢʀᴏᴜᴩ', url='https://t.me/+9CKK8DlZlgUxOTE9') ], [ - InlineKeyboardButton('🙆🏻 Help 🦾', url=f"https://t.me/{temp.U_NAME}?start=help"), - ],[ - InlineKeyboardButton('Watch Tutorial', url='https://youtube.com/LazyDeveloper') + InlineKeyboardButton('◽️ʜᴇʟᴩ', url=f"https://t.me/{temp.U_NAME}?start=help"), ], [ InlineKeyboardButton(text=DOWNLOAD_TEXT_NAME,url=DOWNLOAD_TEXT_URL) @@ -46,17 +44,9 @@ async def start(client, message): 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('➕↖️ Add Me To Your Groups ↗️➕', url=f'http://t.me/{temp.U_NAME}?startgroup=true') - ],[ - InlineKeyboardButton('🧞‍♀️ Search 🧐', switch_inline_query_current_chat=''), - InlineKeyboardButton('🔔 Updates 🤖', url='https://t.me/LazyDeveloper') - ],[ - InlineKeyboardButton('🙆🏻 Help 🦾', callback_data='help'), - InlineKeyboardButton('♥️ About ♥️', callback_data='about') - ],[ - InlineKeyboardButton('Watch Tutorial', url='https://youtube.com/LazyDeveloper') - ]] + buttons = [ + [InlineKeyboardButton('⚡ ᴄʟɪᴄᴋ ʜᴇʀᴇ ꜰᴏʀ ᴍᴏʀᴇ ʙᴜᴛᴛᴏɴꜱ ⚡️', callback_data="about")] + ] reply_markup = InlineKeyboardMarkup(buttons) await message.reply_photo( photo=random.choice(PICS), @@ -69,46 +59,29 @@ async def start(client, message): try: invite_link = await client.create_chat_invite_link(int(AUTH_CHANNEL)) except ChatAdminRequired: - logger.error("Hey Sona, Ek dfa check kr lo ki main Channel mei Add hu ya nhi...!") + logger.error("ʜᴇy ᴅᴜᴅᴇ ᴄʜᴇᴄᴋ ᴏɴᴄᴇ ɪꜰ yᴏᴜ ᴀᴅᴅᴇᴅ ᴍᴇ ɪɴ ᴄʜᴀɴɴᴇʟ ᴏʀ ɴᴏᴛᴇ...!") return - btn = [ - [ - InlineKeyboardButton( - "🤖 Join Updates Channel", url=invite_link.invite_link - ) - ], - [ - InlineKeyboardButton( - "🦋 SUBSCRIBE YT Channel 🦋", url='https://youtube.com/@LazyDeveloperr' - ) - ] - ] - 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]}")]) + kk, file_id = message.command[1].split("_", 1) + pre = 'checksubp' if kk == 'filep' else 'checksub' + btn = [[InlineKeyboardButton("ᴊᴏɪɴ ɢʀᴏᴜᴩ", url=invite_link.invite_link), + InlineKeyboardButton("ᴍᴇ ᴊᴏɪɴᴇᴅ", callback_data=f"{pre}#{file_id}")],[ + InlineKeyboardButton("Hᴇʏ Bᴏᴛ....! Wʜʏ I'ᴍ ᴊᴏɪɴɪɴɢ", callback_data="neosub")]] await client.send_message( chat_id=message.from_user.id, - text="**Please Join My Updates Channel to use this Bot!**", + text="⚠️ ᴘʟᴇᴀsᴇ ғᴏʟʟᴏᴡ ᴛʜɪs ʀᴜʟᴇs ⚠️\n\n{} ആദ്യം【 ᴊᴏɪɴ ɢʀᴏᴜᴘ 】എന്ന ബട്ടൺ ക്ലിക്ക് ചെയ്തു ഗ്രൂപ്പിൽ ജോയിൻ ചെയ്.. എന്നിട്ട് വീണ്ടു ബോട്ടിൽ വന്നിട്ട്【 ᴍᴇ ᴊᴏɪɴᴇᴅ 】എന്ന ബട്ടൺ ക്ലിക്ക് ചെയ്താൽ ഫയൽ കിട്ടുന്നതായിരിക്കും\n\nFɪʀsᴛ ᴄʟɪᴄᴋ ᴏɴ ᴛʜᴇ【 ᴊᴏɪɴ ɢʀᴏᴜᴘ 】ʙᴜᴛᴛᴏɴ ᴀɴᴅ ᴊᴏɪɴ ᴛʜᴇ ɢʀᴏᴜᴘ. ᴛʜᴇɴ ᴄᴏᴍᴇ ʙᴀᴄᴋ ᴛᴏ ᴛʜᴇ ʙᴏᴛ ᴄʟɪᴄᴋ ᴏɴ【 ᴍᴇ ᴊᴏɪɴᴇᴅ 】ʙᴜᴛᴛᴏɴ ᴛᴏ ɢᴇᴛ ᴛʜᴇ ғɪʟᴇ...".format(message.from_user.mention), reply_markup=InlineKeyboardMarkup(btn), - parse_mode=enums.ParseMode.MARKDOWN + parse_mode=enums.ParseMode.HTML, + disable_web_page_preview=True ) return if len(message.command) == 2 and message.command[1] in ["subscribe", "error", "okay", "help"]: buttons = [[ - InlineKeyboardButton('➕↖️ Add Me To Your Groups ↗️➕', url=f'http://t.me/{temp.U_NAME}?startgroup=true') - ],[ - InlineKeyboardButton('🧞‍♀️ Search 🧐', switch_inline_query_current_chat=''), - InlineKeyboardButton('🔔 Updates 🤖', url='https://t.me/LazyDeveloper') + InlineKeyboardButton('◽️ᴏᴡɴᴇʀ', url='https://t.me/GT_ben'), + InlineKeyboardButton('◽️ᴍᴏᴠɪᴇ ɢʀᴏᴜᴩ', url='https://t.me/+9CKK8DlZlgUxOTE9') ],[ - InlineKeyboardButton('🙆🏻 Help 🦾', callback_data='help'), - InlineKeyboardButton('♥️ About ♥️', callback_data='about') - ],[ - InlineKeyboardButton('Watch Tutorial', url='https://youtube.com/LazyDeveloper') + InlineKeyboardButton('◽️ʜᴇʟᴩ', callback_data='help'), + InlineKeyboardButton('◽️ᴀʙᴏᴜᴛ', callback_data='about') ]] reply_markup = InlineKeyboardMarkup(buttons) await message.reply_photo( @@ -254,10 +227,18 @@ async def start(client, message): f_caption=f_caption if f_caption is None: f_caption = f"{files.file_name}" + buttons = [[ + InlineKeyboardButton('🚸 ᴅᴇʟᴇᴛᴇ', callback_data='close_data'), + InlineKeyboardButton('💞 sʜᴀʀᴇ', url='https://t.me/share/url?url=😱%20ᴍᴏᴠɪᴇ%20ʙᴏꜱꜱ.²·⁰%20😱%0A%0Aഏത്%20അർധരാത്രി%20ചോദിച്ചാലും%20പടം%20കിട്ടും,%20ലോകത്തിലെ%20ഒട്ടുമിക്ക%20ഭാഷകളിലുമുള്ള%20സിനിമകളുടെ%20കളക്ഷൻ..%20❤️%0A%0A👇%20GROUP%20LINK%20👇%0A@MovieBoss4%0A@MovieBoss%0A@MovieBoss') + ],[ + InlineKeyboardButton(text=f'🌿 ғɪʟᴇ sɪᴢᴇ 【 {size} 】', callback_data='tnk') + ]] + reply_markup = InlineKeyboardMarkup(buttons) await client.send_cached_media( chat_id=message.from_user.id, file_id=file_id, caption=f_caption, + reply_markup=reply_markup, protect_content=True if pre == 'filep' else False, ) @@ -374,7 +355,7 @@ async def delete_all_index(bot, message): @Client.on_callback_query(filters.regex(r'^autofilter_delete')) async def delete_all_index_confirm(bot, message): await Media.collection.drop() - await message.answer('♥️ Thank You LazyDeveloper ♥️') + await message.answer('♥️ Thank You ♥️') await message.message.edit('Succesfully Deleted All The Indexed Files.') diff --git a/plugins/index.py b/plugins/index.py index 786041611..622476595 100644 --- a/plugins/index.py +++ b/plugins/index.py @@ -1,238 +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, LAZY_RENAMERS -from info import INDEX_REQ_CHANNEL as LOG_CHANNEL -from info import LAZY_MODE -from database.ia_filterdb import save_file -from pyrogram.types import InlineKeyboardMarkup, InlineKeyboardButton -from utils import temp -import re -import humanize -from info import ADMINS - -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 i am An Admin In The Channel, if channel is private') - if k.empty: - return await message.reply('This may be group and i am not a admin of the group.') - - if message.from_user.id in ADMINS: - if (LAZY_MODE==True): - file = getattr(message, message.media.value) - filename = file.file_name - filesize = humanize.naturalsize(file.file_size) - buttons = [ - [ InlineKeyboardButton("📝✧ S𝚝ar𝚝 re𝚗aᗰi𝚗g ✧📝", callback_data="rename") ], - [ InlineKeyboardButton('📇✧✧ S𝚝ar𝚝 iŋdᗴXi𝚗g ✧✧📇',callback_data=f'index#accept#{chat_id}#{last_msg_id}#{message.from_user.id}')], - [ InlineKeyboardButton('⨳ C L Ф S Ξ ⨳', callback_data='cancel'),] - ] - reply_markup = InlineKeyboardMarkup(buttons) - return await message.reply( - f'\n⨳ *•.¸♡ LΛZ𝐲 MⓄd𝓔 ♡¸.•* ⨳\n\n**__What do you want me to do with this file.?__**\n\n🪬Chat ID/ Username: {chat_id}\nℹ️Last Message ID: {last_msg_id} \n\n🎞**File Name** :- `{filename}`\n\n⚙️**File Size** :- `{filesize}`', - reply_to_message_id=message.id, - reply_markup=reply_markup) - else: - buttons = [ - [ - InlineKeyboardButton('Yes', - callback_data=f'index#accept#{chat_id}#{last_msg_id}#{message.from_user.id}') - ], - [ - InlineKeyboardButton('⨳ C L Ф S Ξ ⨳', 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 i am an admin in the chat and have permission to invite users.') - else: - link = f"@{message.forward_from_chat.username}" - buttons = [ - [ - InlineKeyboardButton('Request 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) - if (LAZY_MODE == True): - if message.from_user.id in LAZY_RENAMERS: - k = await message.reply('🎉\n\n\n❤️ Thank You For the Contribution, Wait For My Moderators to verify the files.\n\n\n🎁') - buttons = [ - [InlineKeyboardButton("📝✧✧ S𝚝ar𝚝 re𝚗aᗰi𝚗g ✧✧📝", callback_data="rename") ], - [InlineKeyboardButton('⨳ C L Ф S Ξ ⨳', callback_data='cancel')]] - reply_markup = InlineKeyboardMarkup(buttons) - file = getattr(message, message.media.value) - filename = file.file_name - filesize = humanize.naturalsize(file.file_size) - await message.reply( - f".\n⨳ *•.¸♡ LΛZ𝐲 MⓄd𝓔 ♡¸.•* ⨳\n\nBecause you are an Authentic user, please don't hesitate to ask me for any other help...\n\n🪬Chat ID/ Username: {chat_id}\nℹ️Last Message ID: {last_msg_id} \n\n🎞**File Name** :- `{filename}`\n\n⚙️**File Size** :- `{filesize}`\n\nYou can simply close this window or perform following actions, it's upon you", - reply_to_message_id=message.id, - reply_markup=reply_markup) - await asyncio.sleep(600) - await k.delete() - else : - await message.reply('🎉\n\n\n❤️ Thank You For the Contribution, Wait For My Moderators to verify the files.\n\n\n🎁') - buttons = [ - [InlineKeyboardButton("📝✧✧ S𝚝ar𝚝 re𝚗aᗰi𝚗g ✧✧📝", callback_data="requireauth") ], - [InlineKeyboardButton('⨳ C L Ф S Ξ ⨳', callback_data='cancel')]] - reply_markup = InlineKeyboardMarkup(buttons) - file = getattr(message, message.media.value) - filename = file.file_name - filesize = humanize.naturalsize(file.file_size) - k = await message.reply( - f"\n⨳ *•.¸♡ LΛZ𝐲 MⓄd𝓔 ♡¸.•* ⨳\n\n🤩 Do you know LazyPrincess can do a lot of things at a time...\nWould you like to try some of it's amazing features... \n\n🪬Chat ID/ Username: {chat_id}\nℹ️Last Message ID: {last_msg_id} \n\n🎞**File Name** :- `{filename}`\n\n⚙️**File Size** :- `{filesize}`", - reply_to_message_id=message.id, - reply_markup=reply_markup) - await asyncio.sleep(600) - await k.delete() - else: - await message.reply('🎉\n\n\n❤️ Thank You For the Contribution, Wait For My Moderators to verify the files.\n\n\n🎁') - - - - -@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}') +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, LAZY_RENAMERS +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}') diff --git a/plugins/p_ttishow.py b/plugins/p_ttishow.py index 67494882b..c237b184e 100644 --- a/plugins/p_ttishow.py +++ b/plugins/p_ttishow.py @@ -1,7 +1,7 @@ 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 +from info import ADMINS, LOG_CHANNEL, SUPPORT_CHAT, WELCOM_PIC, WELCOM_TEXT from database.users_chats_db import db from database.ia_filterdb import Media from utils import get_size, temp, get_settings @@ -22,7 +22,7 @@ async def save_group(bot, message): 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}') + InlineKeyboardButton('ꜱᴜᴩᴩᴏʀᴛ', url=f'https://t.me/{SUPPORT_CHAT}') ]] reply_markup=InlineKeyboardMarkup(buttons) k = await message.reply( @@ -37,12 +37,12 @@ async def save_group(bot, message): await bot.leave_chat(message.chat.id) return buttons = [[ - InlineKeyboardButton('🤥 Help', url=f"https://t.me/{temp.U_NAME}?start=help"), - InlineKeyboardButton('🔔 Updates', url='https://t.me/LazyDeveloper') + InlineKeyboardButton('◽️ʜᴇʟᴩ', url=f"https://t.me/{temp.U_NAME}?start=help"), + InlineKeyboardButton('◽️ᴍᴏᴠɪᴇ ɢʀᴏᴜᴩ', url='https://t.me/+9CKK8DlZlgUxOTE9') ]] 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.", + text=f"ᴛʜᴀɴᴋyᴏᴜ ꜰᴏʀ ᴀᴅᴅɪɴɢ ᴍᴇ ɪɴ {message.chat.title} ❣️\n\nɪꜰ yᴏᴜ ʜᴀᴠᴇ ᴀɴy qᴜᴇꜱᴛɪᴏɴ & ᴅᴏᴜʙᴛꜱ ᴀʙᴏᴜᴛ ᴜꜱɪɴɢ ᴍᴇ ᴄᴏɴᴛᴀᴄᴛ ꜱᴜᴩᴩᴏʀᴛ.", reply_markup=reply_markup) else: settings = await get_settings(message.chat.id) @@ -53,7 +53,12 @@ async def save_group(bot, message): await (temp.MELCOW['welcome']).delete() except: pass - temp.MELCOW['welcome'] = await message.reply(f"Hey , {u.mention}, Welcome to {message.chat.title}") + if WELCOM_PIC: + temp.MELCOW['welcome'] = await message.reply_photo(photo=WELCOM_PIC, caption=WELCOM_TEXT.format(user=u.mention, chat=message.chat.title), + reply_markup=InlineKeyboardMarkup([[InlineKeyboardButton("🇦🇺 ᴇɴɢ", callback_data="engwlc"),InlineKeyboardButton("🇮🇳 ʜɴᴅ", callback_data="hndwlc"),InlineKeyboardButton("🇸🇦 ᴀʀʙ", callback_data="arbwlc")],[InlineKeyboardButton("📍 ʀᴜʟᴇꜱ 📍", url="http://t.me/DrMasterTGbot?start=regole_-1001397638909")]])) + else: + temp.MELCOW['welcome'] = await message.reply_text(text=WELCOM_TEXT.format(user=u.mention, chat=message.chat.title), + reply_markup=InlineKeyboardMarkup([[InlineKeyboardButton("🇦🇺 ᴇɴɢ", callback_data="engwlc"),InlineKeyboardButton("🇮🇳 ʜɴᴅ", callback_data="hndwlc"),InlineKeyboardButton("🇸🇦 ᴀʀʙ", callback_data="arbwlc")],[InlineKeyboardButton("📍 ʀᴜʟᴇꜱ 📍", url="http://t.me/DrMasterTGbot?start=regole_-1001397638909")]])) @Client.on_message(filters.command('leave') & filters.user(ADMINS)) diff --git a/plugins/pm_filter.py b/plugins/pm_filter.py index d813c220c..eb07ce06f 100644 --- a/plugins/pm_filter.py +++ b/plugins/pm_filter.py @@ -44,106 +44,7 @@ async def give_filter(client, message): k = await manual_filters(client, message) if k == False: await auto_filter(client, message) - -@Client.on_callback_query(filters.regex('rename')) -async def rename(bot,update): - user_id = update.message.chat.id - date = update.message.date - await update.message.delete() - await update.message.reply_text("»»——— 𝙋𝙡𝙚𝙖𝙨𝙚 𝙚𝙣𝙩𝙚𝙧 𝙣𝙚𝙬 𝙛𝙞𝙡𝙚 𝙣𝙖𝙢𝙚...", - reply_to_message_id=update.message.reply_to_message.id, - reply_markup=ForceReply(True)) -# Born to make history @LazyDeveloper ! -@Client.on_callback_query(filters.regex("upload")) -async def doc(bot, update): - type = update.data.split("_")[1] - new_name = update.message.text - new_filename = new_name.split(":-")[1] - file = update.message.reply_to_message - file_path = f"downloads/{new_filename}" - ms = await update.message.edit("\n༻☬ད 𝘽𝙪𝙞𝙡𝙙𝙞𝙣𝙜 𝙇𝙖𝙯𝙮 𝙈𝙚𝙩𝙖𝘿𝙖𝙩𝙖...") - c_time = time.time() - try: - path = await bot.download_media( - message=file, - progress=progress_for_pyrogram, - progress_args=("**\n ღ♡ ꜰɪʟᴇ ᴜɴᴅᴇʀ ᴄᴏɴꜱᴛʀᴜᴄᴛɪᴏɴ... ♡♪**", ms, c_time)) - except Exception as e: - await ms.edit(e) - return - splitpath = path.split("/downloads/") - dow_file_name = splitpath[1] - old_file_name =f"downloads/{dow_file_name}" - os.rename(old_file_name, file_path) - duration = 0 - try: - metadata = extractMetadata(createParser(file_path)) - if metadata.has("duration"): - duration = metadata.get('duration').seconds - except: - pass - user_id = int(update.message.chat.id) - ph_path = None - media = getattr(file, file.media.value) - filesize = humanize.naturalsize(media.file_size) - c_caption = await db.get_caption(update.message.chat.id) - c_thumb = await db.get_thumbnail(update.message.chat.id) - if c_caption: - try: - caption = c_caption.format(filename=new_filename, filesize=humanize.naturalsize(media.file_size), duration=convert(duration)) - except Exception as e: - await ms.edit(text=f"Your caption Error unexpected keyword ●> ({e})") - return - else: - caption = f"**{new_filename}** \n\n⚡️Data costs: `{filesize}`" - if (media.thumbs or c_thumb): - if c_thumb: - ph_path = await bot.download_media(c_thumb) - else: - ph_path = await bot.download_media(media.thumbs[0].file_id) - Image.open(ph_path).convert("RGB").save(ph_path) - img = Image.open(ph_path) - img.resize((320, 320)) - img.save(ph_path, "JPEG") - await ms.edit("三 𝘗𝘳𝘦𝘱𝘢𝘳𝘪𝘯𝘨 𝘵𝘰 𝘳𝘦𝘤𝘦𝘪𝘷𝘦 𝘓𝘢𝘻𝘺 𝘧𝘪𝘭𝘦...︻デ═一") - c_time = time.time() - try: - if type == "document": - await bot.send_document( - update.message.chat.id, - document=file_path, - thumb=ph_path, - caption=caption, - progress=progress_for_pyrogram, - progress_args=( "**⎝⎝✧ ʀᴇᴄɪᴇᴠɪɴɢ ꜰɪʟᴇ ꜰʀᴏᴍ ʟᴀᴢʏ ꜱᴇʀᴠᴇʀ ✧⎠⎠**", ms, c_time)) - elif type == "video": - await bot.send_video( - update.message.chat.id, - video=file_path, - caption=caption, - thumb=ph_path, - duration=duration, - progress=progress_for_pyrogram, - progress_args=( "**⎝⎝✧ ʀᴇᴄɪᴇᴠɪɴɢ ꜰɪʟᴇ ꜰʀᴏᴍ ʟᴀᴢʏ ꜱᴇʀᴠᴇʀ ✧⎠⎠**", ms, c_time)) - elif type == "audio": - await bot.send_audio( - update.message.chat.id, - audio=file_path, - caption=caption, - thumb=ph_path, - duration=duration, - progress=progress_for_pyrogram, - progress_args=( "**⎝⎝✧ ʀᴇᴄɪᴇᴠɪɴɢ ꜰɪʟᴇ ꜰʀᴏᴍ ʟᴀᴢʏ ꜱᴇʀᴠᴇʀ ✧⎠⎠**", ms, c_time )) - except Exception as e: - await ms.edit(f" Erro {e}") - os.remove(file_path) - if ph_path: - os.remove(ph_path) - return - await ms.delete() - os.remove(file_path) - if ph_path: - os.remove(ph_path) + # # Born to make history @LazyDeveloper ! @Client.on_callback_query(filters.regex(r"^next")) @@ -263,10 +164,13 @@ async def next_page(bot, query): ] for file in files ] + btn.insert(0, [ - InlineKeyboardButton(text="⚡ʜᴏᴡ ᴛᴏ ᴅᴏᴡɴʟᴏᴀᴅ⚡", url='https://telegram.me/LazyDeveloper') - ] + InlineKeyboardButton(f'ᴍᴏᴠɪᴇ', 'moviee'), + InlineKeyboardButton(f'ɪɴғᴏ', 'infoo'), + InlineKeyboardButton(f'sᴇʀɪᴇs', 'seriess') + ] ) if 0 < offset <= 10: @@ -277,20 +181,21 @@ async def next_page(bot, query): off_set = offset - 10 if n_offset == 0: btn.append( - [InlineKeyboardButton("⏪ BACK", callback_data=f"next_{req}_{key}_{off_set}"), - InlineKeyboardButton(f"📃 Pages {math.ceil(int(offset) / 10) + 1} / {math.ceil(total / 10)}", - callback_data="pages")] + [InlineKeyboardButton("ʙᴀᴄᴋ", callback_data=f"next_{req}_{key}_{off_set}"), + InlineKeyboardButton(f"ᴘᴀɢᴇs {math.ceil(int(offset) / 10) + 1} / {math.ceil(total / 10)}", callback_data="pages"), + InlineKeyboardButton("ᴅᴇʟᴇᴛᴇ", callback_data="close_data")] ) elif off_set is None: btn.append( - [InlineKeyboardButton(f"🗓 {math.ceil(int(offset) / 10) + 1} / {math.ceil(total / 10)}", callback_data="pages"), - InlineKeyboardButton("NEXT ⏩", callback_data=f"next_{req}_{key}_{n_offset}")]) + [InlineKeyboardButton("ᴩᴀɢᴇꜱ", callback_data="pages"), + InlineKeyboardButton(f"{math.ceil(int(offset) / 10) + 1} / {math.ceil(total / 10)}", callback_data="pages"), + InlineKeyboardButton("ɴᴇxᴛ", callback_data=f"next_{req}_{key}_{n_offset}")]) else: btn.append( [ - InlineKeyboardButton("⏪ BACK", callback_data=f"next_{req}_{key}_{off_set}"), - InlineKeyboardButton(f"🗓 {math.ceil(int(offset) / 10) + 1} / {math.ceil(total / 10)}", callback_data="pages"), - InlineKeyboardButton("NEXT ⏩", callback_data=f"next_{req}_{key}_{n_offset}") + 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("ɴᴇxᴛ", callback_data=f"next_{req}_{key}_{n_offset}") ], ) try: @@ -560,7 +465,7 @@ async def cb_handler(client: Client, query: CallbackQuery): 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("Mere saamne jyada smart nhi banne ka sona 😒", show_alert=True) + await query.answer("yᴏᴜʀ ꜱᴍᴀʀᴛɴᴇꜱꜱ ɪꜱ ɢᴏᴏᴅ ʙᴜᴛ ᴅᴏɴ'ᴛ ꜱʜᴏᴡ ᴏᴠᴇʀ ꜱᴍᴀʀᴛ 😒", show_alert=True) return ident, file_id = query.data.split("#") files_ = await get_file_details(file_id) @@ -581,6 +486,7 @@ async def cb_handler(client: Client, query: CallbackQuery): if f_caption is None: f_caption = f"{title}" await query.answer() + await query.message.delete() await client.send_cached_media( chat_id=query.from_user.id, file_id=file_id, @@ -590,24 +496,39 @@ async def cb_handler(client: Client, query: CallbackQuery): elif query.data == "pages": await query.answer() elif query.data == "start": - buttons = [[ - InlineKeyboardButton('➕↖️ Add Me To Your Groups ↗️➕', url=f'http://t.me/{temp.U_NAME}?startgroup=true') - ], [ - InlineKeyboardButton('🧞‍♀️ Search 🧐', switch_inline_query_current_chat=''), - InlineKeyboardButton('🔔 Updates 🤖', url='https://t.me/LazyDeveloper') - ], [ - InlineKeyboardButton('🙆🏻 Help 🦾', callback_data='help'), - InlineKeyboardButton('♥️ About ♥️', callback_data='about') - ],[ - InlineKeyboardButton('Watch Tutorial', url='https://youtube.com/LazyDeveloper') - ]] + buttons = [ + [InlineKeyboardButton('⚡️ᴄʟɪᴄᴋ ʜᴇʀᴇ ꜰᴏʀ ᴍᴏʀᴇ ʙᴜᴛᴛᴏɴꜱ⚡️', callback_data="about")] + ] reply_markup = InlineKeyboardMarkup(buttons) 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('♥️ Thank You LazyDeveloper ♥️') + elif query.data == "neosub": + await query.answer("അഥവാ ഗ്രൂപ്പ്‌ കോപ്പിറൈറ് കിട്ടി പോയാൽ.. പുതിയ ഗ്രൂപ്പ്‌ തുടങ്ങുമ്പോൾ ഇപ്പോൾ ജോയിൻ ആകുന്ന ചാനൽ വഴി ആയിരിക്കും അറിയിക്കുന്നത് 🤥", show_alert=True) + + elif query.data == "moviee": + await query.answer("⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯\nᴍᴏᴠɪᴇ ʀᴇǫᴜᴇꜱᴛ ꜰᴏʀᴍᴀᴛ\n⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯\n\nɢᴏ ᴛᴏ ɢᴏᴏɢʟᴇ ➠ ᴛʏᴘᴇ ᴍᴏᴠɪᴇ ɴᴀᴍᴇ ➠ ᴄᴏᴘʏ ᴄᴏʀʀᴇᴄᴛ ɴᴀᴍᴇ ➠ ᴘᴀꜱᴛᴇ ᴛʜɪꜱ ɢʀᴏᴜᴘ\n\nᴇxᴀᴍᴘʟᴇ : ᴋɢꜰ ᴄʜᴀᴘᴛᴇʀ 2 2022\n\n🚯 ᴅᴏɴᴛ ᴜꜱᴇ ➠ ':(!,./)\n\n© ᴍᴏᴠɪᴇʙᴏꜱꜱ", show_alert=True) + + elif query.data == "infoo": + await query.answer("⚠ ɪɴꜰᴏʀᴍᴀᴛɪᴏɴ ⚠\n\nᴀꜰᴛᴇʀ 30 ᴍɪɴᴜᴛᴇᴇꜱ ᴛʜɪꜱ ᴍᴇꜱꜱᴀɢᴇ ᴡɪʟʟ ʙᴇ ᴀᴜᴛᴏᴍᴀᴛɪᴄᴀʟʟʏ ᴅᴇʟᴇᴛᴇᴅ\n\nɪꜰ ʏᴏᴜ ᴅᴏ ɴᴏᴛ ꜱᴇᴇ ᴛʜᴇ ʀᴇǫᴜᴇsᴛᴇᴅ ᴍᴏᴠɪᴇ / sᴇʀɪᴇs ꜰɪʟᴇ, ʟᴏᴏᴋ ᴀᴛ ᴛʜᴇ ɴᴇxᴛ ᴘᴀɢᴇ\n\n© ᴍᴏᴠɪᴇʙᴏꜱꜱ", show_alert=True) + + elif query.data == "seriess": + await query.answer("⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯\nꜱᴇʀɪᴇꜱ ʀᴇǫᴜᴇꜱᴛ ꜰᴏʀᴍᴀᴛ\n⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯\n\nɢᴏ ᴛᴏ ɢᴏᴏɢʟᴇ ➠ ᴛʏᴘᴇ ᴍᴏᴠɪᴇ ɴᴀᴍᴇ ➠ ᴄᴏᴘʏ ᴄᴏʀʀᴇᴄᴛ ɴᴀᴍᴇ ➠ ᴘᴀꜱᴛᴇ ᴛʜɪꜱ ɢʀᴏᴜᴘ\n\nᴇxᴀᴍᴘʟᴇ : ʟᴏᴋɪ S01 E01\n\n🚯 ᴅᴏɴᴛ ᴜꜱᴇ ➠ ':(!,./)\n\n© ᴍᴏᴠɪᴇʙᴏꜱꜱ", show_alert=True) + + elif query.data == "ownn": + await query.answer("⍟───[ ᴏᴡɴᴇʀ ᴅᴇᴛᴀɪʟꜱ ]───⍟\n\n• ꜰᴜʟʟ ɴᴀᴍᴇ : ꜱʜᴀʜɪᴅ²ᵒ\n• ᴜꜱᴇʀɴᴀᴍᴇ : GT_ben\n\n⍟───[ ϟ ϟ ϟ ϟ ]───⍟", show_alert=True) + + elif query.data == "engwlc": + await query.answer("ʏᴏᴜ ᴄᴀɴ ʀᴇǫᴜᴇsᴛ ᴀɴʏ ᴍᴏᴠɪᴇ ʜᴇʀᴇ. ʏᴏᴜ ᴡɪʟʟ ɢᴇᴛ ᴛʜᴇ ᴍᴏᴠɪᴇ ᴏɴʟʏ ɪғ ɪᴛ ɪs sᴘᴇʟʟᴇᴅ ᴄᴜʀʀᴇᴄᴛʟʏ\n\nᴅᴏɴ'ᴛ ᴜsᴇ 🚯 ':(!,./)\n\nᴍᴏᴠɪᴇ ʀᴇǫᴜᴇsᴛ ᴇxᴀᴍᴘʟᴇ\n\nᴠᴀʀɪsᴜ 2022\n\nsᴇʀɪᴇs ʀᴇǫᴜᴇsᴛ ᴇxᴀᴍᴘʟᴇ\n\nᴍᴏɴᴇʏ ʜᴇɪsᴛ S01E01", show_alert=True) + + elif query.data == "hndwlc": + await query.answer("आप यहां किसी भी फिल्म के लिए अनुरोध कर सकते हैं सही स्पेलिंग होने पर ही आपको मूवी मिलेगी\n\n':(!,./) 🚯 का प्रयोग न करें\n\nजिस तरह से फिल्म पूछती है\n\nVarisu 2022\n\nश्रृंखला क्वेरी विधि\n\nMoney hiest S01E01", show_alert=True) + + elif query.data == "arbwlc": + await query.answer("يمكنك طلب أي فيلم هنا. ستحصل على الفيلم فقط إذا تمت تهجئته بشكل صحيح\n\n':(!,./) لا تستخدم 🚯\n\nالطريقة التي يطلبها الفيلم\n\nvarisu 2022\n\nطريقة الاستعلام عن السلسلة\n\nMoney heist S01E01", show_alert=True) + elif query.data == "help": buttons = [[ InlineKeyboardButton('Manual Filter', callback_data='manuelfilter'), @@ -627,11 +548,13 @@ async def cb_handler(client: Client, query: CallbackQuery): ) elif query.data == "about": buttons = [[ - InlineKeyboardButton('🔔 Updates 🤖', url='https://t.me/LazyDeveloper'), - InlineKeyboardButton('♥️ Source', callback_data='source') - ], [ - InlineKeyboardButton('🏠 Home', callback_data='start'), - InlineKeyboardButton('🔐 Close', callback_data='close_data') + InlineKeyboardButton('ᴄʟɪᴄᴋ ᴛᴏ ᴄʟᴏsᴇ ᴛʜɪs ʙᴜᴛᴛᴏɴs', callback_data='start'), + ],[ + InlineKeyboardButton('👑 ᴏᴡɴᴇʀ', callback_data="ownn"), + InlineKeyboardButton('👥 ɢʀᴏᴜᴘ', url='https://t.me/+9CKK8DlZlgUxOTE9') + ],[ + InlineKeyboardButton('🎬 ᴄʜᴀɴɴᴇʟ', url='https://t.me/MovieBossTG'), + InlineKeyboardButton('🔐 ᴄʟᴏsᴇ', callback_data='close_data') ]] reply_markup = InlineKeyboardMarkup(buttons) await query.message.edit_text( @@ -686,11 +609,11 @@ async def cb_handler(client: Client, query: CallbackQuery): # Send message to user try: btn = [[ - InlineKeyboardButton(text=f"🔍 Search Here 🔎", url=f"https://telegram.me/{MOVIE_GROUP_USERNAME}") + InlineKeyboardButton(text=f"🔍 ꜱᴇᴀʀᴄʜ ʜᴇʀᴇ 🔎", url=f"https://telegram.me/+9CKK8DlZlgUxOTE9") ],[ - InlineKeyboardButton(text=f"🐞 REPORT ISSUE 🐞", url=f"https://telegram.me/LazyDeveloperSupport") + InlineKeyboardButton(text=f"🐞 ʀᴇᴩᴏʀᴛ ɪꜱꜱᴜᴇꜱ 🐞", url=f"https://telegram.me/GT_ben") ],[ - InlineKeyboardButton(text=f"⚡️ Learn Bot Making 🦋", url=f"https://youtube.com/@LazyDeveloperr") + InlineKeyboardButton(text=f"⚡️ ʙᴀᴄᴋᴜᴩ ᴄʜᴀɴɴᴇʟ ⚡️", url=f"https://telegram.me/MovieBossTG") ]] btn_lzdv = [ @@ -699,7 +622,7 @@ async def cb_handler(client: Client, query: CallbackQuery): ]] reply_markup_lzdv = InlineKeyboardMarkup(btn_lzdv) reply_markup = InlineKeyboardMarkup(btn) - await client.send_message(int(user_id), f"😒 oops! sona, Your requested content named `{movie}` is not available right now, we are really trying our best to serve you this cotent,can you please provide us some more details related to your query {movie}, \nSend details to Admin : **Send here...**\n\n❤ Thank You for the contribution", reply_markup=reply_markup) + await client.send_message(int(user_id), f"**ɴᴏᴛ ʀᴇʟᴇᴀꜱᴇ ɪɴ ᴏᴛᴛ❗️**\n\nനിങ്ങൾ ഇപ്പോൾ ചോദിച്ച `{movie}` സിനിമ OTT യിൽ റിലീസ് ആയിട്ടില്ല. അതുകൊണ്ടാണ് നിങ്ങൾക് സിനിമ ലഭിക്കാത്തത്.OTT യിൽ റിലീസ് ആയ സിനിമ മാത്രം ചോദിക്കാൻ ശ്രമിക്കുക\n\nᴛʜᴇ `{movie}` ᴍᴏᴠɪᴇ yᴏᴜ ᴊᴜꜱᴛ ᴀꜱᴋᴇᴅ ᴀʙᴏᴜᴛ ʜᴀꜱ ɴᴏᴛ ʙᴇᴇɴ ʀᴇʟᴇᴀꜱᴇᴅ ᴏɴ ᴏᴛᴛ. ᴛʜᴀᴛ'ꜱ ᴡʜy yᴏᴜ ᴅᴏɴ'ᴛ ɢᴇᴛ ᴛʜᴀ ᴍᴏᴠɪᴇ.ᴛʀy ᴛᴏ ᴀꜱᴋ ꜰᴏʀ ᴏᴛᴛ ʀᴇʟᴇᴀꜱᴇᴅ ᴍᴏᴠɪᴇꜱ ᴏɴʟy\n\nᴛʜᴀɴᴋ yᴏᴜ💝", reply_markup=reply_markup) await query.edit_message_text(text=f"- __**User notified successfully sweetie...✅**__\n\n⏳**Status** : Not Available 😒.\n🪪**UserID** : `{user_id}`\n🎞**Content** : `{movie}`\n\n\n🦋",reply_markup=reply_markup_lzdv) # Delete callback query message await query.answer() @@ -714,11 +637,11 @@ async def cb_handler(client: Client, query: CallbackQuery): # Send message to user try: btn = [[ - InlineKeyboardButton(text=f"🔍 Search Here 🔎", url=f"https://telegram.me/{MOVIE_GROUP_USERNAME}") + InlineKeyboardButton(text=f"🔍 ꜱᴇᴀʀᴄʜ ʜᴇʀᴇ 🔎", url=f"https://telegram.me/+9CKK8DlZlgUxOTE9") ],[ - InlineKeyboardButton(text=f"🐞 REPORT ISSUE 🐞", url=f"https://telegram.me/LazyDeveloperSupport") + InlineKeyboardButton(text=f"🐞 ʀᴇᴩᴏʀᴛ ɪꜱꜱᴜᴇꜱ 🐞", url=f"https://telegram.me/GT_ben") ],[ - InlineKeyboardButton(text=f"⚡️ Learn Bot Making 🦋", url=f"https://youtube.com/@LazyDeveloperr") + InlineKeyboardButton(text=f"⚡️ ʙᴀᴄᴋᴜᴩ ᴄʜᴀɴɴᴇʟ ⚡️", url=f"https://telegram.me/MovieBossTG") ]] btn_lzdv = [ [ @@ -726,7 +649,7 @@ async def cb_handler(client: Client, query: CallbackQuery): ]] reply_markup_lzdv = InlineKeyboardMarkup(btn_lzdv) reply_markup = InlineKeyboardMarkup(btn) - await client.send_message(int(user_id), f"🛋 Hey sona, Your requested content named `{movie}` is already available in our database! You can easily get this movie by searching it's correct name in our official group...\nSend details to Admin : \n\n❤ Thank You for the contribution", reply_markup=reply_markup) + await client.send_message(int(user_id), f"🛋 Hey dude, Your requested content named `{movie}` is already available in our database! You can easily get this movie by searching it's correct name in our official group...\nSend details to Admin : \n\n❤ Thank You for the contribution", reply_markup=reply_markup) await query.edit_message_text(text=f"- __**User notified successfully sweetie...✅**__\n\n⏳**Status** : Already Uploaded ⚡.\n🪪**UserID** : `{user_id}`\n🎞**Content** : `{movie}`\n\n\n🦋",reply_markup=reply_markup_lzdv) # Delete callback query message await query.answer() @@ -740,11 +663,11 @@ async def cb_handler(client: Client, query: CallbackQuery): # Send message to user try: btn = [[ - InlineKeyboardButton(text=f"🔍 Search Here 🔎", url=f"https://telegram.me/{MOVIE_GROUP_USERNAME}") + InlineKeyboardButton(text=f"🔍 ꜱᴇᴀʀᴄʜ ʜᴇʀᴇ 🔎", url=f"https://telegram.me/+9CKK8DlZlgUxOTE9") ],[ - InlineKeyboardButton(text=f"🐞 REPORT ISSUE 🐞", url=f"https://telegram.me/LazyDeveloperSupport") + InlineKeyboardButton(text=f"🐞 ʀᴇᴩᴏʀᴛ ɪꜱꜱᴜᴇꜱ 🐞", url=f"https://telegram.me/GT_ben") ],[ - InlineKeyboardButton(text=f"⚡️ Learn Bot Making 🦋", url=f"https://youtube.com/@LazyDeveloperr") + InlineKeyboardButton(text=f"⚡️ ʙᴀᴄᴋᴜᴩ ᴄʜᴀɴɴᴇʟ ⚡️", url=f"https://telegram.me/MovieBossTG") ]] btn_lzdv = [ @@ -753,7 +676,7 @@ async def cb_handler(client: Client, query: CallbackQuery): ]] reply_markup_lzdv = InlineKeyboardMarkup(btn_lzdv) reply_markup = InlineKeyboardMarkup(btn) - await client.send_message(int(user_id), f"✅ Hey sona, Your requested content named `{movie}` is now available in our database! You can easily get this movie by searching it's correct name in our official group...\n\n❤ Thank You for the contribution", reply_markup=reply_markup) + await client.send_message(int(user_id), f"✅ Hey dude, Your requested content named `{movie}` is now available in our database! You can easily get this movie by searching it's correct name in our official group...\n\n❤ Thank You for the contribution", reply_markup=reply_markup) await query.edit_message_text(text=f"- __**User notified successfully sweetie...✅**__\n\n⏳**Status** : Upload done ✅.\n🪪**UserID** : `{user_id}`\n🎞**Content** : `{movie}`\n\n\n🦋", reply_markup=reply_markup_lzdv) # Delete callback query message await query.answer() @@ -767,11 +690,11 @@ async def cb_handler(client: Client, query: CallbackQuery): # Send message to user try: btn = [[ - InlineKeyboardButton(text=f"🔍 Search Here 🔎", url=f"https://telegram.me/{MOVIE_GROUP_USERNAME}") + InlineKeyboardButton(text=f"🔍 ꜱᴇᴀʀᴄʜ ʜᴇʀᴇ 🔎", url=f"https://telegram.me/+9CKK8DlZlgUxOTE9") ],[ - InlineKeyboardButton(text=f"🐞 REPORT ISSUE 🐞", url=f"https://telegram.me/LazyDeveloperSupport") + InlineKeyboardButton(text=f"🐞 ʀᴇᴩᴏʀᴛ ɪꜱꜱᴜᴇꜱ 🐞", url=f"https://telegram.me/GT_ben") ],[ - InlineKeyboardButton(text=f"⚡️ Learn Bot Making 🦋", url=f"https://youtube.com/@LazyDeveloperr") + InlineKeyboardButton(text=f"⚡️ ʙᴀᴄᴋᴜᴩ ᴄʜᴀɴɴᴇʟ ⚡️", url=f"https://telegram.me/MovieBossTG") ]] btn_lzdv = [ [ @@ -793,11 +716,11 @@ async def cb_handler(client: Client, query: CallbackQuery): # Send message to user try: btn = [[ - InlineKeyboardButton(text=f"🔍 Search Here 🔎", url=f"https://telegram.me/{MOVIE_GROUP_USERNAME}") + InlineKeyboardButton(text=f"🔍 ꜱᴇᴀʀᴄʜ ᴀɢᴀɪɴ 🔎", url=f"https://telegram.me/+9CKK8DlZlgUxOTE9") ],[ - InlineKeyboardButton(text=f"🐞 REPORT ISSUE 🐞", url=f"https://telegram.me/LazyDeveloperSupport") + InlineKeyboardButton(text=f"🐞 ʀᴇᴩᴏʀᴛ ɪꜱꜱᴜᴇꜱ 🐞", url=f"https://telegram.me/GT_ben") ],[ - InlineKeyboardButton(text=f"⚡️ Learn Bot Making 🦋", url=f"https://youtube.com/@LazyDeveloperr") + InlineKeyboardButton(text=f"⚡️ ʙᴀᴄᴋᴜᴩ ᴄʜᴀɴɴᴇʟ ⚡️", url=f"https://telegram.me/MovieBossTG") ]] btn_lzdv = [ @@ -806,7 +729,7 @@ async def cb_handler(client: Client, query: CallbackQuery): ]] reply_markup_lzdv = InlineKeyboardMarkup(btn_lzdv) reply_markup = InlineKeyboardMarkup(btn) - await client.send_message(int(user_id), f"🌍 Your spelling matters.\nThe requested content `{movie}` is available in our database, You were unable to get it because of your spelling mistake.🧐 Please make sure you've spelled correctly while searching content in group...\n\n❤Thank u for supporting us.", reply_markup=reply_markup) + await client.send_message(int(user_id), f"⚠️**ꜱᴩᴇʟʟɪɴɢ ᴇʀʀᴏʀ**\n\nനിങ്ങൾ ഇപ്പോൾ ചോദിച്ച **`{movie}`** സിനിമ ഗ്രൂപ്പിൽ ഉണ്ട്. പക്ഷെ നിങ്ങൾ SPELLING തെറ്റി ആണ് ചോദിച്ചത്. Spelling ശെരിയാക്കി വീണ്ടും ചോദിക്കുക\n\nᴛʜᴇ **`{movie}`** ᴍᴏᴠɪᴇ yᴏᴜ ᴊᴜꜱᴛ ᴀꜱᴋᴇᴅ ᴀʙᴏᴜᴛ ɪꜱ ɪɴ ᴛʜᴇ ɢʀᴏᴜᴩ. ʙᴜᴛ yᴏᴜ ꜱᴩᴇʟʟᴇᴅ ɪᴛ ᴡʀᴏɴɢ. ᴄᴏʀʀᴇᴄᴛ ᴛʜᴇ ꜱᴩᴇʟʟɪɴɢ ᴀɴᴅ ᴀꜱᴋ ᴀɢᴀɪɴ", reply_markup=reply_markup) await query.edit_message_text(text=f"- __**User notified successfully sweetie...✅**__\n\n⏳**Status** : Spelling error 🖊.\n🪪**UserID** : `{user_id}`\n🎞**Content** : `{movie}`\n\n\n🦋",reply_markup=reply_markup_lzdv) # Delete callback query message await query.answer() @@ -864,45 +787,10 @@ async def cb_handler(client: Client, query: CallbackQuery): reply_markup=reply_markup, parse_mode=enums.ParseMode.HTML ) - # elif query.data == "getlazythumbnail": - # buttons = [ - # [ - # InlineKeyboardButton("D͢o͢n͢a͢t͢e͢ L͢a͢z͢y͢D͢e͢v͢", callback_data="thdonatelazydev"), - # ], - # [ InlineKeyboardButton("<- G̳O̳ ̳B̳A̳C̳K̳ ⨳", callback_data="lazyhome") ] - # ] - # reply_markup = InlineKeyboardMarkup(buttons) - # await query.message.edit_text( - # text=script.LZTHMB_TEXT.format(query.from_user.mention), - # reply_markup=reply_markup, - # parse_mode=enums.ParseMode.HTML - # ) - # elif query.data == "thdonatelazydev": - # buttons = [ - # [ InlineKeyboardButton("<- G̳O̳ ̳B̳A̳C̳K̳ ⨳", callback_data="getlazythumbnail") ] - # ] - # reply_markup = InlineKeyboardMarkup(buttons) - # await query.message.edit_text( - # text=script.DNT_TEXT.format(query.from_user.mention), - # reply_markup=reply_markup, - # parse_mode=enums.ParseMode.HTML - # ) - # elif query.data == "getlazylink": - # buttons = [ - # [ - # InlineKeyboardButton("D͢o͢n͢a͢t͢e͢ L͢a͢z͢y͢D͢e͢v͢", callback_data="linkdonatelazydev"), - # ], - # [ InlineKeyboardButton("<- G̳O̳ ̳B̳A̳C̳K̳ ⨳", callback_data="lazyhome") ] - # ] - # reply_markup = InlineKeyboardMarkup(buttons) - # await query.message.edit_text( - # text=script.LZLINK_TEXT.format(query.from_user.mention), - # reply_markup=reply_markup, - # parse_mode=enums.ParseMode.HTML - # ) + elif query.data == "donatelazydev": buttons = [ - [ InlineKeyboardButton("⨳ Close ⨳", callback_data="close_data") ] + [ InlineKeyboardButton("ᴄʟᴏꜱᴇ", callback_data="close_data") ] ] reply_markup = InlineKeyboardMarkup(buttons) await query.message.edit_text( @@ -910,61 +798,17 @@ async def cb_handler(client: Client, query: CallbackQuery): reply_markup=reply_markup, parse_mode=enums.ParseMode.HTML ) - elif query.data == "lazyhome": - text = f"""\n⨳ *•.¸♡ L҉ΛZ𝐲 MⓄd𝓔 ♡¸.•* ⨳\n\n**Please tell, what should i do with this file.?**\n""" - buttons = [[ InlineKeyboardButton("📝✧✧ S𝚝ar𝚝 re𝚗aᗰi𝚗g ✧✧📝", callback_data="rename") ], - [ InlineKeyboardButton("⨳ C L Ф S Ξ ⨳", callback_data="cancel") ]] - reply_markup = InlineKeyboardMarkup(buttons) - await query.message.edit_text( - text=text, - reply_markup=reply_markup, - parse_mode=enums.ParseMode.HTML - ) + elif query.data == "requireauth": buttons = [ - [ InlineKeyboardButton("⨳ C L Ф S Ξ ⨳", callback_data="cancel") ]] + [ InlineKeyboardButton("ᴄʟᴏꜱᴇ", callback_data="cancel") ]] reply_markup = InlineKeyboardMarkup(buttons) await query.message.edit_text( text=script.REQ_AUTH_TEXT.format(query.from_user.mention), reply_markup=reply_markup, parse_mode=enums.ParseMode.HTML ) - # elif query.data == "reqauthgetlazythumbnail": - # buttons = [ - # [ - # InlineKeyboardButton("D͢o͢n͢a͢t͢e͢ L͢a͢z͢y͢D͢e͢v͢", callback_data="thdonatelazydev"), - # ], - # [ InlineKeyboardButton("<- G̳O̳ ̳B̳A̳C̳K̳ ⨳", callback_data="reqauthlazyhome") ] - # ] - # reply_markup = InlineKeyboardMarkup(buttons) - # await query.message.edit_text( - # text=script.LZTHMB_TEXT.format(query.from_user.mention), - # reply_markup=reply_markup, - # parse_mode=enums.ParseMode.HTML - # ) - # elif query.data == "reqauthlazyhome": - # text = f"""\n⨳ *•.¸♡ L҉ΛZ𝐲 MⓄd𝓔 ♡¸.•* ⨳\n\n**Please tell, what should i do with this file.?**\n""" - # buttons = [[ InlineKeyboardButton("📝✧✧ S𝚝ar𝚝 re𝚗aᗰi𝚗g ✧✧📝", callback_data="requireauth") ], - # [ InlineKeyboardButton("⨳ C L Ф S Ξ ⨳", callback_data="cancel") ]] - # reply_markup = InlineKeyboardMarkup(buttons) - # await query.message.edit_text( - # text=text, - # reply_markup=reply_markup, - # parse_mode=enums.ParseMode.HTML - # ) - # elif query.data == "reqauthgetlazylink": - # buttons = [ - # [ - # InlineKeyboardButton("D͢o͢n͢a͢t͢e͢ L͢a͢z͢y͢D͢e͢v͢", callback_data="linkdonatelazydev"), - # ], - # [ InlineKeyboardButton("<- G̳O̳ ̳B̳A̳C̳K̳ ⨳", callback_data="reqauthlazyhome") ] - # ] - # reply_markup = InlineKeyboardMarkup(buttons) - # await query.message.edit_text( - # text=script.LZLINK_TEXT.format(query.from_user.mention), - # reply_markup=reply_markup, - # parse_mode=enums.ParseMode.HTML - # ) + elif query.data == "exit": await query.answer("Sorry Darling! You can't make any changes...\n\nOnly my Admin can change this setting...", show_alert = True) return @@ -982,7 +826,7 @@ async def cb_handler(client: Client, query: CallbackQuery): # if extracted_line: # # Send the extracted line to the other group chat # buttons = [ - # [ InlineKeyboardButton("⨳ ok ⨳", callback_data="cancel") ] + # [ InlineKeyboardButton("ᴏᴋ", callback_data="cancel") ] # ] # reply_markup = InlineKeyboardMarkup(buttons) # await client.send_message(MOVIE_GROUP_ID, text=extracted_line.group(1)) @@ -1122,8 +966,8 @@ async def auto_filter(client, msg, spoll=False): [InlineKeyboardButton(text=f"😒Not Available", callback_data=f"notify_user_not_avail:{user_id}:{requested_movie}"),InlineKeyboardButton("❌Reject Req", callback_data=f"notify_user_req_rejected:{user_id}:{requested_movie}")], ])) - l = await message.reply_text(text=f"△ 𝙷𝚎𝚢 𝚜𝚘𝚗𝚊 `{message.from_user.first_name}` 😎,\n\nʏᴏᴜʀ ʀᴇQᴜᴇꜱᴛ ʜᴀꜱ ʙᴇᴇɴ ꜱᴇɴᴛ ᴛᴏ ᴏᴜʀ **ᴀᴅᴍɪɴ'ꜱ ᴅᴀꜱʜʙᴏᴀʀᴅ** !\nᴘʟᴇᴀꜱᴇ ᴋᴇᴇᴘ ꜱᴏᴍᴇ ᴘᴀᴛɪᴇɴᴄᴇ !\nᴛʜᴇʏ ᴡɪʟʟ ᴜᴘʟᴏᴀᴅ ɪᴛ ᴀꜱ ꜱᴏᴏɴ ᴀꜱ ᴘᴏꜱꜱɪʙʟᴇ.\n\n➟ 📝𝘾𝙤𝙣𝙩𝙚𝙣𝙩 𝙣𝙖𝙢𝙚 : `{search}`\n➟ 👮𝙍𝙚𝙦𝙪𝙚𝙨𝙩𝙚𝙙 𝘽𝙮 : `{message.from_user.first_name}`\n\n༺ @{MAIN_CHANNEL_USRNM} ༻\n\n🦋・‥☆𝘼𝘿𝙈𝙞𝙉 𝙨𝙪𝙥𝙥𝙤𝙧𝙩☆‥・🦋\n╰┈➤・☆ @{ADMIN_USRNM}\n╰┈➤・☆ @LazyDeveloperr", - reply_markup=InlineKeyboardMarkup([[InlineKeyboardButton("━ • │▌║ ᗩᗪᗪ ʍɛ 2 ᑌᖇ Ǥᖇᗝᑌᑭ ║▌│ • ━", url=f'http://t.me/{temp.U_NAME}?startgroup=true')],[InlineKeyboardButton("✪ Dev Ch- ✪", url=f"https://t.me/{DEV_CHANNEL_USRNM}"), InlineKeyboardButton("✪ YT ✪", url=f"https://youtube.com/@{LAZY_YT_HANDLE}"), InlineKeyboardButton("✪ Main Ch- ✪", url=f"https://t.me/{MAIN_CHANNEL_USRNM}")],[InlineKeyboardButton("╚»♥️ Thank You ♥️«╝", callback_data="close_data")]])) + l = await message.reply_text(text="Google, yendex എന്ന് എഴുതിയിരിക്കുന്ന ഏതെങ്കിലും ബട്ടണിൽ ക്ലിക്ക് ചെയ്ത് ശരിയായ സിനിമയുടെ പേര് കണ്ടെത്തി ഇവിടെ നൽകുക എന്നാലേ സിനിമ / Tv . Web സീരിയസ് കിട്ടുകയുള്ളു..\n\nഎന്നിട്ടും കിട്ടുന്നില്ല എങ്കിൽ. @admin ശേഷം മൂവി Name & year. Example : @admin kala 2020 ഈ രീതിയിൽ ഗ്രൂപ്പിൽ സെന്റ് ചെയുക. 24 മണിക്കൂറിനുള്ളിൽ അഡ്മിൻ അപ്‌ലോഡ് ചെയ്യും\n\nതിയേറ്ററിൽ റിലീസ് ആയ മൂവിയാണ് ചോദിച്ചതെങ്കിൽ കിട്ടില്ല ott Dvd റിലീസ് ആയാൽ മാത്രമേ കിട്ടുള്ളൂ", + reply_markup=InlineKeyboardMarkup([[InlineKeyboardButton("Gᴏᴏɢʟᴇ", url=f"https://google.com/search?q={search}"), InlineKeyboardButton("Yᴀɴᴅᴇx", url=f"https://yandex.com/search/?text={search}")],[InlineKeyboardButton("Cʟᴏꜱᴇ", callback_data="close_data")]])) await asyncio.sleep(20) await l.delete() if settings["spell_check"]: @@ -1223,7 +1067,9 @@ async def auto_filter(client, msg, spoll=False): btn.insert(0, [ - InlineKeyboardButton(text="⚡ʜᴏᴡ 2 ᴅᴏᴡɴʟᴏᴀᴅ⚡", url='https://telegram.me/LazyDeveloper'), + InlineKeyboardButton(f'ᴍᴏᴠɪᴇ', 'moviee'), + InlineKeyboardButton(f'ɪɴғᴏ', 'infoo'), + InlineKeyboardButton(f'sᴇʀɪᴇs', 'seriess') ] ) if offset != "": @@ -1231,12 +1077,13 @@ async def auto_filter(client, msg, spoll=False): 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="NEXT ⏩", callback_data=f"next_{req}_{key}_{offset}")] + [InlineKeyboardButton("ᴩᴀɢᴇꜱ", callback_data="pages"), + InlineKeyboardButton(text=f"1/{math.ceil(int(total_results) / 10)}", callback_data="pages"), + InlineKeyboardButton(text="ɴᴇxᴛ", callback_data=f"next_{req}_{key}_{offset}")] ) else: btn.append( - [InlineKeyboardButton(text="🗓 1/1", callback_data="pages")] + [InlineKeyboardButton(text="ᴍᴏʀᴇ ᴘᴀɢᴇꜱ ɴᴏᴛᴇ ᴀᴠᴀɪʟᴀʙʟᴇ", callback_data="pages")] ) imdb = await get_poster(search, file=(files[0]).file_name) if settings["imdb"] else None TEMPLATE = settings['template'] @@ -1273,33 +1120,33 @@ async def auto_filter(client, msg, spoll=False): **locals() ) else: - cap = f"Baby, Here is what i found for your query {search}" + cap = f"🎪 ᴛɪᴛɪʟᴇ {search}\n\n┏ 🤴 ᴀsᴋᴇᴅ ʙʏ : {message.from_user.mention}\n┣ ⚡ ᴘᴏᴡᴇʀᴇᴅ ʙʏ : [ʀᴏʟᴇx²ᵒ](https://t.me/Starkv4bot)\n┗ 🍁 ᴄʜᴀɴɴᴇʟ : [ᴍᴏᴠɪᴇ ʙᴏꜱꜱ](https://t.me/MovieBossTG)\n\nᴀꜰᴛᴇʀ 30 ᴍɪɴᴜᴛᴇꜱ ᴛʜɪꜱ ᴍᴇꜱꜱᴀɢᴇ ᴡɪʟʟ ʙᴇ ᴀᴜᴛᴏᴍᴀᴛɪᴄᴀʟʟʏ ᴅᴇʟᴇᴛᴇᴅ\n\n★ ᴘᴏᴡᴇʀᴇᴅ ʙʏ [ᴍᴏᴠɪᴇ ʙᴏꜱꜱ](https://t.me/MovieBossTG)" if imdb and imdb.get('poster'): try: z = await message.reply_photo(photo=imdb.get('poster'), caption=cap[:1024], reply_markup=InlineKeyboardMarkup(btn)) - if SELF_DELETE: + if SELF_DELETE is True: await asyncio.sleep(SELF_DELETE_SECONDS) await z.delete() except (MediaEmpty, PhotoInvalidDimensions, WebpageMediaEmpty): pic = imdb.get('poster') poster = pic.replace('.jpg', "._V1_UX360.jpg") m = await message.reply_photo(photo=poster, caption=cap[:1024], reply_markup=InlineKeyboardMarkup(btn)) - if SELF_DELETE: + if SELF_DELETE is True: await asyncio.sleep(SELF_DELETE_SECONDS) await m.delete() except Exception as e: logger.exception(e) - n = await message.reply_text(cap, reply_markup=InlineKeyboardMarkup(btn)) - if SELF_DELETE: + n = await message.reply_photo(photo='https://telegra.ph/file/1e7053b9292bb4b8ed80a.jpg', caption=cap, reply_markup=InlineKeyboardMarkup(btn)) + if SELF_DELETE is True: await asyncio.sleep(SELF_DELETE_SECONDS) await n.delete() else: - p = await message.reply_text(cap, reply_markup=InlineKeyboardMarkup(btn)) + p = await message.reply_photo(photo='https://telegra.ph/file/1e7053b9292bb4b8ed80a.jpg', caption=cap, reply_markup=InlineKeyboardMarkup(btn)) await asyncio.sleep(250) await p.delete() - if SELF_DELETE: + if SELF_DELETE is True: await asyncio.sleep(SELF_DELETE_SECONDS) await p.delete() if spoll: diff --git a/plugins/rlazyRenamer.py b/plugins/rlazyRenamer.py deleted file mode 100644 index 55161e081..000000000 --- a/plugins/rlazyRenamer.py +++ /dev/null @@ -1,81 +0,0 @@ -""" -Apache License 2.0 -Copyright (c) 2023 @LazyDeveloper -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. -Dev Channel Link : https://t.me/LazyDeveloper -Repo Link : https://github.com/LazyDeveloperr/LazyPrincess -License Link : https://github.com/LazyDeveloperr/LazyPrincess/blob/main/LICENSE -# Removing this is strictly prohibited ! Don't remove this all without the -permission of LazyDeveloperr -""" - # Credit @LazyDeveloper. - # Please Don't remove credit. - # Born to make history @LazyDeveloper ! - - # Thank you LazyDeveloper for helping us in this Journey - -from asyncio import sleep -from pyrogram import Client, filters -from pyrogram.types import InlineKeyboardButton, InlineKeyboardMarkup -from pyrogram.errors import FloodWait -import humanize -from info import ADMINS , FLOOD, LAZY_MODE, LAZY_RENAMERS -import random - - -# Born to make history @LazyDeveloper ! - -@Client.on_message( filters.private & (filters.document | filters.audio | filters.video)) -async def rename_start(client, message): - if (LAZY_MODE==True): - if message.from_user.id in ADMINS : - file = getattr(message, message.media.value) - filesize = humanize.naturalsize(file.file_size) - filename = file.file_name - text = f"""\n⨳ *•.¸♡ L҉ΛZ𝐲 MⓄd𝓔 ♡¸.•* ⨳\n\n**Please tell, what should i do with this file.?**\n\n**🎞File Name** :- `{filename}`\n\n⚙️**File Size** :- `{filesize}`""" - buttons = [[ InlineKeyboardButton("📝✧✧ S𝚝ar𝚝 re𝚗aᗰi𝚗g ✧✧📝", callback_data="rename") ], - [ InlineKeyboardButton("⨳ C L Ф S Ξ ⨳", callback_data="cancel") ]] - await message.reply_text(text=text, reply_to_message_id=message.id, reply_markup=InlineKeyboardMarkup(buttons)) - - elif message.from_user.id in LAZY_RENAMERS : - file = getattr(message, message.media.value) - filesize = humanize.naturalsize(file.file_size) - filename = file.file_name - try: - text = f"""\n⨳ *•.¸♡ L҉ΛZ𝐲 MⓄd𝓔 ♡¸.•* ⨳\n\n**Please tell, what should i do with this file.?**\n\n**🎞File Name** :- `{filename}`\n\n⚙️**File Size** :- `{filesize}`""" - buttons = [[ InlineKeyboardButton("📝✧✧ S𝚝ar𝚝 re𝚗aᗰi𝚗g ✧✧📝", callback_data="rename") ], - [ InlineKeyboardButton("⨳ C L Ф S Ξ ⨳", callback_data="cancel") ]] - await message.reply_text(text=text, reply_to_message_id=message.id, reply_markup=InlineKeyboardMarkup(buttons)) - await sleep(FLOOD) - except FloodWait as e: - await sleep(e.value) - text = f"""\n⨳ *•.¸♡ L҉ΛZ𝐲 MⓄd𝓔 ♡¸.•* ⨳\n\n**Please tell, what should i do with this file.?**\n\n**🎞File Name** :- `{filename}`\n\n⚙️**File Size** :- `{filesize}`""" - buttons = [[ InlineKeyboardButton("📝✧✧ S𝚝ar𝚝 re𝚗aᗰi𝚗g ✧✧📝", callback_data="rename") ], - [ InlineKeyboardButton("⨳ C L Ф S Ξ ⨳", callback_data="cancel") ]] - await message.reply_text(text=text, reply_to_message_id=message.id, reply_markup=InlineKeyboardMarkup(buttons)) - except: - pass - else: - file = getattr(message, message.media.value) - filesize = humanize.naturalsize(file.file_size) - filename = file.file_name - text = f"""\n⨳ *•.¸♡ L҉ΛZ𝐲 MⓄd𝓔 ♡¸.•* ⨳\n\n**Please tell, what should i do with this file.?**\n\n**🎞File Name** :- `{filename}`\n\n⚙️**File Size** :- `{filesize}`""" - buttons = [[ InlineKeyboardButton("📝✧✧ S𝚝ar𝚝 re𝚗aᗰi𝚗g ✧✧📝", callback_data="requireauth") ], - [ InlineKeyboardButton("⨳ C L Ф S Ξ ⨳", callback_data="cancel") ]] - await message.reply_text(text=text, reply_to_message_id=message.id, reply_markup=InlineKeyboardMarkup(buttons)) - else: - return \ No newline at end of file diff --git a/plugins/rlazy_cpption.py b/plugins/rlazy_cpption.py deleted file mode 100644 index 96be348db..000000000 --- a/plugins/rlazy_cpption.py +++ /dev/null @@ -1,32 +0,0 @@ - # Credit @LazyDeveloper. - # Please Don't remove credit. - # Born to make history @LazyDeveloper ! - - # Thank you LazyDeveloper for helping us in this Journey -from pyrogram import Client, filters -from database.users_chats_db import db - -@Client.on_message(filters.private & filters.command('set_caption')) -async def add_caption(client, message): - if len(message.command) == 1: - return await message.reply_text("**Note: Lazy_Mode active ✅\n\n__𝙶𝚒𝚟𝚎 𝚖𝚎 𝚊 𝚌𝚊𝚙𝚝𝚒𝚘𝚗 𝚝𝚘 𝚜𝚎𝚝.__\n\n𝙴𝚡𝚊𝚖𝚙𝚕𝚎:- `/set_caption {filename}\n\n💾 Size: {filesize}\n\n⏰ Duration: {duration}`**") - caption = message.text.split(" ", 1)[1] - await db.set_caption(message.from_user.id, caption=caption) - await message.reply_text("__** 𝚈𝙾𝚄𝚁 𝙲𝙰𝙿𝚃𝙸𝙾𝙽 𝚂𝙰𝚅𝙴𝙳 𝚂𝚄𝙲𝙲𝙴𝚂𝚂𝙵𝚄𝙻𝙻𝚈 ✅**__") - - -@Client.on_message(filters.private & filters.command('del_caption')) -async def delete_caption(client, message): - caption = await db.get_caption(message.from_user.id) - if not caption: - return await message.reply_text("Note: Lazy_Mode active ✅\n\n😔**Sorry sweetheart ! No Caption found...**😔") - await db.set_caption(message.from_user.id, caption=None) - await message.reply_text("**** Your Caption deleted successfully**✅️") - -@Client.on_message(filters.private & filters.command('see_caption')) -async def see_caption(client, message): - caption = await db.get_caption(message.from_user.id) - if caption: - await message.reply_text(f"**Note: Lazy_Mode active ✅\n\nYour Caption:-**\n\n`{caption}`") - else: - await message.reply_text("😔**Sorry ! No Caption found...**😔") diff --git a/plugins/rlazy_filedetect.py b/plugins/rlazy_filedetect.py deleted file mode 100644 index 3fc366d1f..000000000 --- a/plugins/rlazy_filedetect.py +++ /dev/null @@ -1,63 +0,0 @@ - # Credit @LazyDeveloper. - # Please Don't remove credit. - # Born to make history @LazyDeveloper ! - - # Thank you LazyDeveloper for helping us in this Journey -from pyrogram import Client, filters -from pyrogram.enums import MessageMediaType -from pyrogram.types import InlineKeyboardButton, InlineKeyboardMarkup, ForceReply - - -@Client.on_message(filters.private & filters.reply) -async def refunc(client, message): - if (message.reply_to_message.reply_markup) and isinstance(message.reply_to_message.reply_markup, ForceReply): - new_name = message.text - await message.delete() - await message.delete() - media = await client.get_messages(message.chat.id, message.reply_to_message.id) - file = media.reply_to_message.document or media.reply_to_message.video or media.reply_to_message.audio - filename = file.file_name - types = file.mime_type.split("/") - mime = types[0] - mg_id = media.reply_to_message.id - try: - out = new_name.split(".") - out[1] - out_name = out[-1] - out_filename = new_name - await message.reply_to_message.delete() - if mime == "video": - markup = InlineKeyboardMarkup([[ - InlineKeyboardButton("📁 Document", callback_data="upload_document"), - InlineKeyboardButton("🎥 Video", callback_data="upload_video")]]) - elif mime == "audio": - markup = InlineKeyboardMarkup([[InlineKeyboardButton( - "📁 Document", callback_data="doc"), InlineKeyboardButton("🎵 audio", callback_data="upload_audio")]]) - else: - markup = InlineKeyboardMarkup( - [[InlineKeyboardButton("📁 Document", callback_data="upload_document")]]) - # Lazy-WarninG -> Please Dont chnage anything after this Line - await message.reply_text(f"**Select the output file type**\n**🎞New Name** :- ```{out_filename}```", reply_to_message_id=mg_id, reply_markup=markup) - - except: - try: - out = filename.split(".") - out_name = out[-1] - out_filename = new_name + "." + out_name - except: - await message.reply_to_message.delete() - await message.reply_text("**Error** : No Extension in File, Not Supporting", reply_to_message_id=mg_id) - return - await message.reply_to_message.delete() - if mime == "video": - markup = InlineKeyboardMarkup([[InlineKeyboardButton( - "📁 Document", callback_data="upload_document"), InlineKeyboardButton("🎥 Video", callback_data="upload_video")]]) - elif mime == "audio": - markup = InlineKeyboardMarkup([[InlineKeyboardButton( - "📁 Document", callback_data="upload_document"), InlineKeyboardButton("🎵 audio", callback_data="upload_audio")]]) - else: - markup = InlineKeyboardMarkup( - [[InlineKeyboardButton("📁 Document", callback_data="upload_document")]]) - # Lazy-WarninG -> Please Dont chnage anything after this Line - await message.reply_text(f"**Select the output file type**\n**🎞New Name** :- ```{out_filename}```", - reply_to_message_id=mg_id, reply_markup=markup) \ No newline at end of file diff --git a/plugins/rlazy_thumbnail.py b/plugins/rlazy_thumbnail.py deleted file mode 100644 index 7bea99771..000000000 --- a/plugins/rlazy_thumbnail.py +++ /dev/null @@ -1,30 +0,0 @@ - # Credit @LazyDeveloper. - # Please Don't remove credit. - # Born to make history @LazyDeveloper ! - - # Thank you LazyDeveloper for helping us in this Journey - -from pyrogram import Client, filters -from database.users_chats_db import db - -@Client.on_message(filters.private & filters.command(['viewthumb'])) -async def viewthumb(client, message): - thumb = await db.get_thumbnail(message.from_user.id) - if thumb: - await client.send_photo( - chat_id=message.chat.id, - photo=thumb) - else: - await message.reply_text("😔**Sorry ! No thumbnail found...**😔") - -@Client.on_message(filters.private & filters.command(['delthumb'])) -async def removethumb(client, message): - await db.set_thumbnail(message.from_user.id, file_id=None) - await message.reply_text("**Thumbnail deleted successfully**✅️") - -@Client.on_message(filters.private & filters.photo) -async def addthumbs(client, message): - LazyDev = await message.reply_text("Please Wait ...") - await db.set_thumbnail(message.from_user.id, file_id=message.photo.file_id) - await LazyDev.edit("**Thumbnail saved successfully**✅️") - diff --git a/plugins/zzz_ai_LazyDeveloper.py b/plugins/zzz_ai_LazyDeveloper.py deleted file mode 100644 index 6cb2f8a9e..000000000 --- a/plugins/zzz_ai_LazyDeveloper.py +++ /dev/null @@ -1,174 +0,0 @@ -from utils import temp -from pyrogram.types import InlineKeyboardMarkup, InlineKeyboardButton -from pyrogram import Client, filters -from info import * -import openai -openai.api_key = OPENAI_API - -@Client.on_message(filters.private & filters.text) -async def lazy_answer(client, message): - if AI == True: - user_id = message.from_user.id - if user_id: - try: - lazy_users_message = message.text - user_id = message.from_user.id - response = openai.Completion.create( - model = "text-davinci-003", - prompt = lazy_users_message, - temperature = 0.5, - max_tokens = 1000, - top_p=1, - frequency_penalty=0.1, - presence_penalty = 0.0, - ) - btn=[ - [InlineKeyboardButton(text=f"⇱🤷‍♀️ Take Action 🗃️⇲", url=f'https://t.me/{temp.U_NAME}')], - [InlineKeyboardButton(text=f"🗑 Delete log ❌", callback_data=f'close_data')], - ] - reply_markup=InlineKeyboardMarkup(btn) - footer_credit = "🦋• ʀᴇᴘᴏʀᴛ ɪꜱꜱᴜᴇ •══• ᴄᴏɴᴛᴀᴄᴛ ᴍᴀꜱᴛᴇʀ •🦋" - lazy_response = response.choices[0].text - await client.send_message(LAZY_AI_LOGS, text=f"⚡️⚡️#Lazy_AI_Query \n\n• A user named **{message.from_user.mention}** with user id - `{user_id}`. Asked me this query...\n\n══❚█══Q U E R Y══█❚══\n\n\n[Q྿.]**{lazy_users_message}**\n\n👇Here is what i responded:\n:-`{lazy_response}`\n\n\n❚═USER ID═❚═• `{user_id}` \n❚═USER Name═❚═• `{message.from_user.mention}` \n\n🗃️" , reply_markup = reply_markup ) - await message.reply(f"{lazy_response}\n\n\n{footer_credit}") - except Exception as error: - print(error) - await message.reply_text(f'Error aa gya Lazy Bhaiya 😀\n\n{error}') - else: - return - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # i am NOT INTRESTED IN BEING YOUR SECOND FATHER... SO DON'T REMOVE MY CREDIT... - # @LazyDeveloperr - - - - - - - - - - - - # ...PRESENTING... - # A R T I F i C I A L - I N T E L i G E N C E - # .in Auto-Filter-Bot. - # @LazyDeveloperr - - - - - - - - - - - - - # this line is for copy-pasters... - # ...while you are removing my credit and calling yourself a developerr... - # _____ just imagine, At that time i am fucking your mom and sis at same time, harder & too harder... - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -# -# i am NOT INTRESTED IN BEING YOUR SECOND FATHER... SO DON'T REMOVE MY CREDIT... -# @LazyDeveloperr -# -# -# -# -# -# -# -# -# -# -# -# ...PRESENTING... -# A R T I F i C I A L - I N T E L i G E N C E -# .in Auto-Filter-Bot. -# @LazyDeveloperr -# -# -# -# -# -# -# -# -# -# -# -# -# this line is for copy-pasters... -# ...while you are removing my credit and calling yourself a developerr... -# _____ just imagine, At that time i am fucking your mom and sis at same time, harder & too harder... -# diff --git a/requirements.txt b/requirements.txt index cf57a863e..c651eb953 100644 --- a/requirements.txt +++ b/requirements.txt @@ -15,4 +15,3 @@ humanize aiofiles dnspython pynewtonmath -openai \ No newline at end of file