Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 0 additions & 8 deletions Dockerfile

This file was deleted.

47 changes: 0 additions & 47 deletions app.json

This file was deleted.

2 changes: 0 additions & 2 deletions bash.sh

This file was deleted.

7 changes: 6 additions & 1 deletion main/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,13 @@
BOT_TOKEN = config("BOT_TOKEN", default=None)
SESSION = config("SESSION", default=None)
FORCESUB = config("FORCESUB", default=None)
AUTH = config("AUTH", default=None, cast=int)
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(
Expand Down
2 changes: 1 addition & 1 deletion main/plugins/batch.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
Plugin for both public & private channels!
"""

import time, os, asyncio
import time, os

from .. import bot as Drone
from .. import userbot, Bot, AUTH
Expand Down
13 changes: 6 additions & 7 deletions main/plugins/frontend.py → main/plugins/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,26 +6,25 @@
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 telethon.tl.types import DocumentAttributeVideo

from ethon.pyfunc import video_metadata
from ethon.telefunc import fast_upload, fast_download, force_sub

from ethon.telefunc import force_sub
from main.plugins.helpers import get_link, join, screenshot

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
return
try:
link = get_link(event.text)
if not link:
Expand Down
4 changes: 2 additions & 2 deletions main/plugins/pyroplug.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Github.com/8769Anurag
#Github.com/8769Anurag

import asyncio, time, os

Expand Down Expand Up @@ -67,7 +67,7 @@ async def get_msg(userbot, client, sender, edit_id, msg_link, i):
time.time()
)
)
await edit.edit('Preparing to Upload!')
await edit.edit('Prearing to Upload!')
caption = str(file)
if msg.caption is not None:
caption = msg.caption
Expand Down
15 changes: 0 additions & 15 deletions okteto-stack.yaml

This file was deleted.

6 changes: 4 additions & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
#Github.com/8769Anurag
#Github.com-Vasusen-code

ethon==1.3.6
cryptg
tgcrypto
pyrogram==1.4.16
telethon
pyrogram
python-decouple