diff --git a/modules/utils.py b/modules/utils.py index b43c5ff..6a761e0 100644 --- a/modules/utils.py +++ b/modules/utils.py @@ -68,7 +68,11 @@ def configGet(key: str, *args: str, file: str = "config"): * any: Value of provided key """ if file == "config": - this_dict = jsonLoad("config.json") + try: + this_dict = jsonLoad("config.json") + except FileNotFoundError: + print("Config file not found! Copy config_example.json to config.json, configure it and rerun the bot!") + exit() else: this_dict = jsonLoad(f"data{sep}users{sep}{file}.json") this_key = this_dict