Skip to content

Adding plusplus#16

Open
wpower12 wants to merge 6 commits intotudev:masterfrom
wpower12:master
Open

Adding plusplus#16
wpower12 wants to merge 6 commits intotudev:masterfrom
wpower12:master

Conversation

@wpower12
Copy link

@wpower12 wpower12 commented Oct 8, 2015

Adds plusplus commands to owlbot. The commands are responses, so they must follow an 'owlbot' or 'Owlbot'. The increment and decrement commands are rate limited. Right now the limit is 5 seconds.

Commands Added:

  • [word]++ - Increments points for [word]
  • [word]-- - Decrements points for [word]
  • points [word] - Returns current point total for [word]

scripts/nope.js Outdated
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just delete this whole file.

@wpower12
Copy link
Author

Looks like its working on my local hubot with a redis server running. I'm sure theres a way to keep the words more persistant, but I'll have to go learn them.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These should be robot.hear instead of robot.respond. The reason is that respond requires @owlbot at the head of the message. We want to be able to bill++ without @owlbot bill++

The concolusion of each ++/-- should also end with owlbot returning the current score for a specific item.

@samuelcouch
Copy link
Collaborator

This is good. I did find a possible edge case? Not sure.

couch [4:04 PM]: @owlbot couch++
couch [4:04 PM]: @owlbot points couch
owlbotBOT [4:04 PM] points for couch: 0

I would probably look at the existing codebase https://github.com/ajacksified/hubot-plusplus/blob/master/src/plusplus.coffee and only modify it with the timeout stuff that you have added.

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.

2 participants