Fixed kong callback for failed invocation
This commit is contained in:
@@ -80,10 +80,9 @@ def handleKongMsg(slack, msg):
|
|||||||
text = msg['text']
|
text = msg['text']
|
||||||
match = request_pattern.match(text)
|
match = request_pattern.match(text)
|
||||||
|
|
||||||
|
#Make callback function
|
||||||
|
reply_callback = lambda response: reply(slack, msg, response, username="jukebot")
|
||||||
if match:
|
if match:
|
||||||
#Make callback function
|
|
||||||
reply_callback = lambda response: reply(slack, msg, response, username="jukebot")
|
|
||||||
|
|
||||||
if match.group(1) == "list":
|
if match.group(1) == "list":
|
||||||
response = ""
|
response = ""
|
||||||
for title in getAllTitles():
|
for title in getAllTitles():
|
||||||
@@ -99,5 +98,6 @@ def handleKongMsg(slack, msg):
|
|||||||
|
|
||||||
else:
|
else:
|
||||||
response = "Invoke as kong <songtitle:list>"
|
response = "Invoke as kong <songtitle:list>"
|
||||||
|
reply_callback(response)
|
||||||
|
|
||||||
|
|
||||||
Reference in New Issue
Block a user