]> git.somenet.org - pub/jan/mattermost-bot.git/blob - modules/CommandEnglish.py
modules/CommandDSARollDice.py
[pub/jan/mattermost-bot.git] / modules / CommandEnglish.py
1 # Mattermost Bot.
2 #  Copyright (c) 2016-2022 by Someone <someone@somenet.org> (aka. Jan Vales <jan@jvales.net>)
3 #  published under MIT-License
4
5 from inspect import cleandoc
6
7
8 # pylint: disable=wrong-import-position
9 from AbstractCommand import AbstractCommand
10 class CommandEnglish(AbstractCommand):
11     TRIGGER = "english"
12     CONFIG = {"display_name": "somebot-command", "auto_complete": True,
13               "auto_complete_hint": "['oida'|'oida minusf']",
14              }
15     USEINFO = CONFIG["auto_complete_desc"] = CONFIG["description"] = "Suggest to continue in (d)english."
16
17
18     def on_POST(self, request, data):
19         if data["text"] == "oida":
20             request.cmd_respond_text_chan("## ``ENGLISCH! OIDA!``")
21
22         elif data["text"] == "oida minusf":
23             request.cmd_respond_text_chan(cleandoc("""
24                 ## :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:
25                 ## :point_right: **``RED' (D)ENGLISCH! OIDA!``**
26                 ## :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:
27                 """))
28         else:
29             request.cmd_respond_text_chan("## **``ORDER! OOORDER!``**\n# :boom::hammer:\nRespect this channel's purpose!")