From 3bda80bf196ec1959340ec55a68ef6f48f43f120 Mon Sep 17 00:00:00 2001 From: Thorsten S Date: Wed, 1 May 2019 11:26:00 +0200 Subject: [PATCH] stupid looking debug plugin --- distbot/plugins/debug.py | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 distbot/plugins/debug.py diff --git a/distbot/plugins/debug.py b/distbot/plugins/debug.py new file mode 100644 index 0000000..3158456 --- /dev/null +++ b/distbot/plugins/debug.py @@ -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 " + + def parse_body(self, msg): + message = " ".join(get_words(msg)[1:]) + logger.debug(message) + return Action(msg=message) + + +ALL = [Echo] -- 2.39.2