Created
September 28, 2017 06:50
-
-
Save johnbocook/9ad5a1779f6c4e3eff27b4a86f670b39 to your computer and use it in GitHub Desktop.
LunchBot is a little slack integration that randomly chooses where to have lunch.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<cfoutput> | |
<cfif #StructKeyExists(FORM, "token")#> | |
<cfif #FORM.token# NEQ '#PUBLICKEY##'> | |
Sorry, Authentication Failed | |
<cfelse> | |
<cfset resturants = "BW3, Roosters, Wendys, Gibbys, Tuscan Table, El Palmor, Goodwins Family | |
Resturant, Cardo's Pizza, Zanzy's Pizza, High Court Cafe, Arby's, Grand Buffett, McDonalds, KFC, Richie's New York Corner Deli, "> | |
<cfset objRandomReport=ArrayNew(1)> | |
<cfset objRandomReport=ListToArray(resturants)> | |
<cfset ArraySort(objRandomReport,"textnocase","ASC")> | |
<!--- random number b/n 1 and length of list/array ---> | |
<cfset resturant=objRandomReport[RandRange(1,ArrayLen(objRandomReport))]> | |
<cfoutput>Team, Lunch Roulette has spoken: *#resturant#* is the spot.</cfoutput> | |
</cfif> | |
</cfif> | |
</cfoutput> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment