From 6b3a3853c3d5d670329a9de0b66b71fdc295fc48 Mon Sep 17 00:00:00 2001 From: fram3d Date: Tue, 6 Feb 2024 01:03:54 +0100 Subject: [PATCH] add help command --- functions.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/functions.py b/functions.py index 1631ce8..6a2fc5c 100644 --- a/functions.py +++ b/functions.py @@ -1,5 +1,9 @@ def processmsg(msg, rcpt): - if msg.startswith("!"): - return "" - elif "youtube.com/watch" in msg: - return msg.replace("youtube.com", "iv.datura.network") + if msg.startswith("!"): + return command(msg, rcpt) + elif "youtube.com/watch" in msg: + return msg.replace("youtube.com", "iv.datura.network") + +def command(msg, rcpt): + if msg.startswith("!help"): + return "chatbot commands: \n" + "!help Show this help page"