From 0d7de748602847d3a52c9f28650438c509c62ea0 Mon Sep 17 00:00:00 2001 From: Someone Date: Fri, 19 Jun 2020 01:32:13 +0200 Subject: [PATCH] [somebot] /order ["oida"|"oida minusf"] --- somebot/modules/CommandOrder.py | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 somebot/modules/CommandOrder.py diff --git a/somebot/modules/CommandOrder.py b/somebot/modules/CommandOrder.py new file mode 100644 index 0000000..787d563 --- /dev/null +++ b/somebot/modules/CommandOrder.py @@ -0,0 +1,31 @@ +# Mattermost Bot. +# Copyright (c) 2016-2020 by Someone (aka. Jan Vales ) +# published under MIT-License + +import inspect + + +from AbstractCommand import * +class CommandOrder(AbstractCommand): + TRIGGER = "order" + CONFIG = {"display_name": "somebot-command", "auto_complete": True, + "auto_complete_hint": "['oida'|'oida minusf']", + } + USEINFO = CONFIG["auto_complete_desc"] = CONFIG["description"] = "Call for order." + + + def on_POST(self, request, data): + if data["text"] == "oida": + request.cmd_respond_text_chan("## **``ORDER! OIDA!``**\n# :boom::hammer: :boom::hammer: :boom::hammer:\nRespect this channel's purpose!") + + 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: **``ORDER! OIDA!``** + # :point_right: :boom::hammer: :boom::hammer: :boom::hammer: :boom::hammer: :boom::hammer: + ## :point_right: **``This channel's purpose! 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!") + -- 2.43.0