|
|
|
@ -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
|
|
|
|
|