Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for robot.hear #11

Merged
merged 4 commits into from
Apr 12, 2016
Merged

Add support for robot.hear #11

merged 4 commits into from
Apr 12, 2016

Conversation

Edznux
Copy link
Contributor

@Edznux Edznux commented Apr 11, 2016

Hi,

I've added the choice between "hear" and "respond".

If the env variable HUBOT_YOUTUBE_HEAR is set to true, hubot will respond to every messages starting with yt or youtube.

This simplify the usage of this script in public room.
Instead of typing hubot yt some video, you only have to yt some video

If HUBOT_YOUTUBE_HEAR is not set, it will continue to work as of now.

trigger = /^(?:youtube|yt)(?: me)? (.*)/i

robot[resType] trigger, (msg) ->
console.log msg
Copy link
Member

Choose a reason for hiding this comment

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

Use robot.logger.debug msg instead of console.log

@stephenyeargin
Copy link
Member

Looks 👍 to me. Only other thing is to consider adding the configuration option to the README.md

@Edznux
Copy link
Contributor Author

Edznux commented Apr 12, 2016

Is it ok now?
Might not be the best english you've ever seen but seems ok to me.
Thanks ! 👍

@stephenyeargin stephenyeargin merged commit 781d51f into hubot-archive:master Apr 12, 2016
@stephenyeargin
Copy link
Member

Released via v1.0.2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants