chatbot/functions.py

12 lines
413 B
Python
Raw Normal View History

import scraper_functions as sf
2024-02-05 23:40:23 +00:00
def processmsg(msg, rcpt):
if "youtube.com/watch" in msg:
2024-02-06 00:03:54 +00:00
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])
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"