bencentra / hubot-giphy-gifme

"gif me" command for Hubot, get random GIFs from Giphy!
MIT License
6 stars 2 forks source link

Add error handling, clean up search term parsing, and add comments #3

Closed mattgawarecki closed 8 years ago

mattgawarecki commented 8 years ago

I'm no CoffeeScript programmer, but I noticed it could be confusing when Giphy doesn't return results for a given search term. I was also perhaps misguided in the idea that quoting search terms would lead to more accurate results, but so far it hasn't hurt anything. Feel free to change this as you see fit, but I think the error handling could be useful, and the comments may be useful to any future contributors.

I also created a separate respond hook for a simple "random" gif me request without any terms -- that way, the logic to determine if you've got search terms or not becomes unnecessary.

Hopefully you find use in these changes! Whether or not you merge them, it was fun to work on. My co-workers very much enjoy this Hubot plugin, so keep up the good work.

bencentra commented 8 years ago

Sorry for overlooking this for so long! I'm gonna get this up-to-date with the latest changes and merge it ASAP.

bencentra commented 8 years ago

Closing this PR. Much of it was used as feedback in the last few "refactor" commits and released as v0.1.7: https://github.com/bencentra/hubot-giphy-gifme/releases/tag/v0.1.7.