Esempio n. 1
0
class cleverbot(Command):
    callname = "cb"
    permissionLevel = permissionLevels.NORMAL

    def __init__(self, engine):
        Command.__init__(self, engine)

        self.cleverbot = Session()

    def on_call(self, message, *args, **kwargs):
        if len(args) == 1:
            if args[0] == "START":
                return
            elif args[0] == "STOP":
                return

        query = " ".join(args)
        reply = self.cleverbot.ask(query)
        self.bot.send_Reply(message, reply)
Esempio n. 2
0
    def __init__(self, engine):
        Command.__init__(self, engine)

        self.cleverbot = Session()