Skip to content

Commit

Permalink
This fix the issue 200 !trout trigger slap whole phrase
Browse files Browse the repository at this point in the history
  • Loading branch information
djunaid authored Oct 1, 2023
1 parent 1523b0a commit 636046c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Parsers/Slap someone with a trout.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ var troutFlag = (current.text.indexOf('!trout') > -1);
var term = current.text.replace((troutFlag ? '!trout' : '!slap'), '').trim();

//Determine message to send
var msg = (term ? '<@'+current.user.user_id+'> slapped ' + term + ' with a large trout' : ':upside_down_face: ' + (troutFlag ? '!trout' : '!slap') + ' *something*');
var msg = (term ? '<@'+current.user.user_id+'> slapped ' + term.split(' ')[0] + ' with a large trout' : ':upside_down_face: ' + (troutFlag ? '!trout' : '!slap') + ' *something*');

//Send Slack message
var sendIt = new x_snc_slackerbot.Slacker().send_chat(current, msg, false);

0 comments on commit 636046c

Please sign in to comment.