-
Notifications
You must be signed in to change notification settings - Fork 31
/
Copy pathsample_config.py
183 lines (164 loc) · 8.21 KB
/
sample_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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
# PLEASE STOP!
# DO NOT EDIT THIS FILE
# Create a new config.py file in same dir and import, then extend this class.
import os
class Config:
LOGGER = True
# Get this value from my.telegram.org! Please do not steal
APP_ID = int(os.environ.get("APP_ID", 6))
API_HASH = os.environ.get("API_HASH", "eb06d4abfb49dc3eeb1aeb98ae0f581e")
# string session for running on Heroku
# some people upload their session files on GitHub or other third party hosting
# websites, this might prevent the un-authorized use of the
# confidential session files
HU_STRING_SESSION = os.environ.get("HU_STRING_SESSION", None)
# Get your own APPID from https://api.openweathermap.org/data/2.5/weather
OPEN_WEATHER_MAP_APPID = os.environ.get("OPEN_WEATHER_MAP_APPID", None)
# Send .get_id in any group to fill this value.
PRIVATE_GROUP_BOT_API_ID = os.environ.get("PRIVATE_GROUP_BOT_API_ID", None)
if PRIVATE_GROUP_BOT_API_ID:
PRIVATE_GROUP_BOT_API_ID = int(PRIVATE_GROUP_BOT_API_ID)
# tag channel
TAG_CHANNEL = os.environ.get("TAG_CHANNEL", None)
if TAG_CHANNEL:
TAG_CHANNEL = int(TAG_CHANNEL)
# Send .get_id in any channel to fill this value. ReQuired for @Manuel15 inspiration to work!
PRIVATE_CHANNEL_BOT_API_ID = os.environ.get(
"PRIVATE_CHANNEL_BOT_API_ID", None)
if PRIVATE_CHANNEL_BOT_API_ID:
PRIVATE_CHANNEL_BOT_API_ID = int(PRIVATE_CHANNEL_BOT_API_ID)
# Send .get_id in any group with all your administration bots (added)
G_BAN_LOGGER_GROUP = os.environ.get("G_BAN_LOGGER_GROUP", None)
if G_BAN_LOGGER_GROUP:
G_BAN_LOGGER_GROUP = int(G_BAN_LOGGER_GROUP)
PM_LOGGR_BOT_API_ID = os.environ.get("PM_LOGGR_BOT_API_ID", None)
if PM_LOGGR_BOT_API_ID:
PM_LOGGR_BOT_API_ID = int(PM_LOGGR_BOT_API_ID)
SPAM_WATCH_LOG_CHANNEL = os.environ.get("SPAM_WATCH_LOG_CHANNEL", None)
if SPAM_WATCH_LOG_CHANNEL:
SPAM_WATCH_LOG_CHANNEL = int(SPAM_WATCH_LOG_CHANNEL)
# RSS_POST_MSG_GROUP_ID = map(int, os.environ.get("RSS_POST_MSG_GROUP_ID", None).split())
RSS_POST_MSG_GROUP_ID = os.environ.get("RSS_POST_MSG_GROUP_ID", None)
if RSS_POST_MSG_GROUP_ID:
RSS_POST_MSG_GROUP_ID = int(RSS_POST_MSG_GROUP_ID)
# This is required for the plugins involving the file system.
TMP_DOWNLOAD_DIRECTORY = os.environ.get(
"TMP_DOWNLOAD_DIRECTORY", "./DOWNLOADS/")
# This is required for the hash to torrent file functionality to work.
HASH_TO_TORRENT_API = os.environ.get(
"HASH_TO_TORRENT_API", "https://example.com/torrent/{}")
# This is required for the @telegraph functionality.
TELEGRAPH_SHORT_NAME = os.environ.get("TELEGRAPH_SHORT_NAME", "UniBorg")
# Get a Free API Key from OCR.Space
OCR_SPACE_API_KEY = os.environ.get("OCR_SPACE_API_KEY", None)
# TG API limit. An album can have atmost 10 media!
TG_GLOBAL_ALBUM_LIMIT = int(os.environ.get("TG_GLOBAL_ALBUM_LIMIT", 9))
# Telegram BOT Token from @BotFather
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)
#
NC_LOG_P_M_S = bool(os.environ.get("NC_LOG_P_M_S", False))
#
# DO NOT EDIT BELOW THIS LINE IF YOU DO NOT KNOW WHAT YOU ARE DOING
# TG API limit. A message can have maximum 4096 characters!
MAX_MESSAGE_SIZE_LIMIT = 4095
# set blacklist_chats where you do not want userbot's features
UB_BLACK_LIST_CHAT = {int(x) for x in os.environ.get(
"UB_BLACK_LIST_CHAT", "").split()}
# specify LOAD and NO_LOAD
LOAD = []
# folowing plugins won't work on Heroku,
# because of their ephemeral file system
NO_LOAD = [
"antispam",
"lydia",
"f_notification_p"
]
# Get your own API key from https://www.remove.bg/ or
# feel free to use http://telegram.dog/Remove_BGBot
REM_BG_API_KEY = os.environ.get("REM_BG_API_KEY", None)
# For Databases
# can be None in which case plugins requiring
# DataBase would not work
DB_URI = os.environ.get("DATABASE_URL", None)
# number of rows of buttons to be displayed in .helpme command
NO_OF_BUTTONS_DISPLAYED_IN_H_ME_CMD = int(
os.environ.get("NO_OF_BUTTONS_DISPLAYED_IN_H_ME_CMD", 5))
# specify command handler that should be used for the plugins
# this should be a valid "regex" pattern
COMMAND_HAND_LER = os.environ.get("COMMAND_HAND_LER", "\.")
# specify list of users allowed to use bot
# WARNING: be careful who you grant access to your bot.
# malicious users could do ".exec rm -rf /*"
SUDO_USERS = {int(x) for x in os.environ.get("SUDO_USERS", "").split()}
# VeryStream only supports video formats
VERY_STREAM_LOGIN = os.environ.get("VERY_STREAM_LOGIN", None)
VERY_STREAM_KEY = os.environ.get("VERY_STREAM_KEY", None)
# Google Drive ()
IS_TEAM_DRIVE = os.environ.get("IS_TEAM_DRIVE", False)
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")
#
TELE_GRAM_2FA_CODE = os.environ.get("TELE_GRAM_2FA_CODE", None)
#
GROUP_REG_SED_EX_BOT_S = os.environ.get(
"GROUP_REG_SED_EX_BOT_S", r"(regex|moku|BananaButler_|rgx|l4mR)bot")
# rapidleech plugins
OPEN_LOAD_LOGIN = os.environ.get("OPEN_LOAD_LOGIN", "0")
OPEN_LOAD_KEY = os.environ.get("OPEN_LOAD_KEY", "0")
# Google Chrome Selenium Stuff
# taken from https://github.com/jaskaranSM/UniBorg/blob/9072e3580cc6c98d46f30e41edbe73ffc9d850d3/sample_config.py#L104-L106
GOOGLE_CHROME_DRIVER = os.environ.get("GOOGLE_CHROME_DRIVER", None)
GOOGLE_CHROME_BIN = os.environ.get("GOOGLE_CHROME_BIN", None)
# spotify stuff
DEFAULT_BIO = os.environ.get("DEFAULT_BIO", None)
SPOTIFY_INITIAL_BIO = os.environ.get("SPOTIFY_INITIAL_BIO", None)
SPOTIFY_BIO_PREFIX = os.environ.get("SPOTIFY_BIO_PREFIX", None)
SPOTIFY_KEY = os.environ.get("SPOTIFY_KEY", None)
SPOTIFY_DC = os.environ.get("SPOTIFY_DC", None)
LYDIA_API = os.environ.get("LYDIA_API", None)
DEFAULT_NAME = os.environ.get("DEFAULT_NAME", None)
#
# define "spam" in PMs
MAX_FLOOD_IN_P_M_s = int(os.environ.get("MAX_FLOOD_IN_P_M_s", 3))
# leave this blank, should be automatically filled for Heroku.com users
# define the "types" that should be uplaoded as streamable
TL_VID_STREAM_TYPES = ("MKV", "MP4", "WEBM")
TL_MUS_STREAM_TYPES = ("MP3", "WAV", "FLAC")
YOUTUBE_API_KEY = os.environ.get("YOUTUBE_API_KEY", None)
ANTI_SPAMBOT = os.environ.get("ANTI_SPAMBOT", None)
ANTI_SPAMBOT_SHOUT = os.environ.get("ANTI_SPAMBOT_SHOUT", None)
API_TOKEN = os.environ.get("API_TOKEN", None)
BOTLOG = os.environ.get("BOTLOG", None)
MIRROR_ACE_API_KEY = os.environ.get("MIRROR_ACE_API_KEY", None)
MIRROR_ACE_API_TOKEN = os.environ.get("MIRROR_ACE_API_TOKEN", None)
SPAM_WATCH_API = os.environ.get("SPAM_WATCH_API", None)
SPAM_WATCHAPI = os.environ.get("SPAM_WATCHAPI", None)
# Userbot logging feature switch.
LOGSPAMMER = os.environ.get("LOGSPAMMER", None)
# the bot will not work unless this is set
MONGO_DB_URI = os.environ.get("MONGO_DB_URI", None)
# Google Photos ()
G_PHOTOS_CLIENT_ID = os.environ.get("G_PHOTOS_CLIENT_ID", None)
G_PHOTOS_CLIENT_SECRET = os.environ.get("G_PHOTOS_CLIENT_SECRET", None)
G_PHOTOS_AUTH_TOKEN_ID = int(
os.environ.get("G_PHOTOS_AUTH_TOKEN_ID", "-100"))
# Heroku stuff
HEROKU_APP_NAME = os.environ.get("HEROKU_APP_NAME", None)
HEROKU_API_KEY = os.environ.get("HEROKU_API_KEY", None)
# for video trimming and screenshot plugins
FF_MPEG_DOWN_LOAD_MEDIA_PATH = os.environ.get(
"FF_MPEG_DOWN_LOAD_MEDIA_PATH", None)
INSTA_ID = os.environ.get("INSTA_ID", None)
INSTA_PASS = os.environ.get("INSTA_PASS", None)
# github api and update plugin
UPSTREAM_REPO_URL = "https://github.com/muhammedfurkan/TelethonUserBot.git"
GOFILE_EMAIL = os.environ.get("GOFILE_EMAIL", None)
STREAM_TAPE_LOGIN = os.environ.get("STREAM_TAPE_LOGIN", None)
STREAM_TAPE_KEY = os.environ.get("STREAM_TAPE_KEY", None)
GO_FILE_API = os.environ.get("GO_FILE_API", None)
class Production(Config):
LOGGER = False
class Development(Config):
LOGGER = True