Skip to content

Commit

Permalink
Some Fixes.
Browse files Browse the repository at this point in the history
  • Loading branch information
Prince-Mendiratta authored Jan 3, 2020
1 parent b2042e1 commit 9179d98
Show file tree
Hide file tree
Showing 2 changed files with 162 additions and 0 deletions.
122 changes: 122 additions & 0 deletions app.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,122 @@
{
"name": "X-tra Telegram",
"description": "Userbot created by a SNAPDRAGON and custom fork by ANUBIS\n\n join https://t.me/X_tra_tele_support for any problems or support",
"logo": "https://telegra.ph/file/1be6c59f53fef57b5745b.jpg",
"keywords": [
"telegram",
"userbot",
"plugin",
"modular",
"productivity"
],
"repository": "https://github.com/Dark-Princ3/X-tra-Telegram/",
"website": "#TODO",
"success_url": "#TODO",
"env": {
"ENV": {
"description": "Setting this to ANYTHING will enable heroku.",
"value": "ANYTHING"
},
"TEMP_DOWNLOAD_DIRECTORY": {
"description": "Where downloaded files will go.",
"value": "./userbot/DOWNLOADS/",
"required": false
},
"APP_ID": {
"description": "Get this value from my.telegram.org! Please do not steal",
"value": ""
},
"API_HASH": {
"description": "Get this value from my.telegram.org! Please do not steal",
"value": ""
},
"STRING_SESSION": {
"description": "Get this value by running python3 telesetup.py locally",
"value": ""
},
"GITHUB_ACCESS_TOKEN": {
"description": "Your Github Access Token for gitcommit plugin.Google 'Github access token' to find.",
"value": "",
"required": false
},
"GIT_REPO_NAME": {
"description": "Your repo name Example: Total-Noob-69/X-Tra-Telegram, but GITHUB_ACCESS_TOKEN must be setup first.",
"value": "",
"required": false
},
"LYDIA_API_KEY": {
"description": "Needed for Lydia AI. Follow https://telegra.ph/Lydia-09-05 to get your API.",
"value": "",
"required": false
},
"HEROKU_API_KEY": {
"description": "Go to https://dashboard.heroku.com/account, scroll down and press Reveal API.Required for updater to work.",
"value": "",
"required": false
},
"SUDO_USERS": {
"description": "Makes your acc and bot stable",
"value": "742506768",
"required": false
},
"HEROKU_APP_NAME": {
"description": "The Value of App Name you filled in right on top.Required for updater to work.",
"value": "",
"required": false
},
"TG_BOT_TOKEN_BF_HER": {
"description": "Needed for inline buttons maker. Make a bot at [BotFather](http://telegram.dog/BotFather) and get the token of your bot.Worth it. Get it.",
"value": "",
"required": false
},
"CHROME_BIN": {
"description": "For Carbon.py. Leave as it is. ",
"value": "/app/.apt/usr/bin/google-chrome",
"required": false
},
"CHROME_DRIVER": {
"description": "For Carbon.py. Leave as it is. ",
"value": "/app/.chromedriver/bin/chromedriver",
"required": false
},
"TG_BOT_USER_NAME_BF_HER": {
"description": "Needed for inline buttons maker. Make a bot at [BotFather](http://telegram.dog/BotFather) and get the username of your bot",
"value": "",
"required": false
},
"DOWNLOAD_PFP_URL_CLOCK": {
"description": "Needed for autopic module. A url that is a preview link of your Profile Pic",
"value": "",
"required": false
},
"ALIVE_NAME": {
"description": "Your Telegram Username. ",
"value": "",
"required": false
},
"TZ": {
"description": "Required for Correct Time on autopic",
"value": "",
"required": false
}
},
"addons": [{
"plan": "heroku-postgresql",
"options": {
"version": "9.5"
}
}],
"buildpacks": [{
"url": "https://github.com/jonathanong/heroku-buildpack-ffmpeg-latest"
},{
"url":"https://github.com/amivin/aria2-heroku.git"
},{
"url":"https://github.com/heroku/heroku-buildpack-google-chrome"
},{
"url":"https://github.com/heroku/heroku-buildpack-chromedriver"
},{
"url": "https://github.com/opendoor-labs/heroku-buildpack-p7zip"
},{
"url": "heroku/python"
}]
}
40 changes: 40 additions & 0 deletions heroku_config.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
import os

class Var(object):
APP_ID = int(os.environ.get("APP_ID", 6))
# 6 is a placeholder
API_HASH = os.environ.get("API_HASH", "eb06d4abfb49dc3eeb1aeb98ae0f581e")
STRING_SESSION = os.environ.get("STRING_SESSION", None)
DB_URI = os.environ.get("DATABASE_URL", None)
TEMP_DOWNLOAD_DIRECTORY = os.environ.get("TEMP_DOWNLOAD_DIRECTORY", None)
LOGGER = True
GITHUB_ACCESS_TOKEN = os.environ.get("GITHUB_ACCESS_TOKEN", None)
GIT_REPO_NAME = os.environ.get("GIT_REPO_NAME", None)
# Here for later purposes
SUDO_USERS = set(int(x) for x in os.environ.get("SUDO_USERS", "967883138").split())
LYDIA_API_KEY = os.environ.get("LYDIA_API_KEY", None)
LESS_SPAMMY = os.environ.get("LESS_SPAMMY", None)
HEROKU_API_KEY = os.environ.get("HEROKU_API_KEY", None)
HEROKU_APP_NAME = os.environ.get("HEROKU_APP_NAME", None)
TG_BOT_TOKEN_BF_HER = os.environ.get("TG_BOT_TOKEN_BF_HER", None)
TG_BOT_USER_NAME_BF_HER = os.environ.get("TG_BOT_USER_NAME_BF_HER", None)
DOWNLOAD_PFP_URL_CLOCK = os.environ.get("DOWNLOAD_PFP_URL_CLOCK", None)
G_DRIVE_CLIENT_ID = os.environ.get("G_DRIVE_CLIENT_ID", None)
G_DRIVE_CLIENT_SECRET = os.environ.get("G_DRIVE_CLIENT_SECRET", None)
GDRIVE_FOLDER_ID = os.environ.get("GDRIVE_FOLDER_ID", "root")
AUTH_TOKEN_DATA = os.environ.get("AUTH_TOKEN_DATA", None)
if AUTH_TOKEN_DATA != None:
os.makedirs(TEMP_DOWNLOAD_DIRECTORY)
t_file = open(TEMP_DOWNLOAD_DIRECTORY+"auth_token.txt","w")
t_file.write(AUTH_TOKEN_DATA)
t_file.close()
PRIVATE_GROUP_ID = os.environ.get("PRIVATE_GROUP_ID", None)
if PRIVATE_GROUP_ID != None:
try:
PRIVATE_GROUP_ID = int(PRIVATE_GROUP_ID)
except ValueError:
raise ValueError("Invalid Private Group ID. Make sure your ID is starts with -100 and make sure that it is only numbers.")

class Development(Var):
LOGGER = True
# Here for later purposes

0 comments on commit 9179d98

Please sign in to comment.