diff --git a/bot_libs/syms.py b/bot_libs/syms.py index 3319e44..e46a3a1 100644 --- a/bot_libs/syms.py +++ b/bot_libs/syms.py @@ -1,9 +1,26 @@ import os as _os +_MISSING_LOCAL_SETTINGS= """ +=============== ERROR =============== + + Missing local configurations: + create: local_settings.py + with these settings: + + TOKEN= '' # created using https://t.me/BotFather + BOT_PATH= '/path/of/your/repo/directory' # used for upstart command + LOG_PATH= '/path/where/you/place/logs' # used to save daily logs + BOT_EXEC_CMD= 'python /path/of/your/repo/directory/bot.py' # the command you use to launch the bot instance + SUPER_USERS= [] # this is the superuser, allowed to use special commands (upstart and logs) + +===================================== +""" + + try: from local_settings import TOKEN as _token TOKEN= _token -except: TOKEN= 'XXX' +except: print(_MISSING_LOCAL_SETTINGS) try: from local_settings import BOT_PATH as _bot_path BOT_PATH= _os.path.expanduser(_bot_path) @@ -11,7 +28,7 @@ except: BOT_PATH= '' try: from local_settings import LOG_PATH as _log_path LOG_PATH= _os.path.expanduser(_log_path) -except: LOG_PATH= '' +except: LOG_PATH= '/tmp' try: from local_settings import BOT_EXEC_CMD as _bot_exec_cmd BOT_EXEC_CMD= _bot_exec_cmd