forked from VJBots/VJ-Url-Uploader-Bot
-
Notifications
You must be signed in to change notification settings - Fork 0
/
config.py
73 lines (56 loc) · 3.21 KB
/
config.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
# Don't Remove Credit Tg - @VJ_Botz
# Subscribe YouTube Channel For Amazing Bot https://youtube.com/@Tech_VJ
# Ask Doubt on telegram @KingVJ01
import os
import re
from os import environ, getenv
id_pattern = re.compile(r'^.\d+$')
def is_enabled(value, default):
if value.lower() in ["true", "yes", "1", "enable", "y"]:
return True
elif value.lower() in ["false", "no", "0", "disable", "n"]:
return False
else:
return default
class Config(object):
# Bot Information
TECH_VJ_BOT_TOKEN = os.environ.get("TECH_VJ_BOT_TOKEN", "6902682878:AAHcVPP_sjrB1ando3lS7zpM5xO42gIBVbo")
TECH_VJ_BOT_USERNAME = os.environ.get("TECH_VJ_BOT_USERNAME", "Sbdjdjbsodbbot") # Bot username without @.
# The Telegram API things
TECH_VJ_API_ID = int(os.environ.get("TECH_VJ_API_ID", "7603458"))
TECH_VJ_API_HASH = os.environ.get("TECH_VJ_API_HASH", "910e420f1f74f40305a684a331dade35")
# the download location, where the HTTP Server runs
TECH_VJ_DOWNLOAD_LOCATION = "./DOWNLOADS"
# Telegram maximum file upload size
TECH_VJ_MAX_FILE_SIZE = 50000000
TECH_VJ_TG_MAX_FILE_SIZE = 4194304000 #2097152000
TECH_VJ_FREE_USER_MAX_FILE_SIZE = 50000000
# chunk size that should be used with requests
TECH_VJ_CHUNK_SIZE = int(128)
# default thumbnail to be used in the videos
# proxy for accessing youtube-dl in GeoRestricted Areas
# Get your own proxy from https://github.com/rg3/youtube-dl/issues/1091#issuecomment-230163061
TECH_VJ_HTTP_PROXY = ""
# maximum message length in Telegram
TECH_VJ_MAX_MESSAGE_LENGTH = 4096
# set timeout for subprocess
TECH_VJ_PROCESS_MAX_TIMEOUT = 3600
# your telegram account id
TECH_VJ_OWNER_ID = int(os.environ.get("TECH_VJ_OWNER_ID", "6357330641"))
TECH_VJ_SESSION_NAME = "VJ-URL-UPLOADER-BOT"
# database uri (mongodb)
TECH_VJ_DATABASE_URL = os.environ.get("TECH_VJ_DATABASE_URL", "mongodb+srv://Sistaanimebash:[email protected]/?retryWrites=true&w=majority&appName=Cluster0")
TECH_VJ_MAX_RESULTS = "50"
# channel information
TECH_VJ_LOG_CHANNEL = int(os.environ.get("TECH_VJ_LOG_CHANNEL", "-1002089634943")) # your log channel id and make bot admin in log channel with full right
# if you want force subscribe then give your channel id below else leave blank
tech_vj_update_channel = environ.get('TECH_VJ_UPDATES_CHANNEL', '') # your update channel id and make bot admin in update channel with full right
TECH_VJ_UPDATES_CHANNEL = int(tech_vj_update_channel) if tech_vj_update_channel and id_pattern.search(tech_vj_update_channel) else None
# Url Shortner Information
TECH_VJ = bool(environ.get('TECH_VJ', True)) # Set False If you want shortlink off else True
TECH_VJ_URL = environ.get('TECH_VJ_URL', 'publicearn.com') # your shortlink url domain or url without https://
TECH_VJ_API = environ.get('TECH_VJ_API', '0c8d50fdb269c12aea332be29c4b7a29b29784c9') # your url shortner api
TECH_VJ_TUTORIAL = os.environ.get("TECH_VJ_TUTORIAL", "https://t.me/tutorial_bash/3")
# Don't Remove Credit Tg - @VJ_Botz
# Subscribe YouTube Channel For Amazing Bot https://youtube.com/@Tech_VJ
# Ask Doubt on telegram @KingVJ01