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
129 changes: 129 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,129 @@
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class

# C extensions
*.so

# Distribution / packaging
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
pip-wheel-metadata/
share/python-wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST

# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec

# Installer logs
pip-log.txt
pip-delete-this-directory.txt

# Unit test / coverage reports
htmlcov/
.tox/
.nox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
*.py,cover
.hypothesis/
.pytest_cache/

# Translations
*.mo
*.pot

# Django stuff:
*.log
local_settings.py
db.sqlite3
db.sqlite3-journal

# Flask stuff:
instance/
.webassets-cache

# Scrapy stuff:
.scrapy

# Sphinx documentation
docs/_build/

# PyBuilder
target/

# Jupyter Notebook
.ipynb_checkpoints

# IPython
profile_default/
ipython_config.py

# pyenv
.python-version

# pipenv
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
# However, in case of collaboration, if having platform-specific dependencies or dependencies
# having no cross-platform support, pipenv may install dependencies that don't work, or not
# install all needed dependencies.
#Pipfile.lock

# PEP 582; used by e.g. github.com/David-OConnor/pyflow
__pypackages__/

# Celery stuff
celerybeat-schedule
celerybeat.pid

# SageMath parsed files
*.sage.py

# Environments
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/

# Spyder project settings
.spyderproject
.spyproject

# Rope project settings
.ropeproject

# mkdocs documentation
/site

# mypy
.mypy_cache/
.dmypy.json
dmypy.json

# Pyre type checker
.pyre/
8 changes: 0 additions & 8 deletions Dockerfile

This file was deleted.

21 changes: 7 additions & 14 deletions app.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
{
"name": "Save restricted content bot",
"description": "Telegram bot to save restricted content.",
"name": "Save Restricted",
"description": "Save restricted content",
"logo": "",
"keywords": [
"Best",
"telegram",
"Save restricted content",
"save restricted",
"bot"
],
"repository": "https://github.com/8769ANURAG/SaveRestrictedContentBot",
"repository": "https://github.com/AM-ROBOTS/SaveRestrictedContentBot",
"website": "",
"success_url": "https://t.me/sources_cods",
"success_url": "https://github.com/AM-ROBOTS/SaveRestrictedContentBot",
"env": {
"API_HASH": {
"description": "Your API HASH from my.telegram.org",
Expand All @@ -24,15 +25,7 @@
"value": ""
},
"SESSION": {
"description": "Pyrogram string session.",
"value": ""
},
"AUTH": {
"description": "User ID of Bot owner.",
"value": ""
},
"FORCESUB": {
"description": "Username name of public channel without using '@'.",
"description": "pyrogram string session.",
"value": ""
}
},
Expand Down
2 changes: 0 additions & 2 deletions bash.sh

This file was deleted.

35 changes: 3 additions & 32 deletions main/__init__.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
#Github.com/8769Anurag

from pyrogram import Client

from telethon.sessions import StringSession
from telethon.sync import TelegramClient

from telethon import TelegramClient
from decouple import config
import logging, time, sys
import logging
import time

logging.basicConfig(format='[%(levelname) 5s/%(asctime)s] %(name)s: %(message)s',
level=logging.WARNING)
Expand All @@ -16,31 +13,5 @@
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)
2 changes: 0 additions & 2 deletions main/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,7 @@
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()
103 changes: 0 additions & 103 deletions main/plugins/batch.py

This file was deleted.

File renamed without changes.
46 changes: 0 additions & 46 deletions main/plugins/frontend.py

This file was deleted.

Loading