From 2e47ffa029374b311b7680beb903cd32c024fe79 Mon Sep 17 00:00:00 2001 From: Twentysix Date: Sun, 28 Feb 2016 18:54:58 +0100 Subject: [PATCH] hotfix for rollback --- red.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/red.py b/red.py index 84b0f696f..90d162ace 100644 --- a/red.py +++ b/red.py @@ -389,6 +389,15 @@ def check_configs(): with open(settings_path, "w") as f: f.write(json.dumps(settings)) + else: # Undoing the changes made by the broken pull request + data = load_settings() + if "default" in data: + data["ADMIN_ROLE"] = data["default"]["ADMIN_ROLE"] + data["MOD_ROLE"] = data["default"]["MOD_ROLE"] + del data["default"] + print("Rolling back settings to previous format...") + with open(settings_path, "w") as f: + f.write(json.dumps(data, indent=4,sort_keys=True,separators=(',',' : '))) cogs_s_path = "data/red/cogs.json" cogs = {}