Skip to content
This repository has been archived by the owner on Jan 15, 2019. It is now read-only.

Change from robot.hear to robot.listen #12

Open
ajc308 opened this issue Jan 22, 2016 · 1 comment
Open

Change from robot.hear to robot.listen #12

ajc308 opened this issue Jan 22, 2016 · 1 comment

Comments

@ajc308
Copy link

ajc308 commented Jan 22, 2016

Please change robot.hear to robot.listen in these 4 instances: https://github.com/postlight/hubot-spotify-playlist/blob/master/src/spotify-playlist.coffee#L124-L133.

Since this is using robot.hear, when I run the bot locally (even with a different name), it responds to text matches regardless of the preceding name.

robot.hear - callback is called anytime a message's text matches
robot.respond - callback is only called for messages that are immediately preceded by the robot's name or alias

Hear vs. listen: https://github.com/github/hubot/blob/master/docs/scripting.md#hearing-and-responding

I tried to submit a PR for this myself but was denied due to permissions.

@mutewinter
Copy link

Write access granted.

kev5873 added a commit that referenced this issue Nov 28, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants