From 76d4c99ec1990232efb5cd70fe5739fb882c1ae6 Mon Sep 17 00:00:00 2001 From: deathbybandaid Date: Thu, 19 Sep 2019 09:14:43 -0400 Subject: [PATCH] module patch --- sopel_modules/SpiceBot/Read.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/sopel_modules/SpiceBot/Read.py b/sopel_modules/SpiceBot/Read.py index 79c3ff6..2834525 100644 --- a/sopel_modules/SpiceBot/Read.py +++ b/sopel_modules/SpiceBot/Read.py @@ -223,6 +223,13 @@ class BotRead(): if "hardcoded_channel_block" not in list(dict_from_file.keys()): dict_from_file["hardcoded_channel_block"] = [] + # ensure creation of '?default' + if "?default" not in list(dict_from_file.keys()): + dict_from_file["?default"] = {} + + if "responses" not in list(dict_from_file["?default"].keys()): + dict_from_file["?default"]["responses"] = [] + return dict_from_file