Skip to content
This repository has been archived by the owner on Jun 8, 2023. It is now read-only.

Added Lawrence script #617

Merged
merged 2 commits into from Jan 10, 2013
Merged

Added Lawrence script #617

merged 2 commits into from Jan 10, 2013

Conversation

carmstrong
Copy link
Contributor

No description provided.

module.exports = (robot) ->
robot.hear /.*(hey lawrence).*/i, (msg) ->
quote = msg.random quotes
msg.send "http://movies.infinitecoolness.com/27/officespace18.jpg"
Copy link
Contributor

Choose a reason for hiding this comment

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

msg.send is asynchronous, so even if you call it twice in a row, the order isn't guaranteed. I'm sure it will annoy someone eventually. You can pass multiple strings to msg.send to ensure the right order though.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks! I didn't know msg.send could take multiple string arguments. Good to know.

tombell pushed a commit that referenced this pull request Jan 10, 2013
@tombell tombell merged commit 5c14673 into github:master Jan 10, 2013
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants