wikipedia: fix minor issues

This commit is contained in:
dece 2022-11-25 18:39:11 +01:00
parent f0676caa9a
commit 6e343987f0

View file

@ -54,7 +54,7 @@ class WikipediaPlugin(Plugin):
if page:
reply = WikipediaPlugin.limit_text_length(page.summary)
self.register_url_for_plus(page.url, event.target)
self.bot.say(event.target, summary)
self.bot.say(event.target, reply)
def tell_definition(self, event):
page = None
@ -70,7 +70,7 @@ class WikipediaPlugin(Plugin):
except wikipedia.exceptions.PageError:
reply = self.config["empty_response"]
break
except:
except Exception:
reply = self.bot.config["error_message"]
# Keep trying after a slight delay.
time.sleep(1)