From 32d7296a07c53694c811bef47cac534790c7a3ad Mon Sep 17 00:00:00 2001 From: Someone Date: Wed, 8 Dec 2021 19:38:38 +0100 Subject: [PATCH] [somebot] /order ["oida"|"oida minusf"] --- modules/CommandOrder.py | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 modules/CommandOrder.py diff --git a/modules/CommandOrder.py b/modules/CommandOrder.py new file mode 100644 index 0000000..d333369 --- /dev/null +++ b/modules/CommandOrder.py @@ -0,0 +1,37 @@ +# Mattermost Bot module. +# Copyright (c) 2016-2021 by Someone (aka. Jan Vales ) +# published under MIT-License + +from inspect import cleandoc + + +from AbstractCommand import AbstractCommand +class CommandOrder(AbstractCommand): + TRIGGER = "order" + CONFIG = {"display_name": "somebot-command", "auto_complete": True, + "auto_complete_hint": "['oida'|'oida minusf'|'--video']", + } + USEINFO = CONFIG["auto_complete_desc"] = CONFIG["description"] = "Call for order." + + + def on_POST(self, request, data): + if data["text"] == "": + request.cmd_respond_text_chan("## **``ORDER! OOORDER!``**\n# :boom::hammer:\nRespect this channel's purpose!") + + elif 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(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: + """)) + + elif data["text"] == "--video": + request.cmd_respond_text_chan("## **``ORDER! OOORDER!``**\nhttps://youtu.be/VYycQTm2HrM") + + else: + request.cmd_respond_text_temp("Permitted agruments: nothing, `oida`, `oida minusf`, `--video` :)") -- 2.43.0