Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion scripts/stackstorm.js
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,11 @@ module.exports = function(robot) {
}

if (res.message) {
var msgs = (res.message + history).split('|');
if (msgs.length > 1) {
return msg.send(msg.random(msgs));
}

return msg.send(res.message + history);
}

Expand Down Expand Up @@ -279,7 +284,9 @@ module.exports = function(robot) {
result = command_factory.getMatchingCommand(command.toLowerCase());

if (!result) {
// No command found
//add a default response if the command is not found
msg.send("I'm sorry but I didn't recognise that command. Please try !help for available commands.");
// No command found, notifiy slack user
return;
}

Expand Down