1 # Mattermost Bot module.
2 # Copyright (c) 2016-2021 by Someone <someone@somenet.org> (aka. Jan Vales <jan@jvales.net>)
3 # published under MIT-License
8 from AbstractCommand import AbstractCommand
9 class CommandToss(AbstractCommand):
11 CONFIG = {"display_name": "somebot-command", "auto_complete": True,
12 "auto_complete_hint": "<any search term>",
14 USEINFO = CONFIG["auto_complete_desc"] = CONFIG["description"] = "Use TOSS."
17 def on_POST(self, request, data):
18 msg = "#### Let me :toss: that for you :)\n:arrow_right: https://toss.fsinf.at/?q="+requests.utils.quote(data["text"])
19 request.cmd_respond_text_chan(msg)