File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change 55
66import yaml
77from dotenv import load_dotenv
8+ from loguru import logger
89
910from tux import __version__ as app_version
1011from tux .utils .env import get_bot_token , get_database_url , is_dev_mode
@@ -40,7 +41,16 @@ class Config:
4041 # Permissions
4142 BOT_OWNER_ID : Final [int ] = config ["USER_IDS" ]["BOT_OWNER" ]
4243 SYSADMIN_IDS : Final [list [int ]] = config ["USER_IDS" ]["SYSADMINS" ]
43- ALLOW_SYSADMINS_EVAL : Final [bool ] = config ["ALLOW_SYSADMINS_EVAL" ]
44+ # ALLOW_SYSADMINS_EVAL: Final[bool] = config["ALLOW_SYSADMINS_EVAL"]
45+ # default to false if not specified in config
46+ _allow_sysadmins_eval = config .get ("ALLOW_SYSADMINS_EVAL" )
47+ if _allow_sysadmins_eval is None :
48+ logger .warning (
49+ "ALLOW_SYSADMINS_EVAL not found in config, defaulting to False. "
50+ "If you want to use the old behavior, please set it to True in your config." ,
51+ )
52+ _allow_sysadmins_eval = False
53+ ALLOW_SYSADMINS_EVAL : Final [bool ] = _allow_sysadmins_eval
4454
4555 # Production env
4656 DEFAULT_PROD_PREFIX : Final [str ] = config ["BOT_INFO" ]["PROD_PREFIX" ]
You can’t perform that action at this time.
0 commit comments