]> git.aero2k.de Git - urlbot-v3.git/commitdiff
stupid looking debug plugin
authorThorsten S <mail@aero2k.de>
Wed, 1 May 2019 09:26:00 +0000 (11:26 +0200)
committerThorsten S <mail@aero2k.de>
Wed, 1 May 2019 09:26:00 +0000 (11:26 +0200)
distbot/plugins/debug.py [new file with mode: 0644]

diff --git a/distbot/plugins/debug.py b/distbot/plugins/debug.py
new file mode 100644 (file)
index 0000000..3158456
--- /dev/null
@@ -0,0 +1,22 @@
+# -*- coding: utf-8 -*-
+import logging
+
+from distbot.common.action import Action
+from distbot.common.message import get_words
+from distbot.bot.worker import Worker
+
+logger = logging.getLogger(__name__)
+
+
+class Echo(Worker):
+    binding_keys = ['nick.echo.#']
+    description = "a really handsome parrot bot"
+    usage = "bot: echo <your message here>"
+
+    def parse_body(self, msg):
+        message = " ".join(get_words(msg)[1:])
+        logger.debug(message)
+        return Action(msg=message)
+
+
+ALL = [Echo]