Skip to content

Randomize the 'congrats' message#16

Open
tgbates wants to merge 2 commits into
jnerius:masterfrom
tgbates:master
Open

Randomize the 'congrats' message#16
tgbates wants to merge 2 commits into
jnerius:masterfrom
tgbates:master

Conversation

@tgbates
Copy link
Copy Markdown

@tgbates tgbates commented Oct 20, 2017

Added a script include 'RandomMessage' for different random messages.
Pass it the username and the point tally.

Replaced this line in the ProcessPoints Business Rule:
bodyString += '&text=' + gs.urlEncode('Congrats ' + thing + ' you now have ' + grSlackUser.points + ' points');

with this:
var randomMessage = new x_snc_slack_points.RandomMessage(); bodyString += '&text=' + gs.urlEncode(randomMessage.getMessage(thing, grSlackUser.points));

…ngrats message when points are awarded, updated Process Points business rule to use the new script include.
Token for bot, new Script Include RandomMessage to return a random Co…
@jacebenson jacebenson mentioned this pull request Oct 22, 2017
@jnerius jnerius changed the title Randomize the 'congrats' message #4 Randomize the 'congrats' message Oct 24, 2017
jnerius pushed a commit that referenced this pull request Oct 24, 2017
@jnerius
Copy link
Copy Markdown
Owner

jnerius commented Oct 24, 2017

@tgbates, this has been accepted into the main repo!

See the blog post here for instructions on how to update your fork with the latest changes from the master repository.

@jacebenson
Copy link
Copy Markdown

This closes #4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants