From: Someone Date: Thu, 18 Jun 2020 23:32:13 +0000 (+0200) Subject: [somebot] /english ["oida"|"oida minusf"] X-Git-Url: https://git.somenet.org/pub/jan/mattermost.git/commitdiff_plain/a7ada9244ff7edb6369815254d4147a053241049?hp=e0eb3e99de83d24eb38eefdf4302b2c0ed3b5f7a [somebot] /english ["oida"|"oida minusf"] --- diff --git a/somebot/modules/CommandEnglish.py b/somebot/modules/CommandEnglish.py new file mode 100644 index 0000000..c9fa8bd --- /dev/null +++ b/somebot/modules/CommandEnglish.py @@ -0,0 +1,29 @@ +# Mattermost Bot. +# Copyright (c) 2016-2020 by Someone (aka. Jan Vales ) +# published under MIT-License + +import inspect + + +from AbstractCommand import * +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 emglish." + + + 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(inspect.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' ENDLISCH! 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!") +