err-elizabot

a classic electronic shrink for the chatbot err
git clone https://git.ce9e.org/err-elizabot.git

commit
6a2f80c2709ed78f6232b53054fd556b76cb6d82
parent
de09b1b7370cd5ab73136db6a77ac28c67ecfc69
Author
Tobias Bengfort <tobias.bengfort@gmx.net>
Date
2016-05-24 06:26
answer whenever eliza is directly addressed

Diffstat

M elizaBot.py 11 +++++------

1 files changed, 5 insertions, 6 deletions


diff --git a/elizaBot.py b/elizaBot.py

@@ -1,10 +1,9 @@
    1     1 import eliza
    2    -1 from errbot import botcmd, BotPlugin
   -1     2 from errbot import BotPlugin
    3     3 
    4     4 
    5     5 class ElizaBot(BotPlugin):
    6    -1     @botcmd
    7    -1     def eliza(self, _, args):
    8    -1         """ El'cheapo shrink for you """
    9    -1         args = args.strip()
   10    -1         return eliza.respond(args)
   -1     6     def callback_message(self, msg):
   -1     7         """El'cheapo shrink for you."""
   -1     8         if msg.to == self.bot_identifier:
   -1     9             self.send(msg.frm, eliza.respond(msg.body))