2024-02-06 01:04:47 +00:00
|
|
|
import scraper_functions as sf
|
|
|
|
|
2024-02-05 23:40:23 +00:00
|
|
|
def processmsg(msg, rcpt):
|
2024-02-06 01:04:47 +00:00
|
|
|
if "youtube.com/watch" in msg:
|
2024-02-06 00:03:54 +00:00
|
|
|
return msg.replace("youtube.com", "iv.datura.network")
|
2024-02-06 01:04:47 +00:00
|
|
|
elif msg.startswith("!wiki"):
|
|
|
|
return sf.query_external_website("https://en.wikipedia.org/wiki/", msg.split(" ")[1])
|
2024-02-06 00:03:54 +00:00
|
|
|
|
|
|
|
def command(msg, rcpt):
|
|
|
|
if msg.startswith("!help"):
|
|
|
|
return "chatbot commands: \n" + "!help Show this help page"
|