-
Notifications
You must be signed in to change notification settings - Fork 22
/
Copy pathsample_config.py
109 lines (96 loc) · 4.63 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
# PLEASE STOP!
# DO NOT EDIT THIS FILE OR DELETE THIS FILE
# Create a new config.py file in same directory and import, then extend this class.
import os
from telethon.tl.types import ChatBannedRights
class Config(object):
LOGGER = True
# MUST NEEDED VARS
# set this value with your name
ALIVE_NAME = os.environ.get("ALIVE_NAME", None)
# Get the values for following 2 from my.telegram.org
APP_ID = int(os.environ.get("APP_ID", 6))
API_HASH = os.environ.get("API_HASH") or None
# Get this value by running python3 stringsetup.py or https://repl.it/@ImSaravanakrish/Tamilbot#main.py
STRING_SESSION = os.environ.get("STRING_SESSION", None)
# Telegram BOT Token and bot username from @BotFather
TG_BOT_TOKEN = os.environ.get("TG_BOT_TOKEN") or os.environ.get(
"TG_BOT_TOKEN_BF_HER", None
)
TG_BOT_USERNAME = os.environ.get("TG_BOT_USERNAME") or os.environ.get(
"TG_BOT_USER_NAME_BF_HER", None
)
# get this value from http://www.timezoneconverter.com/cgi-bin/findzone.tzc
TZ = os.environ.get("TZ", "Asia/Kolkata")
# set this with required cat repo link
UPSTREAM_REPO = os.environ.get(
"UPSTREAM_REPO", "https://github.com/ivetri/Tamilbot.git"
)
# BASIC and MAIN CONFIG VARS
# Set this value with group id of private group(can be found this value by .id)
PRIVATE_GROUP_BOT_ID = int(os.environ.get("PRIVATE_GROUP_BOT_API_ID") or 0)
# Set this value same as PRIVATE_GROUP_BOT_API_ID if you need pmgaurd
PRIVATE_GROUP_ID = int(os.environ.get("PRIVATE_GROUP_ID") or 0)
# set this value with channel id of private channel use full for .frwd cmd
PRIVATE_CHANNEL_BOT_API_ID = int(os.environ.get("PRIVATE_CHANNEL_BOT_API_ID") or 0)
# for heroku plugin you can get this value from https://dashboard.heroku.com/account
HEROKU_API_KEY = os.environ.get("HEROKU_API_KEY", None)
# set this with same app name you given for heroku
HEROKU_APP_NAME = os.environ.get("HEROKU_APP_NAME", None)
# Owner id to show profile link of given id as owner
OWNER_ID = int(os.environ.get("OWNER_ID") or 0)
# Maximum no of pms should be sent before he get block will work only if you set PRIVATE_GROUP_ID
MAX_FLOOD_IN_PMS = int(os.environ.get("MAX_FLOOD_IN_PMS", 5))
# remove background api get it from revome.bg
REM_BG_API_KEY = os.environ.get("REM_BG_API_KEY", None)
# set this with group id so it keeps notifying about your tagged messages or pms
PM_LOGGER_GROUP_ID = int(
os.environ.get("PM_LOGGER_GROUP_ID")
or os.environ.get("PM_LOGGR_BOT_API_ID")
or 0
)
# Custom vars for userbot
# set this will channel id of your custom plugins
# for custom thumb image set this with your required thumb telegraoh link
THUMB_IMAGE = os.environ.get(
"THUMB_IMAGE", "https://telegra.ph/file/2790938cacb9aa80d478c.jpg"
)
# specify NO_LOAD with plugin names for not loading in userbot
NO_LOAD = [x for x in os.environ.get("NO_LOAD", "").split()]
# For custom alive pic
ALIVE_PIC = os.environ.get("ALIVE_PIC", None)
# for Custom pmpermit pic
PMPERMIT_PIC = os.environ.get("PMPERMIT_PIC", None)
# for custom pic for .digitalpfp
DEFAULT_NAME = os.environ.get("DEFAULT_NAME", None)
# forcustomizing pmpermit text
CUSTOM_PMPERMIT_TEXT = os.environ.get("CUSTOM_PMPERMIT_TEXT", None)
# number of rows of buttons to be displayed in .help command
# emoji to be displayed in .help
EMOJI_TO_DISPLAY_IN_HELP = os.environ.get("EMOJI_TO_DISPLAY_IN_HELP", " ")
# 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", r"\.")
# set this with required folder path to act as download folder
TMP_DOWNLOAD_DIRECTORY = os.environ.get("TMP_DOWNLOAD_DIRECTORY", "./downloads")
# set this with required folder path to act as temparary folder
TEMP_DIR = os.environ.get("TEMP_DIR", "./temp/")
# For custom stickerpack names
# 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
# specify LOAD and NO_LOAD
LOAD = []
# warn mode for anti flood
ANTI_FLOOD_WARN_MODE = ChatBannedRights(
until_date=None, view_messages=None, send_messages=True
)
# time.py
COUNTRY = str(os.environ.get("COUNTRY", ""))
TZ_NUMBER = int(os.environ.get("TZ_NUMBER", 1))
# For updater plugin
UPSTREAM_REPO_BRANCH = os.environ.get("UPSTREAM_REPO_BRANCH", "master")
class Production(Config):
LOGGER = False
class Development(Config):
LOGGER = True