Skip to content
This repository has been archived by the owner on Sep 26, 2020. It is now read-only.

Commit

Permalink
forgot a comma
Browse files Browse the repository at this point in the history
  • Loading branch information
sjone4 committed May 13, 2016
1 parent 84cff4c commit 24e8cc1
Show file tree
Hide file tree
Showing 4 changed files with 87 additions and 4 deletions.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,14 @@ Before taking any steps you need to get a BOT API KEY from the Slack intergratio
* Run `heroku pg:psql`
* YOU MUST HAVE POSTGRESQL INSTALLED TO USE `heroku pg:psql`
* This will establish a connection to your Heroku pg database

2) Creating your database
* From there, you will see a psql instance. Run your table commands here
* For this project, `CREATE TABLE movies (id SERIAL, title VARCHAR(35), votes INT);` will create the same database

3) Ensure your config variables match
* Ensure that your heroku database URL and Slack API keys match up in your Heroku app dashboard

4) Finally, deploy your code
* You can deploy by commiting to the remote heroku master branch
* You do this by running `git push heroku master`
Expand Down
19 changes: 17 additions & 2 deletions lib/messageContent.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,25 @@ module.exports = {
},
success: {
add: "Added {movie} to the list",
vote: "Your vote for {movie} has been casted"
vote: "Your vote for {movie} has been cast"
},
misc: {
danny: "Dayuuuuuummmmm, Danny Nguyen is one sexy ass motherfucker. Have you seen his Reeboks?",
scott: "Ey Scottie too hottiiieeeeeeee"
scott: "Ey Scottie too hottiiieeeeeeee",
matt: "Matt Olsson? You mean Dee Snider?",
joeCarpenito: "Please don't hurt me",
grassis: ":(",
anand: ":((",
joeMorgan: "Have you heard about this new JavaScript framework?",
lance: "REKT",
forrest: "No more meetings!",
milos: "Nobody touch my He-Man action figure",
tom: "ROBOTS",
chris: "OOOOWWWeeee what brand is that?",
amy: "Throwback Thursday",
roshan: "He hates dead pixels",
pete: "Chipotle?",
evan: "Most likely to escape by bicycle during the Apocalypse",
amber: "https://www.youtube.com/watch?v=SUFSB2plwzM"
}
};
15 changes: 14 additions & 1 deletion lib/messageFlags.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,18 @@ module.exports = {
VOTE_MOVIE: "vote",
"FRIDAY_MOVIE": ['friday movie', 'Friday Movie', 'friday', 'Friday', 'Friday Movies', 'friday movies'],
DANNY: ['Danny', 'Danny Nguyen', 'sexy'],
SCOTT: ['Scott', 'Scott Jones', 'LegionEpicWin', 'hottie']
SCOTT: ['Scott', 'Scott Jones', 'LegionEpicWin', 'hottie'],
MATT: ['Matt', 'matt'],
JOECARPENITO: ['Joe C', 'carpenito', 'Carpenito'],
JOEMORGAN: ['Joe Morgan', 'Morgan'],
LANCE: ['Lance', 'lance'],
FORREST: ['forrest', 'Forrest'],
MILOS: ['milos', 'Milos'],
TOM: ['Tom', 'tom'],
CHRIS: ['Chris', 'chris'],
AMY: ['Amy', 'amy'],
ROSHAN: ['Roshan', 'roshan'],
PETE: ['pete', 'Pete'],
EVAN: ['Evan', 'evan'],
AMBER: ['Amber', 'amber']
}
54 changes: 53 additions & 1 deletion lib/usherbot.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ u.start = function () {
};

u.isVotingOpen = function () {
return true; //uncomment for debugging purposes
//return true; //uncomment for debugging purposes
var today = new Date();
//check to see if today's Friday
if(today.getDay() === 5) {
Expand Down Expand Up @@ -128,6 +128,58 @@ u.startListeners = function () {
bot.reply(message, _this.messages.misc.scott);
});

slackbot.hears( flags.MATT, ['direct_message', 'direct_mention'], function(bot, message) {
bot.reply(message, _this.messages.misc.matt);
});

slackbot.hears( flags.JOECARPENITO, ['direct_message', 'direct_mention'], function(bot, message) {
bot.reply(message, _this.messages.misc.joeCarpenito);
});

slackbot.hears( flags.JOEMORGAN, ['direct_message', 'direct_mention'], function(bot, message) {
bot.reply(message, _this.messages.misc.joeMorgan);
});

slackbot.hears( flags.LANCE, ['direct_message', 'direct_mention'], function(bot, message) {
bot.reply(message, _this.messages.misc.lance);
});

slackbot.hears( flags.FORREST, ['direct_message', 'direct_mention'], function(bot, message) {
bot.reply(message, _this.messages.misc.forrest);
});

slackbot.hears( flags.MILOS, ['direct_message', 'direct_mention'], function(bot, message) {
bot.reply(message, _this.messages.misc.milos);
});

slackbot.hears( flags.TOM, ['direct_message', 'direct_mention'], function(bot, message) {
bot.reply(message, _this.messages.misc.tom);
});

slackbot.hears( flags.CHRIS, ['direct_message', 'direct_mention'], function(bot, message) {
bot.reply(message, _this.messages.misc.chris);
});

slackbot.hears( flags.AMY, ['direct_message', 'direct_mention'], function(bot, message) {
bot.reply(message, _this.messages.misc.amy);
});

slackbot.hears( flags.ROSHAN, ['direct_message', 'direct_mention'], function(bot, message) {
bot.reply(message, _this.messages.misc.roshan);
});

slackbot.hears( flags.PETE, ['direct_message', 'direct_mention'], function(bot, message) {
bot.reply(message, _this.messages.misc.pete);
});

slackbot.hears( flags.EVAN, ['direct_message', 'direct_mention'], function(bot, message) {
bot.reply(message, _this.messages.misc.evan);
});

slackbot.hears( flags.AMBER, ['direct_message', 'direct_mention'], function(bot, message) {
bot.reply(message, _this.messages.misc.amber);
});

///////////////////////////////////////////////
// LISTING MOVIES
///////////////////////////////////////////////
Expand Down

0 comments on commit 24e8cc1

Please sign in to comment.