Multiword wiki query added

This commit is contained in:
texhno 2024-02-06 02:49:40 +01:00
parent 9704474c29
commit 4ca01a868d

View File

@ -5,7 +5,8 @@ def processmsg(msg, rcpt):
if "youtube.com/watch" in msg: if "youtube.com/watch" in msg:
return msg.replace("youtube.com", "iv.datura.network") return msg.replace("youtube.com", "iv.datura.network")
elif msg.startswith("!wiki"): elif msg.startswith("!wiki"):
return sf.query_external_website("https://en.wikipedia.org/wiki/", msg.split(" ")[1]) cmd, query = msg.split(" ", 1)
return sf.query_external_website("https://en.wikipedia.org/wiki/", query)
elif "good bot" in msg: elif "good bot" in msg:
return "^_^" return "^_^"