Beispiel #1
0
    def hear(self, message):
        "Receive a message from the remote party"
        self.lastMessageReceived = time.time()

        for answer in self.expectedAnswers:
            if message == answer:
                d = self.deferredAnswer
                del self.expectedAnswers
                # Clear this before the callback in case it asks another question
                del self.deferredAnswer
                d.callback(answer)
                return
        try:
            dispatch(self, message)
        except NoMatch:
            self.say("Sorry I don't know what you mean by that. Say <b>?</b> for help.")
        except:
            self.say(Failure().getTraceback(), useHTML=False)
Beispiel #2
0
    def hear(self, message):
        "Receive a message from the remote party"
        self.lastMessageReceived = time.time()

        for answer in self.expectedAnswers:
            if message == answer:
                d = self.deferredAnswer
                del self.expectedAnswers
                #Clear this before the callback in case it asks another question
                del self.deferredAnswer
                d.callback(answer)
                return
        try:
            dispatch(self, message)
        except NoMatch:
            self.say(
                "Sorry I don't know what you mean by that. Say <b>?</b> for help."
            )
        except:
            self.say(Failure().getTraceback(), useHTML=False)
Beispiel #3
0
def annoucement(conversation, string):
    return dispatch(conversation, string)
Beispiel #4
0
def annoucement(conversation, string):
    return dispatch(conversation, string)