From bc6ebd999a97ddcaf49e2c4f44dc814f8a9f5470 Mon Sep 17 00:00:00 2001 From: Someone Date: Wed, 8 Dec 2021 19:38:38 +0100 Subject: [PATCH] [somebot] /faq --- modules/CommandFAQ.py | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 modules/CommandFAQ.py diff --git a/modules/CommandFAQ.py b/modules/CommandFAQ.py new file mode 100644 index 0000000..50137a0 --- /dev/null +++ b/modules/CommandFAQ.py @@ -0,0 +1,24 @@ +# Mattermost Bot module. +# Copyright (c) 2016-2021 by Someone (aka. Jan Vales ) +# published under MIT-License + +from inspect import cleandoc + + +from AbstractCommand import AbstractCommand +class CommandFAQ(AbstractCommand): + TRIGGER = "faq" + CONFIG = {"display_name": "somebot-command", "auto_complete": True, + "auto_complete_hint": "", + } + USEINFO = CONFIG["auto_complete_desc"] = CONFIG["description"] = "Link fsinf-faq." + + + def on_POST(self, request, data): + msg = cleandoc("""``AUTODELETE-DAY`` + Kennst du schon ... + ### [... die FAQs der FSInf?](https://www.fsinf.at/faq) + Vielleicht findest du ja dort eine passende Antwort zu deiner Frage + """) + + request.cmd_respond_text_chan(msg) -- 2.43.0