From d33a115ef223f0cfcd89da417c589a1b005b47fe Mon Sep 17 00:00:00 2001 From: Someone Date: Fri, 19 Jun 2020 01:32:13 +0200 Subject: [PATCH] [somebot] /toss --- somebot/modules/CommandToss.py | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 somebot/modules/CommandToss.py diff --git a/somebot/modules/CommandToss.py b/somebot/modules/CommandToss.py new file mode 100644 index 0000000..e8b2c80 --- /dev/null +++ b/somebot/modules/CommandToss.py @@ -0,0 +1,20 @@ +# Mattermost Bot. +# Copyright (c) 2016-2020 by Someone (aka. Jan Vales ) +# published under MIT-License + +import requests + + +from AbstractCommand import * +class CommandToss(AbstractCommand): + TRIGGER = "toss" + CONFIG = {"display_name": "somebot-command", "auto_complete": True, + "auto_complete_hint": "", + } + USEINFO = CONFIG["auto_complete_desc"] = CONFIG["description"] = "Use TOSS." + + + def on_POST(self, request, data): + msg = "#### Let me :toss: that for you :)\n:arrow_right: https://toss.fsinf.at/?q="+requests.utils.quote(data["text"]) + request.cmd_respond_text_chan(msg) + -- 2.43.0