From 65b1cc428aee8baf85ee14182fb7e84d3ad5c706 Mon Sep 17 00:00:00 2001
From: Someone <someone@somenet.org>
Date: Wed, 8 Dec 2021 19:38:38 +0100
Subject: [PATCH] [somebot] /plenum

---
 modules/CommandPlenum.py | 36 ++++++++++++++++++++++++++++++++++++
 1 file changed, 36 insertions(+)
 create mode 100644 modules/CommandPlenum.py

diff --git a/modules/CommandPlenum.py b/modules/CommandPlenum.py
new file mode 100644
index 0000000..7eccf91
--- /dev/null
+++ b/modules/CommandPlenum.py
@@ -0,0 +1,36 @@
+# Mattermost Bot module.
+#  Copyright (c) 2016-2021 by Someone <someone@somenet.org> (aka. Jan Vales <jan@jvales.net>)
+#  published under MIT-License
+
+from inspect import cleandoc
+
+
+from AbstractCommand import AbstractCommand
+class CommandPlenum(AbstractCommand):
+    TRIGGER = "plenum"
+    CONFIG = {"display_name": "somebot-command", "auto_complete": True,
+              "auto_complete_hint": "['oida'|'oidaaa']",
+             }
+    CONFIG["auto_complete_desc"] = CONFIG["description"] = "Remind of plenum."
+    USEINFO = cleandoc("""
+        Use ``/plenum`` optionally with one of the following arguments ``'oida'|'oidaaa'`` to remind a person to come to plenum.
+        """)
+
+
+    def on_POST(self, request, data):
+        msg = "## ``Plenum ist bald!``\nDa dies unser wichtigstes Entscheidungsfindungsgremium ist, wär es cool, wenn auch du vorbeischauen würdest. @all\n:warning: https://talk.fsinf.at/plenum\n"
+
+        if data["text"] == "":
+            pass
+
+        elif data["text"] == "oida":
+            msg = "***"+msg.upper()+"***"
+
+        elif data["text"] == "oidaaa":
+            msg = "PLEEEEeeEeEEnum... PleeEeeeEEeeEEeeeeeEeEeeeeeenum ...\nhttps://www.youtube.com/watch?v=Y3-VTt5CMUM @all"
+
+        else:
+            request.cmd_respond_text_temp("Die zulässigen Parameter sind: nichts, 'oida', 'oidaaa'. :)")
+            return
+
+        request.cmd_respond_text_chan(msg)
-- 
2.43.0