From 5b899a44c6c0616f3e8964e658a3185136e1da63 Mon Sep 17 00:00:00 2001 From: Anurag Maheshwari <115565191+AM-ROBOTS@users.noreply.github.com> Date: Wed, 12 Oct 2022 11:21:27 +0530 Subject: [PATCH 01/18] Delete main directory --- main/__init__.py | 46 -------------- main/__main__.py | 23 ------- main/plugins/@ | 1 - main/plugins/batch.py | 103 ------------------------------ main/plugins/frontend.py | 46 -------------- main/plugins/helpers.py | 73 --------------------- main/plugins/progress.py | 88 ------------------------- main/plugins/pyroplug.py | 134 --------------------------------------- main/plugins/start.py | 49 -------------- main/utils.py | 14 ---- 10 files changed, 577 deletions(-) delete mode 100644 main/__init__.py delete mode 100644 main/__main__.py delete mode 100644 main/plugins/@ delete mode 100644 main/plugins/batch.py delete mode 100644 main/plugins/frontend.py delete mode 100644 main/plugins/helpers.py delete mode 100644 main/plugins/progress.py delete mode 100644 main/plugins/pyroplug.py delete mode 100644 main/plugins/start.py delete mode 100644 main/utils.py diff --git a/main/__init__.py b/main/__init__.py deleted file mode 100644 index bb46c12..0000000 --- a/main/__init__.py +++ /dev/null @@ -1,46 +0,0 @@ -#Github.com/8769Anurag - -from pyrogram import Client - -from telethon.sessions import StringSession -from telethon.sync import TelegramClient - -from decouple import config -import logging, time, sys - -logging.basicConfig(format='[%(levelname) 5s/%(asctime)s] %(name)s: %(message)s', - level=logging.WARNING) - -# variables -API_ID = config("API_ID", default=None, cast=int) -API_HASH = config("API_HASH", default=None) -BOT_TOKEN = config("BOT_TOKEN", default=None) -SESSION = config("SESSION", default=None) -FORCESUB = config("FORCESUB", default=None) -AUTH = config("AUTH", default=None, cast=int) - -bot = TelegramClient('bot', API_ID, API_HASH).start(bot_token=BOT_TOKEN) - -userbot = Client( - session_name=SESSION, - api_hash=API_HASH, - api_id=API_ID) - -try: - userbot.start() -except BaseException: - print("Userbot Error ! Have you added SESSION while deploying??") - sys.exit(1) - -Bot = Client( - "SaveRestricted", - bot_token=BOT_TOKEN, - api_id=int(API_ID), - api_hash=API_HASH -) - -try: - Bot.start() -except Exception as e: - print(e) - sys.exit(1) diff --git a/main/__main__.py b/main/__main__.py deleted file mode 100644 index dc516af..0000000 --- a/main/__main__.py +++ /dev/null @@ -1,23 +0,0 @@ -import glob -from pathlib import Path -from main.utils import load_plugins -import logging -from . import bot - -logging.basicConfig(format='[%(levelname) 5s/%(asctime)s] %(name)s: %(message)s', - level=logging.WARNING) - -path = "main/plugins/*.py" -files = glob.glob(path) -for name in files: - with open(name) as a: - patt = Path(a.name) - plugin_name = patt.stem - load_plugins(plugin_name.replace(".py", "")) - -#Don't be a thief -print("Successfully deployed!") -print("By Anurag Maheshwari • Am_RoBots") - -if __name__ == "__main__": - bot.run_until_disconnected() diff --git a/main/plugins/@ b/main/plugins/@ deleted file mode 100644 index 8b13789..0000000 --- a/main/plugins/@ +++ /dev/null @@ -1 +0,0 @@ - diff --git a/main/plugins/batch.py b/main/plugins/batch.py deleted file mode 100644 index c0e0706..0000000 --- a/main/plugins/batch.py +++ /dev/null @@ -1,103 +0,0 @@ -#Tg:sources_cods/Am_RoBots -#Github.com/8769Anurag - -""" -Plugin for both public & private channels! -""" - -import time, os, asyncio - -from .. import bot as Drone -from .. import userbot, Bot, AUTH -from .. import FORCESUB as fs -from main.plugins.pyroplug import check, get_bulk_msg -from main.plugins.helpers import get_link, screenshot - -from telethon import events, Button, errors -from telethon.tl.types import DocumentAttributeVideo - -from pyrogram import Client -from pyrogram.errors import FloodWait - -from ethon.pyfunc import video_metadata -from ethon.telefunc import force_sub - -ft = f"To use this bot you've to join @{fs}." - -batch = [] - -async def get_pvt_content(event, chat, id): - msg = await userbot.get_messages(chat, ids=id) - await event.client.send_message(event.chat_id, msg) - -@Drone.on(events.NewMessage(incoming=True, from_users=AUTH, pattern='/batch')) -async def _batch(event): - if not event.is_private: - return - # wtf is the use of fsub here if the command is meant for the owner? - # well am too lazy to clean - s, r = await force_sub(event.client, fs, event.sender_id, ft) - if s == True: - await event.reply(r) - return - if f'{event.sender_id}' in batch: - return await event.reply("You've already started one batch, wait for it to complete you dumbfuck owner!") - async with Drone.conversation(event.chat_id) as conv: - if s != True: - await conv.send_message("Send me the message link you want to start saving from, as a reply to this message.", buttons=Button.force_reply()) - try: - link = await conv.get_reply() - try: - _link = get_link(link.text) - except Exception: - await conv.send_message("No link found.") - except Exception as e: - print(e) - return await conv.send_message("Cannot wait more longer for your response!") - await conv.send_message("Send me the number of files/range you want to save from the given message, as a reply to this message.", buttons=Button.force_reply()) - try: - _range = await conv.get_reply() - except Exception as e: - print(e) - return await conv.send_message("Cannot wait more longer for your response!") - try: - value = int(_range.text) - if value > 100: - return await conv.send_message("You can only get upto 100 files in a single batch.") - except ValueError: - return await conv.send_message("Range must be an integer!") - s, r = await check(userbot, Bot, _link) - if s != True: - await conv.send_message(r) - return - batch.append(f'{event.sender_id}') - await run_batch(userbot, Bot, event.sender_id, _link, value) - conv.cancel() - batch.pop(0) - - -async def run_batch(userbot, client, sender, link, _range): - for i in range(_range): - timer = 60 - if i < 25: - timer = 5 - if i < 50 and i > 25: - timer = 10 - if i < 100 and i > 50: - timer = 15 - if not 't.me/c/' in link: - if i < 25: - timer = 2 - else: - timer = 3 - try: - await get_bulk_msg(userbot, client, sender, link, i) - except FloodWait as fw: - await asyncio.sleep(fw.seconds + 5) - await get_bulk_msg(userbot, client, sender, link, i) - protection = await client.send_message(sender, f"Sleeping for `{timer}` seconds to avoid Floodwaits and Protect account!") - time.sleep(timer) - await protection.delete() - - - diff --git a/main/plugins/frontend.py b/main/plugins/frontend.py deleted file mode 100644 index 69f4680..0000000 --- a/main/plugins/frontend.py +++ /dev/null @@ -1,46 +0,0 @@ -#Github.com/8769Anurag - -import time, os - -from .. import bot as Drone -from .. import userbot, Bot -from .. import FORCESUB as fs -from main.plugins.pyroplug import get_msg -from main.plugins.helpers import get_link, join, screenshot - -from telethon import events - -from ethon.telefunc import force_sub - -ft = f"To use this bot you've to join @{fs}." - -message = "Send me the message link you want to start saving from, as a reply to this message." - -# To-Do: -# Make these codes shorter and clean -# ofc will never do it. - -@Drone.on(events.NewMessage(incoming=True, func=lambda e: e.is_private)) -async def clone(event): - if event.is_reply: - reply = await event.get_reply_message() - if reply.text == message: - return - try: - link = get_link(event.text) - if not link: - return - except TypeError: - return - s, r = await force_sub(event.client, fs, event.sender_id, ft) - if s == True: - await event.reply(r) - return - edit = await event.reply("Processing!") - if 't.me/+' in link: - q = await join(userbot, link) - await edit.edit(q) - return - if 't.me/' in link: - await get_msg(userbot, Bot, event.sender_id, edit.id, link, 0) - diff --git a/main/plugins/helpers.py b/main/plugins/helpers.py deleted file mode 100644 index c3731ca..0000000 --- a/main/plugins/helpers.py +++ /dev/null @@ -1,73 +0,0 @@ -#Github.com/8769Anurag - -from pyrogram.errors import FloodWait, InviteHashInvalid, InviteHashExpired, UserAlreadyParticipant -from telethon import errors, events - -import asyncio, subprocess, re, os, time -from pathlib import Path -from datetime import datetime as dt - -#Join private chat------------------------------------------------------------------------------------------------------------- - -async def join(client, invite_link): - try: - await client.join_chat(invite_link) - return "Successfully joined the Channel" - except UserAlreadyParticipant: - return "User is already a participant." - except (InviteHashInvalid, InviteHashExpired): - return "Could not join. Maybe your link is expired or Invalid." - except FloodWait: - return "Too many requests, try again later." - except Exception as e: - print(e) - return "Could not join, try joining manually." - -#Regex--------------------------------------------------------------------------------------------------------------- -#to get the url from event - -def get_link(string): - regex = r"(?i)\b((?:https?://|www\d{0,3}[.]|[a-z0-9.\-]+[.][a-z]{2,4}/)(?:[^\s()<>]+|\(([^\s()<>]+|(\([^\s()<>]+\)))*\))+(?:\(([^\s()<>]+|(\([^\s()<>]+\)))*\)|[^\s`!()\[\]{};:'\".,<>?«»“”‘’]))" - url = re.findall(regex,string) - try: - link = [x[0] for x in url][0] - if link: - return link - else: - return False - except Exception: - return False - -#Screenshot--------------------------------------------------------------------------------------------------------------- - -def hhmmss(seconds): - x = time.strftime('%H:%M:%S',time.gmtime(seconds)) - return x - -async def screenshot(video, duration, sender): - if os.path.exists(f'{sender}.jpg'): - return f'{sender}.jpg' - time_stamp = hhmmss(int(duration)/2) - out = dt.now().isoformat("_", "seconds") + ".jpg" - cmd = ["ffmpeg", - "-ss", - f"{time_stamp}", - "-i", - f"{video}", - "-frames:v", - "1", - f"{out}", - "-y" - ] - process = await asyncio.create_subprocess_exec( - *cmd, - stdout=asyncio.subprocess.PIPE, - stderr=asyncio.subprocess.PIPE - ) - stdout, stderr = await process.communicate() - x = stderr.decode().strip() - y = stdout.decode().strip() - if os.path.isfile(out): - return out - else: - None diff --git a/main/plugins/progress.py b/main/plugins/progress.py deleted file mode 100644 index d04bebd..0000000 --- a/main/plugins/progress.py +++ /dev/null @@ -1,88 +0,0 @@ -import math -import os -import time -import json - -FINISHED_PROGRESS_STR = "█" -UN_FINISHED_PROGRESS_STR = "" -DOWNLOAD_LOCATION = "/app" - - -async def progress_for_pyrogram( - current, - total, - bot, - ud_type, - message, - start -): - now = time.time() - diff = now - start - if round(diff % 10.00) == 0 or current == total: - percentage = current * 100 / total - status = DOWNLOAD_LOCATION + "/status.json" - if os.path.exists(status): - with open(status, 'r+') as f: - statusMsg = json.load(f) - if not statusMsg["running"]: - bot.stop_transmission() - 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}]** `| {2}%`\n\n".format( - ''.join([FINISHED_PROGRESS_STR for i in range(math.floor(percentage / 10))]), - ''.join([UN_FINISHED_PROGRESS_STR for i in range(10 - math.floor(percentage / 10))]), - round(percentage, 2)) - - tmp = progress + "GROSSS: {0} of {1}\n\nSpeed: {2}/s\n\nETA: {3}\n".format( - humanbytes(current), - humanbytes(total), - humanbytes(speed), - estimated_total_time if estimated_total_time != '' else "0 s" - ) - try: - if not message.photo: - await message.edit_text( - text="{}\n {}".format( - ud_type, - tmp - ) - ) - else: - await message.edit_caption( - caption="{}\n {}".format( - ud_type, - tmp - ) - ) - except: - pass - - -def humanbytes(size): - if not size: - return "" - power = 2**10 - n = 0 - Dic_powerN = {0: ' ', 1: 'Ki', 2: 'Mi', 3: 'Gi', 4: 'Ti'} - 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 "") - return tmp[:-2] diff --git a/main/plugins/pyroplug.py b/main/plugins/pyroplug.py deleted file mode 100644 index 9f6b060..0000000 --- a/main/plugins/pyroplug.py +++ /dev/null @@ -1,134 +0,0 @@ -# Github.com/8769Anurag - -import asyncio, time, os - -from .. import Bot, bot -from main.plugins.progress import progress_for_pyrogram -from main.plugins.helpers import screenshot - -from pyrogram import Client, filters -from pyrogram.errors import ChannelBanned, ChannelInvalid, ChannelPrivate, ChatIdInvalid, ChatInvalid -from ethon.pyfunc import video_metadata -from telethon import events - -def thumbnail(sender): - if os.path.exists(f'{sender}.jpg'): - return f'{sender}.jpg' - else: - return None - -async def check(userbot, client, link): - msg_id = int(link.split("/")[-1]) - if 't.me/c/' in link: - try: - chat = int('-100' + str(link.split("/")[-2])) - await userbot.get_messages(chat, msg_id) - return True, None - except ValueError: - return False, "**Invalid Link!**" - except Exception: - return False, "Have you joined the channel?" - else: - try: - chat = str(link.split("/")[-2]) - await client.get_messages(chat, msg_id) - return True, None - except Exception: - return False, "Maybe bot is banned from the chat, or your link is invalid!" - -async def get_msg(userbot, client, sender, edit_id, msg_link, i): - edit = "" - chat = "" - msg_id = int(msg_link.split("/")[-1]) + int(i) - if 't.me/c/' in msg_link: - chat = int('-100' + str(msg_link.split("/")[-2])) - try: - msg = await userbot.get_messages(chat, msg_id) - if msg.media: - if 'web_page' in msg.media: - edit = await client.edit_message_text(sender, edit_id, "Cloning.") - await client.send_message(sender, msg.text.markdown) - await edit.delete() - return - if not msg.media: - if msg.text: - edit = await client.edit_message_text(sender, edit_id, "Cloning.") - await client.send_message(sender, msg.text.markdown) - await edit.delete() - return - edit = await client.edit_message_text(sender, edit_id, "Trying to Download.") - file = await userbot.download_media( - msg, - progress=progress_for_pyrogram, - progress_args=( - client, - "**DOWNLOADING:**\n", - edit, - time.time() - ) - ) - await edit.edit('Preparing to Upload!') - caption = str(file) - if msg.caption is not None: - caption = msg.caption - if str(file).split(".")[-1] in ['mkv', 'mp4', 'webm']: - if str(file).split(".")[-1] in ['webm', 'mkv']: - path = str(file).split(".")[0] + ".mp4" - os.rename(file, path) - file = str(file).split(".")[0] + ".mp4" - data = video_metadata(file) - duration = data["duration"] - thumb_path = await screenshot(file, duration, sender) - await client.send_video( - chat_id=sender, - video=file, - caption=caption, - supports_streaming=True, - duration=duration, - thumb=thumb_path, - progress=progress_for_pyrogram, - progress_args=( - client, - '**UPLOADING:**\n', - edit, - time.time() - ) - ) - elif str(file).split(".")[-1] in ['jpg', 'jpeg', 'png', 'webp']: - await edit.edit("Uploading photo.") - await bot.send_file(sender, file, caption=caption) - else: - thumb_path=thumbnail(sender) - await client.send_document( - sender, - file, - caption=caption, - thumb=thumb_path, - progress=progress_for_pyrogram, - progress_args=( - client, - '**UPLOADING:**\n', - edit, - time.time() - ) - ) - await edit.delete() - except (ChannelBanned, ChannelInvalid, ChannelPrivate, ChatIdInvalid, ChatInvalid): - await client.edit_message_text(sender, edit_id, "Have you joined the channel?") - return - except Exception as e: - await client.edit_message_text(sender, edit_id, f'Failed to save: `{msg_link}`') - return - else: - edit = await client.edit_message_text(sender, edit_id, "Cloning.") - chat = msg_link.split("/")[-2] - try: - await client.copy_message(int(sender), chat, msg_id) - except Exception as e: - print(e) - return await client.edit_message_text(sender, edit_id, f'Failed to save: `{msg_link}`') - await edit.delete() - -async def get_bulk_msg(userbot, client, sender, msg_link, i): - x = await client.send_message(sender, "Processing!") - await get_msg(userbot, client, sender, x.message_id, msg_link, i) diff --git a/main/plugins/start.py b/main/plugins/start.py deleted file mode 100644 index 44727ca..0000000 --- a/main/plugins/start.py +++ /dev/null @@ -1,49 +0,0 @@ -#Github.com/8769Anurag - -import os -from .. import bot as Drone -from telethon import events, Button - -from ethon.mystarts import start_srb - -S = '/' + 's' + 't' + 'a' + 'r' + 't' - -@Drone.on(events.callbackquery.CallbackQuery(data="set")) -async def sett(event): - Drone = event.client - button = await event.get_message() - msg = await button.get_reply_message() - await event.delete() - async with Drone.conversation(event.chat_id) as conv: - xx = await conv.send_message("Send me any image for thumbnail as a `reply` to this message.") - x = await conv.get_reply() - if not x.media: - xx.edit("No media found.") - mime = x.file.mime_type - if not 'png' in mime: - if not 'jpg' in mime: - if not 'jpeg' in mime: - return await xx.edit("No image found.") - await xx.delete() - t = await event.client.send_message(event.chat_id, 'Trying.') - path = await event.client.download_media(x.media) - if os.path.exists(f'{event.sender_id}.jpg'): - os.remove(f'{event.sender_id}.jpg') - os.rename(path, f'./{event.sender_id}.jpg') - await t.edit("Temporary thumbnail saved!") - -@Drone.on(events.callbackquery.CallbackQuery(data="rem")) -async def remt(event): - Drone = event.client - await event.edit('Trying.') - try: - os.remove(f'{event.sender_id}.jpg') - await event.edit('Removed!') - except Exception: - await event.edit("No thumbnail saved.") - -@Drone.on(events.NewMessage(incoming=True, pattern=f"{S}")) -async def start(event): - text = "Send me Link of any message to clone it here, For private channel message, send invite link first.\n\n**SUPPORT:** @movies_zilaa" - await start_srb(event, text) - diff --git a/main/utils.py b/main/utils.py deleted file mode 100644 index ba63ac8..0000000 --- a/main/utils.py +++ /dev/null @@ -1,14 +0,0 @@ -import sys -import logging -import importlib -from pathlib import Path - -def load_plugins(plugin_name): - path = Path(f"main/plugins/{plugin_name}.py") - name = "main.plugins.{}".format(plugin_name) - spec = importlib.util.spec_from_file_location(name, path) - load = importlib.util.module_from_spec(spec) - load.logger = logging.getLogger(plugin_name) - spec.loader.exec_module(load) - sys.modules["main.plugins." + plugin_name] = load - print("main has Imported " + plugin_name) From 192c3430403cfe704ec0edf883c61aa8e2cd481e Mon Sep 17 00:00:00 2001 From: Anurag Maheshwari <115565191+AM-ROBOTS@users.noreply.github.com> Date: Wed, 12 Oct 2022 11:21:36 +0530 Subject: [PATCH 02/18] Delete Dockerfile --- Dockerfile | 8 -------- 1 file changed, 8 deletions(-) delete mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile deleted file mode 100644 index 0bd91ea..0000000 --- a/Dockerfile +++ /dev/null @@ -1,8 +0,0 @@ -FROM python:3.9.2-slim-buster -RUN mkdir /app && chmod 777 /app -WORKDIR /app -ENV DEBIAN_FRONTEND=noninteractive -RUN apt -qq update && apt -qq install -y git python3 python3-pip ffmpeg -COPY . . -RUN pip3 install --no-cache-dir -r requirements.txt -CMD ["bash","bash.sh"] From fc2296c4c39467b5e44359a23275e5db2aa60d47 Mon Sep 17 00:00:00 2001 From: Anurag Maheshwari <115565191+AM-ROBOTS@users.noreply.github.com> Date: Wed, 12 Oct 2022 11:21:49 +0530 Subject: [PATCH 03/18] Delete Procfile --- Procfile | 1 - 1 file changed, 1 deletion(-) delete mode 100644 Procfile diff --git a/Procfile b/Procfile deleted file mode 100644 index 2c32205..0000000 --- a/Procfile +++ /dev/null @@ -1 +0,0 @@ -Drone: python -m main From 3689324e9f69af5deb063663a060add532ace729 Mon Sep 17 00:00:00 2001 From: Anurag Maheshwari <115565191+AM-ROBOTS@users.noreply.github.com> Date: Wed, 12 Oct 2022 11:21:57 +0530 Subject: [PATCH 04/18] Delete okteto-stack.yaml --- okteto-stack.yaml | 15 --------------- 1 file changed, 15 deletions(-) delete mode 100644 okteto-stack.yaml diff --git a/okteto-stack.yaml b/okteto-stack.yaml deleted file mode 100644 index 0ee6624..0000000 --- a/okteto-stack.yaml +++ /dev/null @@ -1,15 +0,0 @@ -services: - drone-srcb: - build: . - environment: - API_ID: $API_ID - API_HASH: $API_HASH - BOT_TOKEN: $BOT_TOKEN - SESSION: $SESSION - AUTH: $AUTH - FORCESUB: $FORCESUB - ports: - - 8080 - resources: - cpu: 1000m - memory: 3Gi From 3e0b5f1159aa94b3bad5d5ae9b5d1ff0a735b01e Mon Sep 17 00:00:00 2001 From: Anurag Maheshwari <115565191+AM-ROBOTS@users.noreply.github.com> Date: Wed, 12 Oct 2022 11:22:05 +0530 Subject: [PATCH 05/18] Delete requirements.txt --- requirements.txt | 6 ------ 1 file changed, 6 deletions(-) delete mode 100644 requirements.txt diff --git a/requirements.txt b/requirements.txt deleted file mode 100644 index 2691b93..0000000 --- a/requirements.txt +++ /dev/null @@ -1,6 +0,0 @@ -#Github.com/8769Anurag - -ethon==1.3.6 -cryptg -tgcrypto -pyrogram==1.4.16 From a5fd76944fcd0e6d731881196cce7d07716e6d25 Mon Sep 17 00:00:00 2001 From: Anurag Maheshwari <115565191+AM-ROBOTS@users.noreply.github.com> Date: Wed, 12 Oct 2022 11:22:14 +0530 Subject: [PATCH 06/18] Delete bash.sh --- bash.sh | 2 -- 1 file changed, 2 deletions(-) delete mode 100644 bash.sh diff --git a/bash.sh b/bash.sh deleted file mode 100644 index 4bafc42..0000000 --- a/bash.sh +++ /dev/null @@ -1,2 +0,0 @@ -echo "starting Bot ~@Am_RoBots"; -python3 -m main From 3f0dc51a5e68602b2144bb88836125138cdeb328 Mon Sep 17 00:00:00 2001 From: Anurag Maheshwari <115565191+AM-ROBOTS@users.noreply.github.com> Date: Wed, 12 Oct 2022 11:22:22 +0530 Subject: [PATCH 07/18] Delete app.json --- app.json | 47 ----------------------------------------------- 1 file changed, 47 deletions(-) delete mode 100644 app.json diff --git a/app.json b/app.json deleted file mode 100644 index d27f2e8..0000000 --- a/app.json +++ /dev/null @@ -1,47 +0,0 @@ -{ - "name": "Save restricted content bot", - "description": "Telegram bot to save restricted content.", - "logo": "", - "keywords": [ - "telegram", - "Save restricted content", - "bot" - ], - "repository": "https://github.com/8769ANURAG/SaveRestrictedContentBot", - "website": "", - "success_url": "https://t.me/sources_cods", - "env": { - "API_HASH": { - "description": "Your API HASH from my.telegram.org", - "value": "" - }, - "API_ID": { - "description": "Your API ID from my.telegram.org", - "value": "" - }, - "BOT_TOKEN": { - "description": "Bot token, get it from @BotFather.", - "value": "" - }, - "SESSION": { - "description": "Pyrogram string session.", - "value": "" - }, - "AUTH": { - "description": "User ID of Bot owner.", - "value": "" - }, - "FORCESUB": { - "description": "Username name of public channel without using '@'.", - "value": "" - } - }, - "buildpacks": [ - { - "url": "heroku/python" - }, - { - "url": "https://github.com/jonathanong/heroku-buildpack-ffmpeg-latest.git" - } - ] -} From f57cf127840b275688acc68d48ba04d0d254a9b2 Mon Sep 17 00:00:00 2001 From: Anurag Maheshwari <115565191+AM-ROBOTS@users.noreply.github.com> Date: Wed, 12 Oct 2022 11:33:24 +0530 Subject: [PATCH 08/18] Add files via upload --- Procfile | 1 + requirements.txt | 8 ++++++++ 2 files changed, 9 insertions(+) create mode 100644 Procfile create mode 100644 requirements.txt diff --git a/Procfile b/Procfile new file mode 100644 index 0000000..2c32205 --- /dev/null +++ b/Procfile @@ -0,0 +1 @@ +Drone: python -m main diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..116c3de --- /dev/null +++ b/requirements.txt @@ -0,0 +1,8 @@ +#Github.com-Vasusen-code + +ethon==1.3.6 +cryptg +tgcrypto +telethon +pyrogram +python-decouple From 4587b50f4aef5125e1805ddcc9ee1fae70109697 Mon Sep 17 00:00:00 2001 From: Anurag Maheshwari <115565191+AM-ROBOTS@users.noreply.github.com> Date: Wed, 12 Oct 2022 11:34:17 +0530 Subject: [PATCH 09/18] Create @ --- main/plugins/@ | 1 + 1 file changed, 1 insertion(+) create mode 100644 main/plugins/@ diff --git a/main/plugins/@ b/main/plugins/@ new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/main/plugins/@ @@ -0,0 +1 @@ + From 84925bf6c50e198ce23ec0b0f2f6dffebc32d764 Mon Sep 17 00:00:00 2001 From: Anurag Maheshwari <115565191+AM-ROBOTS@users.noreply.github.com> Date: Wed, 12 Oct 2022 11:34:35 +0530 Subject: [PATCH 10/18] Add files via upload --- main/plugins/batch.py | 103 ++++++++++++++++++++++++++++++ main/plugins/helpers.py | 73 +++++++++++++++++++++ main/plugins/main.py | 45 +++++++++++++ main/plugins/progress.py | 88 +++++++++++++++++++++++++ main/plugins/pyroplug.py | 134 +++++++++++++++++++++++++++++++++++++++ main/plugins/start.py | 49 ++++++++++++++ 6 files changed, 492 insertions(+) create mode 100644 main/plugins/batch.py create mode 100644 main/plugins/helpers.py create mode 100644 main/plugins/main.py create mode 100644 main/plugins/progress.py create mode 100644 main/plugins/pyroplug.py create mode 100644 main/plugins/start.py diff --git a/main/plugins/batch.py b/main/plugins/batch.py new file mode 100644 index 0000000..b0deabc --- /dev/null +++ b/main/plugins/batch.py @@ -0,0 +1,103 @@ +#Tg:MaheshChauhan/DroneBots +#Github.com/Vasusen-code + +""" +Plugin for both public & private channels! +""" + +import time, os + +from .. import bot as Drone +from .. import userbot, Bot, AUTH +from .. import FORCESUB as fs +from main.plugins.pyroplug import check, get_bulk_msg +from main.plugins.helpers import get_link, screenshot + +from telethon import events, Button, errors +from telethon.tl.types import DocumentAttributeVideo + +from pyrogram import Client +from pyrogram.errors import FloodWait + +from ethon.pyfunc import video_metadata +from ethon.telefunc import force_sub + +ft = f"To use this bot you've to join @{fs}." + +batch = [] + +async def get_pvt_content(event, chat, id): + msg = await userbot.get_messages(chat, ids=id) + await event.client.send_message(event.chat_id, msg) + +@Drone.on(events.NewMessage(incoming=True, from_users=AUTH, pattern='/batch')) +async def _batch(event): + if not event.is_private: + return + # wtf is the use of fsub here if the command is meant for the owner? + # well am too lazy to clean + s, r = await force_sub(event.client, fs, event.sender_id, ft) + if s == True: + await event.reply(r) + return + if f'{event.sender_id}' in batch: + return await event.reply("You've already started one batch, wait for it to complete you dumbfuck owner!") + async with Drone.conversation(event.chat_id) as conv: + if s != True: + await conv.send_message("Send me the message link you want to start saving from, as a reply to this message.", buttons=Button.force_reply()) + try: + link = await conv.get_reply() + try: + _link = get_link(link.text) + except Exception: + await conv.send_message("No link found.") + except Exception as e: + print(e) + return await conv.send_message("Cannot wait more longer for your response!") + await conv.send_message("Send me the number of files/range you want to save from the given message, as a reply to this message.", buttons=Button.force_reply()) + try: + _range = await conv.get_reply() + except Exception as e: + print(e) + return await conv.send_message("Cannot wait more longer for your response!") + try: + value = int(_range.text) + if value > 100: + return await conv.send_message("You can only get upto 100 files in a single batch.") + except ValueError: + return await conv.send_message("Range must be an integer!") + s, r = await check(userbot, Bot, _link) + if s != True: + await conv.send_message(r) + return + batch.append(f'{event.sender_id}') + await run_batch(userbot, Bot, event.sender_id, _link, value) + conv.cancel() + batch.pop(0) + + +async def run_batch(userbot, client, sender, link, _range): + for i in range(_range): + timer = 60 + if i < 25: + timer = 5 + if i < 50 and i > 25: + timer = 10 + if i < 100 and i > 50: + timer = 15 + if not 't.me/c/' in link: + if i < 25: + timer = 2 + else: + timer = 3 + try: + await get_bulk_msg(userbot, client, sender, link, i) + except FloodWait as fw: + await asyncio.sleep(fw.seconds + 5) + await get_bulk_msg(userbot, client, sender, link, i) + protection = await client.send_message(sender, f"Sleeping for `{timer}` seconds to avoid Floodwaits and Protect account!") + time.sleep(timer) + await protection.delete() + + + diff --git a/main/plugins/helpers.py b/main/plugins/helpers.py new file mode 100644 index 0000000..bc3ed2a --- /dev/null +++ b/main/plugins/helpers.py @@ -0,0 +1,73 @@ +#Github.com/Vasusen-code + +from pyrogram.errors import FloodWait, InviteHashInvalid, InviteHashExpired, UserAlreadyParticipant +from telethon import errors, events + +import asyncio, subprocess, re, os, time +from pathlib import Path +from datetime import datetime as dt + +#Join private chat------------------------------------------------------------------------------------------------------------- + +async def join(client, invite_link): + try: + await client.join_chat(invite_link) + return "Successfully joined the Channel" + except UserAlreadyParticipant: + return "User is already a participant." + except (InviteHashInvalid, InviteHashExpired): + return "Could not join. Maybe your link is expired or Invalid." + except FloodWait: + return "Too many requests, try again later." + except Exception as e: + print(e) + return "Could not join, try joining manually." + +#Regex--------------------------------------------------------------------------------------------------------------- +#to get the url from event + +def get_link(string): + regex = r"(?i)\b((?:https?://|www\d{0,3}[.]|[a-z0-9.\-]+[.][a-z]{2,4}/)(?:[^\s()<>]+|\(([^\s()<>]+|(\([^\s()<>]+\)))*\))+(?:\(([^\s()<>]+|(\([^\s()<>]+\)))*\)|[^\s`!()\[\]{};:'\".,<>?«»“”‘’]))" + url = re.findall(regex,string) + try: + link = [x[0] for x in url][0] + if link: + return link + else: + return False + except Exception: + return False + +#Screenshot--------------------------------------------------------------------------------------------------------------- + +def hhmmss(seconds): + x = time.strftime('%H:%M:%S',time.gmtime(seconds)) + return x + +async def screenshot(video, duration, sender): + if os.path.exists(f'{sender}.jpg'): + return f'{sender}.jpg' + time_stamp = hhmmss(int(duration)/2) + out = dt.now().isoformat("_", "seconds") + ".jpg" + cmd = ["ffmpeg", + "-ss", + f"{time_stamp}", + "-i", + f"{video}", + "-frames:v", + "1", + f"{out}", + "-y" + ] + process = await asyncio.create_subprocess_exec( + *cmd, + stdout=asyncio.subprocess.PIPE, + stderr=asyncio.subprocess.PIPE + ) + stdout, stderr = await process.communicate() + x = stderr.decode().strip() + y = stdout.decode().strip() + if os.path.isfile(out): + return out + else: + None diff --git a/main/plugins/main.py b/main/plugins/main.py new file mode 100644 index 0000000..0dcce4f --- /dev/null +++ b/main/plugins/main.py @@ -0,0 +1,45 @@ +#Github.com/Vasusen-code + +import time, os + +from .. import bot as Drone +from .. import userbot, Bot +from .. import FORCESUB as fs +from main.plugins.pyroplug import get_msg + +from telethon import events +from telethon.tl.types import DocumentAttributeVideo + +from ethon.pyfunc import video_metadata +from ethon.telefunc import fast_upload, fast_download, force_sub + +from main.plugins.helpers import get_link, join, screenshot + +ft = f"To use this bot you've to join @{fs}." + +# To-Do: +# Make these codes shorter and clean +# ofc will never do it. + +@Drone.on(events.NewMessage(incoming=True, func=lambda e: e.is_private)) +async def clone(event): + if event.is_reply: + return + try: + link = get_link(event.text) + if not link: + return + except TypeError: + return + s, r = await force_sub(event.client, fs, event.sender_id, ft) + if s == True: + await event.reply(r) + return + edit = await event.reply("Processing!") + if 't.me/+' in link: + q = await join(userbot, link) + await edit.edit(q) + return + if 't.me/' in link: + await get_msg(userbot, Bot, event.sender_id, edit.id, link, 0) + diff --git a/main/plugins/progress.py b/main/plugins/progress.py new file mode 100644 index 0000000..d04bebd --- /dev/null +++ b/main/plugins/progress.py @@ -0,0 +1,88 @@ +import math +import os +import time +import json + +FINISHED_PROGRESS_STR = "█" +UN_FINISHED_PROGRESS_STR = "" +DOWNLOAD_LOCATION = "/app" + + +async def progress_for_pyrogram( + current, + total, + bot, + ud_type, + message, + start +): + now = time.time() + diff = now - start + if round(diff % 10.00) == 0 or current == total: + percentage = current * 100 / total + status = DOWNLOAD_LOCATION + "/status.json" + if os.path.exists(status): + with open(status, 'r+') as f: + statusMsg = json.load(f) + if not statusMsg["running"]: + bot.stop_transmission() + 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}]** `| {2}%`\n\n".format( + ''.join([FINISHED_PROGRESS_STR for i in range(math.floor(percentage / 10))]), + ''.join([UN_FINISHED_PROGRESS_STR for i in range(10 - math.floor(percentage / 10))]), + round(percentage, 2)) + + tmp = progress + "GROSSS: {0} of {1}\n\nSpeed: {2}/s\n\nETA: {3}\n".format( + humanbytes(current), + humanbytes(total), + humanbytes(speed), + estimated_total_time if estimated_total_time != '' else "0 s" + ) + try: + if not message.photo: + await message.edit_text( + text="{}\n {}".format( + ud_type, + tmp + ) + ) + else: + await message.edit_caption( + caption="{}\n {}".format( + ud_type, + tmp + ) + ) + except: + pass + + +def humanbytes(size): + if not size: + return "" + power = 2**10 + n = 0 + Dic_powerN = {0: ' ', 1: 'Ki', 2: 'Mi', 3: 'Gi', 4: 'Ti'} + 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 "") + return tmp[:-2] diff --git a/main/plugins/pyroplug.py b/main/plugins/pyroplug.py new file mode 100644 index 0000000..59f3bd4 --- /dev/null +++ b/main/plugins/pyroplug.py @@ -0,0 +1,134 @@ +# Github.com/Vasusen-code + +import asyncio, time, os + +from .. import Bot, bot +from main.plugins.progress import progress_for_pyrogram +from main.plugins.helpers import screenshot + +from pyrogram import Client, filters +from pyrogram.errors import ChannelBanned, ChannelInvalid, ChannelPrivate, ChatIdInvalid, ChatInvalid +from ethon.pyfunc import video_metadata +from telethon import events + +def thumbnail(sender): + if os.path.exists(f'{sender}.jpg'): + return f'{sender}.jpg' + else: + return None + +async def check(userbot, client, link): + msg_id = int(link.split("/")[-1]) + if 't.me/c/' in link: + try: + chat = int('-100' + str(link.split("/")[-2])) + await userbot.get_messages(chat, msg_id) + return True, None + except ValueError: + return False, "**Invalid Link!**" + except Exception: + return False, "Have you joined the channel?" + else: + try: + chat = str(link.split("/")[-2]) + await client.get_messages(chat, msg_id) + return True, None + except Exception: + return False, "Maybe bot is banned from the chat, or your link is invalid!" + +async def get_msg(userbot, client, sender, edit_id, msg_link, i): + edit = "" + chat = "" + msg_id = int(msg_link.split("/")[-1]) + int(i) + if 't.me/c/' in msg_link: + chat = int('-100' + str(msg_link.split("/")[-2])) + try: + msg = await userbot.get_messages(chat, msg_id) + if msg.media: + if 'web_page' in msg.media: + edit = await client.edit_message_text(sender, edit_id, "Cloning.") + await client.send_message(sender, msg.text.markdown) + await edit.delete() + return + if not msg.media: + if msg.text: + edit = await client.edit_message_text(sender, edit_id, "Cloning.") + await client.send_message(sender, msg.text.markdown) + await edit.delete() + return + edit = await client.edit_message_text(sender, edit_id, "Trying to Download.") + file = await userbot.download_media( + msg, + progress=progress_for_pyrogram, + progress_args=( + client, + "**DOWNLOADING:**\n", + edit, + time.time() + ) + ) + await edit.edit('Prearing to Upload!') + caption = str(file) + if msg.caption is not None: + caption = msg.caption + if str(file).split(".")[-1] in ['mkv', 'mp4', 'webm']: + if str(file).split(".")[-1] in ['webm', 'mkv']: + path = str(file).split(".")[0] + ".mp4" + os.rename(file, path) + file = str(file).split(".")[0] + ".mp4" + data = video_metadata(file) + duration = data["duration"] + thumb_path = await screenshot(file, duration, sender) + await client.send_video( + chat_id=sender, + video=file, + caption=caption, + supports_streaming=True, + duration=duration, + thumb=thumb_path, + progress=progress_for_pyrogram, + progress_args=( + client, + '**UPLOADING:**\n', + edit, + time.time() + ) + ) + elif str(file).split(".")[-1] in ['jpg', 'jpeg', 'png', 'webp']: + await edit.edit("Uploading photo.") + await bot.send_file(sender, file, caption=caption) + else: + thumb_path=thumbnail(sender) + await client.send_document( + sender, + file, + caption=caption, + thumb=thumb_path, + progress=progress_for_pyrogram, + progress_args=( + client, + '**UPLOADING:**\n', + edit, + time.time() + ) + ) + await edit.delete() + except (ChannelBanned, ChannelInvalid, ChannelPrivate, ChatIdInvalid, ChatInvalid): + await client.edit_message_text(sender, edit_id, "Have you joined the channel?") + return + except Exception as e: + await client.edit_message_text(sender, edit_id, f'Failed to save: `{msg_link}`') + return + else: + edit = await client.edit_message_text(sender, edit_id, "Cloning.") + chat = msg_link.split("/")[-2] + try: + await client.copy_message(int(sender), chat, msg_id) + except Exception as e: + print(e) + return await client.edit_message_text(sender, edit_id, f'Failed to save: `{msg_link}`') + await edit.delete() + +async def get_bulk_msg(userbot, client, sender, msg_link, i): + x = await client.send_message(sender, "Processing!") + await get_msg(userbot, client, sender, x.message_id, msg_link, i) diff --git a/main/plugins/start.py b/main/plugins/start.py new file mode 100644 index 0000000..9e8656c --- /dev/null +++ b/main/plugins/start.py @@ -0,0 +1,49 @@ +#Github.com/Vasusen-code + +import os +from .. import bot as Drone +from telethon import events, Button + +from ethon.mystarts import start_srb + +S = '/' + 's' + 't' + 'a' + 'r' + 't' + +@Drone.on(events.callbackquery.CallbackQuery(data="set")) +async def sett(event): + Drone = event.client + button = await event.get_message() + msg = await button.get_reply_message() + await event.delete() + async with Drone.conversation(event.chat_id) as conv: + xx = await conv.send_message("Send me any image for thumbnail as a `reply` to this message.") + x = await conv.get_reply() + if not x.media: + xx.edit("No media found.") + mime = x.file.mime_type + if not 'png' in mime: + if not 'jpg' in mime: + if not 'jpeg' in mime: + return await xx.edit("No image found.") + await xx.delete() + t = await event.client.send_message(event.chat_id, 'Trying.') + path = await event.client.download_media(x.media) + if os.path.exists(f'{event.sender_id}.jpg'): + os.remove(f'{event.sender_id}.jpg') + os.rename(path, f'./{event.sender_id}.jpg') + await t.edit("Temporary thumbnail saved!") + +@Drone.on(events.callbackquery.CallbackQuery(data="rem")) +async def remt(event): + Drone = event.client + await event.edit('Trying.') + try: + os.remove(f'{event.sender_id}.jpg') + await event.edit('Removed!') + except Exception: + await event.edit("No thumbnail saved.") + +@Drone.on(events.NewMessage(incoming=True, pattern=f"{S}")) +async def start(event): + text = "Send me Link of any message to clone it here, For private channel message, send invite link first.\n\n**SUPPORT:** @TeamDrone" + await start_srb(event, text) + From aab3794250ffde605bf0d19bc3cecaaec1ab7a99 Mon Sep 17 00:00:00 2001 From: Anurag Maheshwari <115565191+AM-ROBOTS@users.noreply.github.com> Date: Wed, 12 Oct 2022 11:34:55 +0530 Subject: [PATCH 11/18] Add files via upload --- main/__init__.py | 51 ++++++++++++++++++++++++++++++++++++++++++++++++ main/__main__.py | 23 ++++++++++++++++++++++ main/utils.py | 14 +++++++++++++ 3 files changed, 88 insertions(+) create mode 100644 main/__init__.py create mode 100644 main/__main__.py create mode 100644 main/utils.py diff --git a/main/__init__.py b/main/__init__.py new file mode 100644 index 0000000..dca61a5 --- /dev/null +++ b/main/__init__.py @@ -0,0 +1,51 @@ +#ChauhanMahesh/Vasusen/DroneBots/COL + +from pyrogram import Client + +from telethon.sessions import StringSession +from telethon.sync import TelegramClient + +from decouple import config +import logging, time, sys + +logging.basicConfig(format='[%(levelname) 5s/%(asctime)s] %(name)s: %(message)s', + level=logging.WARNING) + +# variables +API_ID = config("API_ID", default=None, cast=int) +API_HASH = config("API_HASH", default=None) +BOT_TOKEN = config("BOT_TOKEN", default=None) +SESSION = config("SESSION", default=None) +FORCESUB = config("FORCESUB", default=None) +AUTH = [] + +auth = config("AUTH", default=None, cast=int) +ids = auth.split(",") +for id in ids: + AUTH.append(int(id)) + +bot = TelegramClient('bot', API_ID, API_HASH).start(bot_token=BOT_TOKEN) + +userbot = Client( + session_name=SESSION, + api_hash=API_HASH, + api_id=API_ID) + +try: + userbot.start() +except BaseException: + print("Userbot Error ! Have you added SESSION while deploying??") + sys.exit(1) + +Bot = Client( + "SaveRestricted", + bot_token=BOT_TOKEN, + api_id=int(API_ID), + api_hash=API_HASH +) + +try: + Bot.start() +except Exception as e: + print(e) + sys.exit(1) diff --git a/main/__main__.py b/main/__main__.py new file mode 100644 index 0000000..fda9da2 --- /dev/null +++ b/main/__main__.py @@ -0,0 +1,23 @@ +import glob +from pathlib import Path +from main.utils import load_plugins +import logging +from . import bot + +logging.basicConfig(format='[%(levelname) 5s/%(asctime)s] %(name)s: %(message)s', + level=logging.WARNING) + +path = "main/plugins/*.py" +files = glob.glob(path) +for name in files: + with open(name) as a: + patt = Path(a.name) + plugin_name = patt.stem + load_plugins(plugin_name.replace(".py", "")) + +#Don't be a thief +print("Successfully deployed!") +print("By MaheshChauhan • DroneBots") + +if __name__ == "__main__": + bot.run_until_disconnected() diff --git a/main/utils.py b/main/utils.py new file mode 100644 index 0000000..ba63ac8 --- /dev/null +++ b/main/utils.py @@ -0,0 +1,14 @@ +import sys +import logging +import importlib +from pathlib import Path + +def load_plugins(plugin_name): + path = Path(f"main/plugins/{plugin_name}.py") + name = "main.plugins.{}".format(plugin_name) + spec = importlib.util.spec_from_file_location(name, path) + load = importlib.util.module_from_spec(spec) + load.logger = logging.getLogger(plugin_name) + spec.loader.exec_module(load) + sys.modules["main.plugins." + plugin_name] = load + print("main has Imported " + plugin_name) From 18c7b2a12fa668c2bf88a6e43f7446117e26e561 Mon Sep 17 00:00:00 2001 From: Anurag Maheshwari <115565191+AM-ROBOTS@users.noreply.github.com> Date: Wed, 12 Oct 2022 11:35:31 +0530 Subject: [PATCH 12/18] Update __init__.py --- main/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main/__init__.py b/main/__init__.py index dca61a5..6a89e25 100644 --- a/main/__init__.py +++ b/main/__init__.py @@ -1,4 +1,4 @@ -#ChauhanMahesh/Vasusen/DroneBots/COL +#Github.com/8769Anurag from pyrogram import Client From d760086db6e3b10015f8eca31e58b8aa2dd33e6d Mon Sep 17 00:00:00 2001 From: Anurag Maheshwari <115565191+AM-ROBOTS@users.noreply.github.com> Date: Wed, 12 Oct 2022 11:36:16 +0530 Subject: [PATCH 13/18] Update __main__.py --- main/__main__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main/__main__.py b/main/__main__.py index fda9da2..dc516af 100644 --- a/main/__main__.py +++ b/main/__main__.py @@ -17,7 +17,7 @@ #Don't be a thief print("Successfully deployed!") -print("By MaheshChauhan • DroneBots") +print("By Anurag Maheshwari • Am_RoBots") if __name__ == "__main__": bot.run_until_disconnected() From ed6aa51c801d39791e4ab6ece643824f3955a914 Mon Sep 17 00:00:00 2001 From: Anurag Maheshwari <115565191+AM-ROBOTS@users.noreply.github.com> Date: Wed, 12 Oct 2022 11:37:27 +0530 Subject: [PATCH 14/18] Update batch.py --- main/plugins/batch.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/main/plugins/batch.py b/main/plugins/batch.py index b0deabc..80278e0 100644 --- a/main/plugins/batch.py +++ b/main/plugins/batch.py @@ -1,5 +1,5 @@ -#Tg:MaheshChauhan/DroneBots -#Github.com/Vasusen-code +#Tg:sources_cods/Am_RoBots +#Github.com/8769Anurag """ Plugin for both public & private channels! From c4f30cfa67c1a30d0d01e2f40e6be99966c05bc9 Mon Sep 17 00:00:00 2001 From: Anurag Maheshwari <115565191+AM-ROBOTS@users.noreply.github.com> Date: Wed, 12 Oct 2022 11:38:05 +0530 Subject: [PATCH 15/18] Update helpers.py --- main/plugins/helpers.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main/plugins/helpers.py b/main/plugins/helpers.py index bc3ed2a..c3731ca 100644 --- a/main/plugins/helpers.py +++ b/main/plugins/helpers.py @@ -1,4 +1,4 @@ -#Github.com/Vasusen-code +#Github.com/8769Anurag from pyrogram.errors import FloodWait, InviteHashInvalid, InviteHashExpired, UserAlreadyParticipant from telethon import errors, events From fe3dcb777ee2dbeffc50df8fd306183b960582b3 Mon Sep 17 00:00:00 2001 From: Anurag Maheshwari <115565191+AM-ROBOTS@users.noreply.github.com> Date: Wed, 12 Oct 2022 11:38:33 +0530 Subject: [PATCH 16/18] Update main.py --- main/plugins/main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main/plugins/main.py b/main/plugins/main.py index 0dcce4f..f8e8aa9 100644 --- a/main/plugins/main.py +++ b/main/plugins/main.py @@ -1,4 +1,4 @@ -#Github.com/Vasusen-code +#Github.com/8769Anurag import time, os From c65b7865b61e5ca0811a4f816ff4c14494152507 Mon Sep 17 00:00:00 2001 From: Anurag Maheshwari <115565191+AM-ROBOTS@users.noreply.github.com> Date: Wed, 12 Oct 2022 11:39:31 +0530 Subject: [PATCH 17/18] Update pyroplug.py --- main/plugins/pyroplug.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main/plugins/pyroplug.py b/main/plugins/pyroplug.py index 59f3bd4..98b6ca9 100644 --- a/main/plugins/pyroplug.py +++ b/main/plugins/pyroplug.py @@ -1,4 +1,4 @@ -# Github.com/Vasusen-code +#Github.com/8769Anurag import asyncio, time, os From eda5b7e2e47280bf4c6abb908edd53943daf9ecf Mon Sep 17 00:00:00 2001 From: Anurag Maheshwari <115565191+AM-ROBOTS@users.noreply.github.com> Date: Wed, 12 Oct 2022 11:40:19 +0530 Subject: [PATCH 18/18] Update start.py --- main/plugins/start.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/main/plugins/start.py b/main/plugins/start.py index 9e8656c..44727ca 100644 --- a/main/plugins/start.py +++ b/main/plugins/start.py @@ -1,4 +1,4 @@ -#Github.com/Vasusen-code +#Github.com/8769Anurag import os from .. import bot as Drone @@ -44,6 +44,6 @@ async def remt(event): @Drone.on(events.NewMessage(incoming=True, pattern=f"{S}")) async def start(event): - text = "Send me Link of any message to clone it here, For private channel message, send invite link first.\n\n**SUPPORT:** @TeamDrone" + text = "Send me Link of any message to clone it here, For private channel message, send invite link first.\n\n**SUPPORT:** @movies_zilaa" await start_srb(event, text)