Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update requirements.txt #544

Open
wants to merge 29 commits into
base: alpha
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
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
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
dnspython
heroku3
motor
pyrogram==2.0.58
pyrogram==0.6.2
tgcrypto
15 changes: 15 additions & 0 deletions stackhost.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
user:
name: kanhagarg7
github: kanhagarg7
language: "python"
python_version: "2.7"

commands:
build:
- "pip install -r requirements.txt"
package:
- "ffmpeg build-essential"
start:
- "python3 -m userge"
env:
- "ENVIRONMENT=production"
1 change: 1 addition & 0 deletions user.log
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

23 changes: 9 additions & 14 deletions userge/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,36 +19,31 @@

# try to get this value using eval :)
TEST = secured_str("nice! report @UsergeSpam")

API_ID = environ.get("API_ID")
API_HASH = secured_env("API_HASH")
BOT_TOKEN = secured_env("BOT_TOKEN")
PYTHONPATH = "/app"
API_ID = environ.get("6")
API_HASH = secured_env("eb06d4abfb49dc3eeb1aeb98ae0f581e")
BOT_TOKEN = secured_env("7807995464:AAGZ7pJtHrZVJnwgxq2GaaZ2qsqrqExIIMY")
SESSION_STRING = secured_env("SESSION_STRING")
DB_URI = secured_env("DATABASE_URL")

OWNER_ID = tuple(filter(lambda x: x, map(int, environ.get("OWNER_ID", "0").split())))
LOG_CHANNEL_ID = int(environ.get("LOG_CHANNEL_ID"))
OWNER_ID = tuple(filter(lambda x: x, map(int, environ.get("6574063018", "0").split())))
LOG_CHANNEL_ID = environ.get("-1002425051818")
AUTH_CHATS = (OWNER_ID[0], LOG_CHANNEL_ID) if OWNER_ID else (LOG_CHANNEL_ID,)

CMD_TRIGGER = environ.get("CMD_TRIGGER")
SUDO_TRIGGER = environ.get("SUDO_TRIGGER")
CMD_TRIGGER = environ.get(".")
SUDO_TRIGGER = environ.get(".")
PUBLIC_TRIGGER = '/'

WORKERS = int(environ.get("WORKERS"))
WORKERS = environ.get("WORKERS")
MAX_MESSAGE_LENGTH = 4096

FINISHED_PROGRESS_STR = environ.get("FINISHED_PROGRESS_STR")
UNFINISHED_PROGRESS_STR = environ.get("UNFINISHED_PROGRESS_STR")

HEROKU_API_KEY = secured_env("HEROKU_API_KEY")
HEROKU_APP_NAME = environ.get("HEROKU_APP_NAME")
HEROKU_APP = heroku3.from_key(HEROKU_API_KEY).apps()[HEROKU_APP_NAME] \
if HEROKU_API_KEY and HEROKU_APP_NAME else None

ASSERT_SINGLE_INSTANCE = environ.get("ASSERT_SINGLE_INSTANCE", '').lower() == "true"
IGNORE_VERIFIED_CHATS = True


class Dynamic:
DOWN_PATH = environ.get("DOWN_PATH")

Expand Down
2 changes: 1 addition & 1 deletion userge/logger.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
datefmt='%d-%b-%y %H:%M:%S',
handlers=[
RotatingFileHandler(
"logs/userge.log", maxBytes=20480, backupCount=10),
"/app/user.log", maxBytes=20480, backupCount=10),
logging.StreamHandler()
])

Expand Down
2 changes: 1 addition & 1 deletion userge/plugins/builtin/loader/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
from typing import List

from loader.types import Update
from loader.userge import api
from userge.plugins.loader.userge import api
from userge import userge, Message, config
from userge.versions import get_version

Expand Down