diff --git a/config.json.example b/config.json.example index 0ec359e..46d7318 100644 --- a/config.json.example +++ b/config.json.example @@ -6,6 +6,7 @@ "channels": ["#idi0crates"], "speak_delay": 0.5, "resources_dir": "resources", + "error_message": "An error occured, sorry!", "plugins": { "beers": { "commands": ["beer"], @@ -41,7 +42,6 @@ "lang": "en", "ambiguous_response": "It is ambiguous.", "empty_response": "I can't find it.", - "error_response": "An error occured ;(" } } } diff --git a/edmond/plugins/wikipedia.py b/edmond/plugins/wikipedia.py index 394559a..915fa2c 100644 --- a/edmond/plugins/wikipedia.py +++ b/edmond/plugins/wikipedia.py @@ -12,8 +12,7 @@ from edmond.plugin import Plugin class WikipediaPlugin(Plugin): REQUIRED_CONFIGS = [ - "commands", "ambiguous_response", "empty_response", "error_response", - "lang", + "commands", "ambiguous_response", "empty_response", "lang", ] NUM_RETRIES = 3 @@ -59,7 +58,7 @@ class WikipediaPlugin(Plugin): summary = self.config["empty_response"] break except wikipedia.exceptions.WikipediaException: - summary = self.config["error_response"] + summary = self.bot.config["error_message"] # Keep trying after a slight delay. time.sleep(1) retries -= 1