Skip to content

Comments

Update selectors for new gifbin layout#1

Open
donoftime wants to merge 13 commits intotrvsdnn:masterfrom
donoftime:master
Open

Update selectors for new gifbin layout#1
donoftime wants to merge 13 commits intotrvsdnn:masterfrom
donoftime:master

Conversation

@donoftime
Copy link

No description provided.

@trvsdnn
Copy link
Owner

trvsdnn commented Sep 20, 2013

I've been thinking about switching to http://giphy.com, they have an API... it is beta though.

Thoughts?

@donoftime
Copy link
Author

Oh ho, that sounds like a winner!
I was kind of worried we were pulling bandwidth without the ad revenue on gifbin, but it looks like giphy actually encourages this.

I'm just now learning Ruby, so I think doing the refactor to use giphy this weekend could be a fun project. I can give it a whirl and let you know how it goes.

@trvsdnn
Copy link
Owner

trvsdnn commented Sep 20, 2013

Sounds great, look forward to seeing what you can come up with.

@trvsdnn
Copy link
Owner

trvsdnn commented Sep 20, 2013

Looks great, can you update the README to reference the use of giphy?

Awesome work! Less lines and API usage, I like.

@donoftime
Copy link
Author

Thanks for the pointers!

Is ruby always this fun to write, or is it just extra fun because when I get it right I get rewarded with a funny .gif?

Whenever an action is seen, the first 3 words
are used as a search string to retrieve a gif
to illustrate how that action looks.
@donoftime
Copy link
Author

Now that we're back to feature parity, I added a new feature where the bot will respond to actions, i.e.
/me runs to the store.

It takes the first 3 words of the message and searches for a gif. Then it posts a message like:
donoftime right now: http://media0.giphy.com/media/CmBgweqQ4dy6I/giphy.gif

I wanted to play around with branching on github, so I created a feature branch for it called actions in my repo. If you like the idea, I can merge it in.

@donoftime
Copy link
Author

I see this quickly turning the people in my channel into cavemen as it replaces emoji:

/me surprised
/me hungry
/me sleepy

@trvsdnn
Copy link
Owner

trvsdnn commented Sep 20, 2013

Nice idea! It's something that happens without you or any user calling to the bot though, so I think it should probably be an option.

Currently the only options that make it through come via the command line switches... I'd be up for sticking it there if we can come up with a good name for the switch to use in the command line.

We could also allow you to enable/disable it via a command to gifbot but also support turning it on with the option enabled via the command line switch. Does any of that make sense?

Again, nice work!

Action gifs are added, along with a toggle in chat and CLI option. 

Also removed ?randomgif to instead react on a blank ?gifme. This works nicely with the switch to the screensaver endpoint which returns a random gif if the query is blank.
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