From 4ca01a868d0d2c68f89e3ba7e5feb9805f10655b Mon Sep 17 00:00:00 2001 From: texhno Date: Tue, 6 Feb 2024 02:49:40 +0100 Subject: [PATCH] Multiword wiki query added --- functions.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/functions.py b/functions.py index 571458e..a596c7f 100644 --- a/functions.py +++ b/functions.py @@ -5,7 +5,8 @@ def processmsg(msg, rcpt): if "youtube.com/watch" in msg: return msg.replace("youtube.com", "iv.datura.network") 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: return "^_^"