{"action":"created","issue":{"url":"https://api.github.com/repos/howdyai/botkit/issues/43","labels_url":"https://api.github.com/repos/howdyai/botkit/issues/43/labels{/name}","comments_url":"https://api.github.com/repos/howdyai/botkit/issues/43/comments","events_url":"https://api.github.com/repos/howdyai/botkit/issues/43/events","html_url":"https://github.com/howdyai/botkit/issues/43","id":123865142,"number":43,"title":"Bot listens to wrong parts of the message","user":{"login":"dgollub","id":1006974,"avatar_url":"https://avatars.githubusercontent.com/u/1006974?v=3","gravatar_id":"","url":"https://api.github.com/users/dgollub","html_url":"https://github.com/dgollub","followers_url":"https://api.github.com/users/dgollub/followers","following_url":"https://api.github.com/users/dgollub/following{/other_user}","gists_url":"https://api.github.com/users/dgollub/gists{/gist_id}","starred_url":"https://api.github.com/users/dgollub/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dgollub/subscriptions","organizations_url":"https://api.github.com/users/dgollub/orgs","repos_url":"https://api.github.com/users/dgollub/repos","events_url":"https://api.github.com/users/dgollub/events{/privacy}","received_events_url":"https://api.github.com/users/dgollub/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-12-25T08:41:30Z","updated_at":"2015-12-27T12:28:31Z","closed_at":null,"body":"Hi,\r\n\r\nI am playing around with this library and it is pretty neat, but I ran into the following issue.\r\n\r\n```\r\nconst LISTEN_TO = 'direct_message,direct_mention,mention';\r\n\r\ncontroller.hears(['hello','hi'], LISTEN_TO, (bot, message) => {\r\n\r\n    bot.api.reactions.add({\r\n        timestamp: message.ts,\r\n        channel: message.channel,\r\n        name: 'robot_face',\r\n    }, (err, res) =>{\r\n        if (err) {\r\n            bot.log(\"Failed to add emoji reaction :(\", err);\r\n        }\r\n    });\r\n\r\n    controller.storage.users.get(message.user, (err, user) => {\r\n        if (user && user.name) {\r\n            bot.reply(message, `Hello ${user.name}!!`);\r\n        } else {\r\n            bot.reply(message, \"Hello.\");\r\n        }\r\n    });\r\n\r\n}); // hello, hi\r\n```\r\n\r\nThe bot replies `Hello.` even if the message to it was something like `@bot: while I do not hate you ...` - the `hi` in `while` triggers the bot to reply `Hello.`. \r\n\r\nI don't think it should be that way. Is there a bugfix for this or a workaround?\r\n\r\nVersion: I am using ```\"botkit\": \"latest\",``` in my package.json file, and it installed version 0.0.4. "},"comment":{"url":"https://api.github.com/repos/howdyai/botkit/issues/comments/167405225","html_url":"https://github.com/howdyai/botkit/issues/43#issuecomment-167405225","issue_url":"https://api.github.com/repos/howdyai/botkit/issues/43","id":167405225,"user":{"login":"Glowbal","id":5007509,"avatar_url":"https://avatars.githubusercontent.com/u/5007509?v=3","gravatar_id":"","url":"https://api.github.com/users/Glowbal","html_url":"https://github.com/Glowbal","followers_url":"https://api.github.com/users/Glowbal/followers","following_url":"https://api.github.com/users/Glowbal/following{/other_user}","gists_url":"https://api.github.com/users/Glowbal/gists{/gist_id}","starred_url":"https://api.github.com/users/Glowbal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Glowbal/subscriptions","organizations_url":"https://api.github.com/users/Glowbal/orgs","repos_url":"https://api.github.com/users/Glowbal/repos","events_url":"https://api.github.com/users/Glowbal/events{/privacy}","received_events_url":"https://api.github.com/users/Glowbal/received_events","type":"User","site_admin":false},"created_at":"2015-12-27T12:28:31Z","updated_at":"2015-12-27T12:28:31Z","body":"Try `[\"\\s*hi\", \"\\s*hello\"]`\r\n\r\nHears takes a regex pattern (or patterns). You will want to match the start of a word. \r\n\r\nThe \\s* will match 0 > unlimited whitespace infront of the hi or hello. So it will match against:\r\n> hi, how are you?\r\n\r\nbut not against:\r\n> while I do not hate you\r\n"}}