-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsample_config.py
54 lines (44 loc) · 2.51 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
# Create a new config.py or rename this to config.py file in same dir and import, then extend this class.
import json
import os
def get_user_list(config, key):
with open('{}/tg_bot/{}'.format(os.getcwd(), config), 'r') as json_file:
return json.load(json_file)[key]
# Create a new config.py or rename this to config.py file in same dir and import, then extend this class.
class Config(object):
LOGGER = True
# REQUIRED
API_KEY = "YOUR BOT TOKEN HERE"
OWNER_ID = "YOUR OWN ID HERE" # If you dont know, run the bot and do /id in your private chat with it
OWNER_USERNAME = "YOUR USERNAME HERE"
# RECOMMENDED
SQLALCHEMY_DATABASE_URI = 'sqldbtype://username:pw@hostname:port/db_name' # needed for any database modules
MESSAGE_DUMP = None # needed to make sure 'save from' messages persist
GBAN_LOGS = None #Channel ID here with -
LOAD = []
NO_LOAD = ['translation', 'rss']
WEBHOOK = False
URL = None
# OPTIONAL
#ID Seperation format [1,2,3,4]
SUDO_USERS = get_user_list('elevated_users.json', 'sudos') # List of id's - (not usernames) for users which have sudo access to the bot.
DEV_USERS = get_user_list('elevated_users.json', 'devs') # List of id's - (not usernames) for developers who will have the same perms as the owner
SUPPORT_USERS = get_user_list('elevated_users.json', 'supports') # List of id's (not usernames) for users which are allowed to gban, but can also be banned.
WHITELIST_USERS = get_user_list('elevated_users.json', 'whitelists') # List of id's (not usernames) for users which WONT be banned/kicked by the bot.
CERT_PATH = None
PORT = 5000
DEL_CMDS = False #Delete commands that users dont have access to, like delete /ban if a non admin uses it.
STRICT_GBAN = False
STRICT_GMUTE = False
WORKERS = 8 # Number of subthreads to use. Set as number of threads your processor uses
BAN_STICKER = 'CAADAgADOwADPPEcAXkko5EB3YGYAg' # banhammer marie sticker
ALLOW_EXCL = False # Allow ! commands as well as /
CASH_API_KEY = None # Get one from https://www.alphavantage.co/support/#api-key
TIME_API_KEY = None # Get one from https://timezonedb.com/register
API_OPENWEATHER = False #Get API_OPENWEATHER FROM OFFICAL SITE https://da.gd/VAW3
AI_API_KEY = None # Coffeehouse chatbot api key, get one from https://coffeehouse.intellivoid.info/
WALL_API = None # Get one from https://wall.alphacoders.com/api.php
class Production(Config):
LOGGER = True
class Development(Config):
LOGGER = True