fix wiki commands
This commit is contained in:
@@ -5,7 +5,7 @@ def processmsg(msg, rcpt):
|
||||
if "youtube.com/watch" in msg:
|
||||
return msg.replace("youtube.com", "iv.datura.network")
|
||||
elif msg.startswith("!"):
|
||||
return command(msg)
|
||||
return command(msg)
|
||||
elif "good bot" in msg:
|
||||
return "^_^"
|
||||
|
||||
@@ -21,5 +21,6 @@ def command(msg, rcpt):
|
||||
response = client.chat(model='llama2-uncensored:latest', messages=[{'role':'user','content':f'{msg[4:]}'}])
|
||||
return(response['message']['content'])
|
||||
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)
|
||||
|
||||
|
Reference in New Issue
Block a user