From 410164838c6f88e32d4d690d589b8657ae7dd39d Mon Sep 17 00:00:00 2001 From: Jacob Henry Date: Tue, 29 Nov 2016 18:17:27 -0500 Subject: [PATCH] Fixed kong callback for failed invocation --- kong.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/kong.py b/kong.py index 7c06649..364f033 100644 --- a/kong.py +++ b/kong.py @@ -80,10 +80,9 @@ def handleKongMsg(slack, msg): text = msg['text'] match = request_pattern.match(text) + #Make callback function + reply_callback = lambda response: reply(slack, msg, response, username="jukebot") if match: - #Make callback function - reply_callback = lambda response: reply(slack, msg, response, username="jukebot") - if match.group(1) == "list": response = "" for title in getAllTitles(): @@ -99,5 +98,6 @@ def handleKongMsg(slack, msg): else: response = "Invoke as kong " + reply_callback(response) \ No newline at end of file