[somebot] /hot
authorSomeone <someone@somenet.org>
Wed, 8 Dec 2021 18:38:38 +0000 (19:38 +0100)
committerSomeone <someone@somenet.org>
Wed, 8 Dec 2021 18:38:38 +0000 (19:38 +0100)
modules/CommandHot.py [new file with mode: 0644]

diff --git a/modules/CommandHot.py b/modules/CommandHot.py
new file mode 100644 (file)
index 0000000..39acfc0
--- /dev/null
@@ -0,0 +1,26 @@
+# Mattermost Bot module.
+#  Copyright (c) 2016-2021 by Someone <someone@somenet.org> (aka. Jan Vales <jan@jvales.net>)
+#  published under MIT-License
+# Idea by @x5468656f
+
+from inspect import cleandoc
+
+
+from AbstractCommand import AbstractCommand
+class CommandHot(AbstractCommand):
+    TRIGGER = "hot"
+    CONFIG = {"display_name": "somebot-command", "auto_complete": True,
+              "auto_complete_hint": "",
+             }
+    USEINFO = CONFIG["auto_complete_desc"] = CONFIG["description"] = "Remind participants of a discussion to cool off a little."
+
+
+    def on_POST(self, request, data):
+        msg = cleandoc("""
+                :fire::fire::fire::fire::fire::fire:
+                ##### This discussion seems to have taken an unhealthy trajectory.
+                **``We would like to remember all participants to stay as objective, nice and cool as possible!``**
+                :fire::fire::fire::fire::fire::fire:
+            """)
+
+        request.cmd_respond_text_chan(msg)