From a2b71413f9c1350d1ddf637f5b1a2f4708b4c552 Mon Sep 17 00:00:00 2001 From: Someone Date: Fri, 19 Jun 2020 01:32:13 +0200 Subject: [PATCH] [somebot] /gwg-roll --- somebot/modules/CommandGWGRoll.py | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 somebot/modules/CommandGWGRoll.py diff --git a/somebot/modules/CommandGWGRoll.py b/somebot/modules/CommandGWGRoll.py new file mode 100644 index 0000000..f440451 --- /dev/null +++ b/somebot/modules/CommandGWGRoll.py @@ -0,0 +1,20 @@ +# Mattermost Bot. +# Copyright (c) 2016-2020 by Someone (aka. Jan Vales ) +# published under MIT-License + +import random + + +from AbstractCommand import * +class CommandGWGRoll(AbstractCommand): + TRIGGER = "gwg-roll" + CONFIG = {"display_name": "somebot-command", "auto_complete": True, + "auto_complete_hint": "Roll your GWG points!", + } + USEINFO = CONFIG["auto_complete_desc"] = CONFIG["description"] = "Roll your GWG points!" + + options = ["Your GWG points: "+str(i/10) for i in range(0, 165, 5)] + + def on_POST(self, request, data): + request.cmd_respond_text_chan(random.choice(self.options)) + -- 2.43.0