1 # Mattermost Bot module.
2 # Copyright (c) 2016-2022 by Someone <someone@somenet.org> (aka. Jan Vales <jan@jvales.net>)
3 # published under MIT-License
5 from inspect import cleandoc
8 from AbstractCommand import AbstractCommand
9 class CommandPlenum(AbstractCommand):
11 CONFIG = {"display_name": "somebot-command", "auto_complete": True,
12 "auto_complete_hint": "['oida'|'oidaaa']",
14 CONFIG["auto_complete_desc"] = CONFIG["description"] = "Remind of plenum."
15 USEINFO = cleandoc("""
16 Use ``/plenum`` optionally with one of the following arguments ``'oida'|'oidaaa'`` to remind a person to come to plenum.
20 def on_POST(self, request, data):
21 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"
23 if data["text"] == "":
26 elif data["text"] == "oida":
27 msg = "***"+msg.upper()+"***"
29 elif data["text"] == "oidaaa":
30 msg = "PLEEEEeeEeEEnum... PleeEeeeEEeeEEeeeeeEeEeeeeeenum ...\nhttps://www.youtube.com/watch?v=Y3-VTt5CMUM @all"
33 request.cmd_respond_text_temp("Die zulässigen Parameter sind: nichts, 'oida', 'oidaaa'. :)")
36 request.cmd_respond_text_chan(msg)