[somebot] /english
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/CommandEnglish.py [new file with mode: 0644]

diff --git a/modules/CommandEnglish.py b/modules/CommandEnglish.py
new file mode 100644 (file)
index 0000000..8ee0e4d
--- /dev/null
@@ -0,0 +1,28 @@
+# Mattermost Bot.
+#  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 CommandEnglish(AbstractCommand):
+    TRIGGER = "english"
+    CONFIG = {"display_name": "somebot-command", "auto_complete": True,
+              "auto_complete_hint": "['oida'|'oida minusf']",
+             }
+    USEINFO = CONFIG["auto_complete_desc"] = CONFIG["description"] = "Suggest to continue in (d)english."
+
+
+    def on_POST(self, request, data):
+        if data["text"] == "oida":
+            request.cmd_respond_text_chan("## ``ENGLISCH! OIDA!``")
+
+        elif data["text"] == "oida minusf":
+            request.cmd_respond_text_chan(cleandoc("""
+                ## :warning::point_down::point_down::point_down::point_down::point_down::point_down::point_down::point_down::point_down::point_down::point_down::point_down::point_down:
+                ## :point_right: **``RED' (D)ENGLISCH! OIDA!``**
+                ## :warning::point_up::point_up_2::point_up::point_up_2::point_up::point_up_2::point_up::point_up_2::point_up::point_up_2::point_up::point_up_2::point_up:
+                """))
+        else:
+            request.cmd_respond_text_chan("## **``ORDER! OOORDER!``**\n# :boom::hammer:\nRespect this channel's purpose!")