1 # Mattermost Bot module.
2 # Copyright (c) 2016-2022 by Someone <someone@somenet.org> (aka. Jan Vales <jan@jvales.net>)
3 # published under MIT-License
5 from inspect import cleandoc
8 from AbstractCommand import AbstractCommand
9 class CommandOrder(AbstractCommand):
11 CONFIG = {"display_name": "somebot-command", "auto_complete": True,
12 "auto_complete_hint": "['oida'|'oida minusf'|'--video']",
14 USEINFO = CONFIG["auto_complete_desc"] = CONFIG["description"] = "Call for order."
17 def on_POST(self, request, data):
18 if data["text"] == "":
19 request.cmd_respond_text_chan("## **``ORDER! OOORDER!``**\n# :boom::hammer:\nRespect this channel's purpose!")
21 elif data["text"] == "oida":
22 request.cmd_respond_text_chan("## **``ORDER! OIDA!``**\n# :boom::hammer: :boom::hammer: :boom::hammer:\nRespect this channel's purpose!")
24 elif data["text"] == "oida minusf":
25 request.cmd_respond_text_chan(cleandoc("""
26 ## :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:
27 ## :point_right: **``ORDER! OIDA!``**
28 # :point_right: :boom::hammer: :boom::hammer: :boom::hammer: :boom::hammer: :boom::hammer:
29 ## :point_right: **``This channel's purpose! OIDA!``**
30 ## :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:
33 elif data["text"] == "--video":
34 request.cmd_respond_text_chan("## **``ORDER! OOORDER!``**\nhttps://youtu.be/VYycQTm2HrM")
37 request.cmd_respond_text_temp("Permitted agruments: nothing, `oida`, `oida minusf`, `--video` :)")