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

What does the fox say!? #1130

Closed
wants to merge 2 commits into from
Closed

What does the fox say!? #1130

wants to merge 2 commits into from

Conversation

tielur
Copy link

@tielur tielur commented Sep 12, 2013

Hubot know's what the fox says...

module.exports = (robot) ->

robot.respond /what does the fox say/i, (msg) ->
msg.send ":dog: goes woof"
Copy link
Contributor

Choose a reason for hiding this comment

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

Keep in mind that msg.send is async, so these are likely to come out in the wrong order. You can calling msg.send with multiple strings on it.

Copy link
Author

Choose a reason for hiding this comment

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

Good catch! The order definitely matters!

Copy link
Author

Choose a reason for hiding this comment

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

On second thought, if I send in multiple strings to send it will cause a "paste" like message in campfire which doesn't render the emoji icons. So I'll have to look at a different approach to this.

Copy link
Contributor

Choose a reason for hiding this comment

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

No, msg.send "foo", "bar", "baz" would send three one line messages. If you made one big string with multiple lines, it would go through as a paste.

@technicalpickles
Copy link
Contributor

In the spirit of #1113, we're recommending folks start packages for new scripts rather than adding to this repository. See that issue for details, and let us know if you have any questions!

@tielur
Copy link
Author

tielur commented Sep 12, 2013

Ahh awesome, that solves that nasty manual specification of dependencies! Will do, thanks.

@tombell
Copy link
Contributor

tombell commented Sep 12, 2013

I also refuse to acknowledge someone made this script.

@tielur
Copy link
Author

tielur commented Sep 12, 2013

@technicalpickles I created an npm package and opened an issue with https://github.com/hubot-scripts/packages

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.

3 participants