{"_id":"hermes","_rev":"31-079fa4057691a2bde02ce287bb9fe561","name":"hermes","description":"Messenger of the gods.","dist-tags":{"latest":"0.4.4"},"versions":{"0.0.1":{"name":"hermes","version":"0.0.1","description":"full featured rails-inspired mailer for node.js","keywords":["mail","email","mailer","smtp","sendmail","ses","e-mail"],"homepage":"http://github.com/minibikini/hermes","bugs":{"email":"egor@kislitsyn.com","url":"http://github.com/minibikini/hermes/issues"},"licenses":[{"type":"MIT","url":"http://github.com/minibikini/hermes/raw/master/LICENSE"}],"author":{"name":"Egor Kislitsyn","email":"egor@kislitsyn.com","url":"http://kislitsyn.com/"},"repository":{"type":"git","url":"git://github.com/minibikini/hermes.git"},"main":"./index","engines":{"node":"0.6.x"},"dependencies":{"coffee-script":">=1.3.1","underscore":">=1.3.3","nodemailer":">=0.3.18","handlebars":">=1.0.4"},"_npmUser":{"name":"kislitsyn","email":"egor@kislitsyn.com"},"_id":"hermes@0.0.1","devDependencies":{},"optionalDependencies":{},"_engineSupported":true,"_npmVersion":"1.1.18","_nodeVersion":"v0.6.15","_defaultsLoaded":true,"dist":{"shasum":"f8b488b436226f232da1b0a4954669181f2f68b2","tarball":"https://registry.npmjs.org/hermes/-/hermes-0.0.1.tgz","integrity":"sha512-VbPmD4zfYXHdj+Lgimu4JO1eId6ea8HDCrfWAoqwY6kHGO+QLtAzsMYQkxzx67wk5BgGS3XnBSpX0WcGXvs7Ag==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFiioJFPsCGCVAAYzy/1h/hgq0bFdRogN0m+PWMifjiuAiEA95PVk69rDZj4BUoBSAJeSLHZKWF+HEKlEkkjW1s0dEA="}]},"maintainers":[{"name":"kislitsyn","email":"egor@kislitsyn.com"}],"directories":{}},"0.0.2":{"name":"hermes","version":"0.0.2","description":"full featured rails-inspired mailer for node.js","keywords":["mail","email","mailer","smtp","sendmail","ses","e-mail"],"homepage":"http://github.com/minibikini/hermes","bugs":{"email":"egor@kislitsyn.com","url":"http://github.com/minibikini/hermes/issues"},"licenses":[{"type":"MIT","url":"http://github.com/minibikini/hermes/raw/master/LICENSE"}],"author":{"name":"Egor Kislitsyn","email":"egor@kislitsyn.com","url":"http://kislitsyn.com/"},"repository":{"type":"git","url":"git://github.com/minibikini/hermes.git"},"main":"./index","engines":{"node":"0.6.x"},"dependencies":{"coffee-script":">=1.3.1","underscore":">=1.3.3","nodemailer":">=0.3.18","handlebars":">=1.0.4"},"_npmUser":{"name":"kislitsyn","email":"egor@kislitsyn.com"},"_id":"hermes@0.0.2","devDependencies":{},"optionalDependencies":{},"_engineSupported":true,"_npmVersion":"1.1.18","_nodeVersion":"v0.6.16","_defaultsLoaded":true,"dist":{"shasum":"f57380431d7e0f61e9fe1590178bdecb250ea522","tarball":"https://registry.npmjs.org/hermes/-/hermes-0.0.2.tgz","integrity":"sha512-wtbCWzzc69nKl3lqGc+T9ljGGQpRxjzi1XjocTpLm2dGbKLotOUGWVWb5U7C57oU16458f7tPDklRdY4Ukw9qg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHZjAkn73Or7uju1UmM4TYlqaQ0KWvzcWNbnFI/k/OqJAiAq4633jgRqARd8oK+CfaoMHCHCARC7xnWLWJ/1E53UYw=="}]},"maintainers":[{"name":"kislitsyn","email":"egor@kislitsyn.com"}],"directories":{}},"0.0.3":{"name":"hermes","version":"0.0.3","description":"full featured rails-inspired mailer for node.js","keywords":["mail","email","mailer","smtp","sendmail","ses","e-mail"],"homepage":"http://github.com/minibikini/hermes","bugs":{"url":"http://github.com/minibikini/hermes/issues","email":"egor@kislitsyn.com"},"licenses":[{"type":"MIT","url":"http://github.com/minibikini/hermes/raw/master/LICENSE"}],"author":{"name":"Egor Kislitsyn","email":"egor@kislitsyn.com","url":"http://kislitsyn.com/"},"repository":{"type":"git","url":"git://github.com/minibikini/hermes.git"},"main":"./index","engines":{"node":">=0.6.x"},"dependencies":{"coffee-script":">=1.3.1","underscore":">=1.3.3","nodemailer":">=0.3.18","handlebars":">=1.0.4"},"_id":"hermes@0.0.3","dist":{"shasum":"c454d69c06f5ba3e6da134b6a1d0a76fb5873fb6","tarball":"https://registry.npmjs.org/hermes/-/hermes-0.0.3.tgz","integrity":"sha512-fPl7lqBHkgafIpU/m5/iVxFKktgGmy91kz1va2gVveBRjyI/4m5AYURCyuY6ALpkDNudJUNH3lXzL0d68AgT0A==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCID+u6mKbg1i/wQooDFnrdNID4tVwGwCBAlHWg4t4+WYLAiBr1lI3lg29xhIVigGSzseo0tL3P/NiYqiHScbraFXsZw=="}]},"maintainers":[{"name":"kislitsyn","email":"egor@kislitsyn.com"}],"directories":{}},"0.0.5":{"name":"hermes","version":"0.0.5","description":"full featured rails-inspired mailer for node.js","keywords":["mail","email","mailer","smtp","sendmail","ses","e-mail"],"homepage":"http://github.com/minibikini/hermes","bugs":{"url":"http://github.com/minibikini/hermes/issues","email":"egor@kislitsyn.com"},"licenses":[{"type":"MIT","url":"http://github.com/minibikini/hermes/raw/master/LICENSE"}],"author":{"name":"Egor Kislitsyn","email":"egor@kislitsyn.com","url":"http://kislitsyn.com/"},"repository":{"type":"git","url":"git://github.com/minibikini/hermes.git"},"main":"./index","engines":{"node":">=0.6.x"},"dependencies":{"coffee-script":">=1.3.1","underscore":">=1.3.3","nodemailer":">=0.3.18","handlebars":">=1.0.4"},"_id":"hermes@0.0.5","dist":{"shasum":"16d3e62eac0bdb2d529e332df979df9726e4c7e0","tarball":"https://registry.npmjs.org/hermes/-/hermes-0.0.5.tgz","integrity":"sha512-EKFP3uzYyq4s0iOmBvYKZGU/h/tG1ABkXoM7OQp2JfPsvQp4xMf/uz/LjBf38eCJUlxRaiWsHoNFJR8TDpSwwQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCtAm1m1kAh28hOJeJI0vFB9FvjNwRwlJindcp4GPaz8AIgYdWp3QdN16WIedR6MQ9W9jUYrYjjBvFduGy+SAnMmVw="}]},"_from":".","_npmVersion":"1.2.21","_npmUser":{"name":"kislitsyn","email":"egor@kislitsyn.com"},"maintainers":[{"name":"kislitsyn","email":"egor@kislitsyn.com"}],"directories":{}},"0.0.6":{"name":"hermes","version":"0.0.6","description":"full featured rails-inspired mailer for node.js","keywords":["mail","email","mailer","smtp","sendmail","ses","e-mail"],"homepage":"http://github.com/minibikini/hermes","bugs":{"url":"http://github.com/minibikini/hermes/issues","email":"egor@kislitsyn.com"},"licenses":[{"type":"MIT","url":"http://github.com/minibikini/hermes/raw/master/LICENSE"}],"author":{"name":"Egor Kislitsyn","email":"egor@kislitsyn.com","url":"http://kislitsyn.com/"},"repository":{"type":"git","url":"git://github.com/minibikini/hermes.git"},"main":"./index","engines":{"node":">=0.10.x"},"dependencies":{"coffee-script":">=1.3.1","lodash":"*","nodemailer":">=0.3.18","handlebars":">=1.0.4"},"_id":"hermes@0.0.6","dist":{"shasum":"6f119440898ee8bf0566ca57f8014d34eef60fb1","tarball":"https://registry.npmjs.org/hermes/-/hermes-0.0.6.tgz","integrity":"sha512-dm9xHY9YMoqowcrt5rISIYYdKv+niF0lPcaNstlL4dmA794cdFIgVSgmN3PJ0LU3z0LlPUR7Q7Iuv5yIFyvyHA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAtuRvANsn2NOrCsV++Of+w+v7imVmWrFOHfMQwuhz8BAiB9XOmrBkMfu21MfS44NV3BQUeM8TLPIgeKeGPtL+463g=="}]},"_from":".","_npmVersion":"1.2.23","_npmUser":{"name":"kislitsyn","email":"egor@kislitsyn.com"},"maintainers":[{"name":"kislitsyn","email":"egor@kislitsyn.com"}],"directories":{}},"0.0.7":{"name":"hermes","version":"0.0.7","description":"full featured rails-inspired mailer for node.js","keywords":["mail","email","mailer","smtp","sendmail","ses","e-mail"],"homepage":"http://github.com/minibikini/hermes","bugs":{"url":"http://github.com/minibikini/hermes/issues","email":"egor@kislitsyn.com"},"licenses":[{"type":"MIT","url":"http://github.com/minibikini/hermes/raw/master/LICENSE"}],"author":{"name":"Egor Kislitsyn","email":"egor@kislitsyn.com","url":"http://kislitsyn.com/"},"repository":{"type":"git","url":"git://github.com/minibikini/hermes.git"},"main":"./index","engines":{"node":">=0.10.x"},"dependencies":{"lodash":"*","nodemailer":">=0.3.18","handlebars":">=1.0.4","coffee-script":"~1.7.1"},"_id":"hermes@0.0.7","dist":{"shasum":"60e764b641cc19f8700e23b17de9ad36e915b74d","tarball":"https://registry.npmjs.org/hermes/-/hermes-0.0.7.tgz","integrity":"sha512-UVRh20u+5Yt3+KQqVNiOxVYkEWthQlk2oIE7kel2VYD3iFCm59oBo6Ufxtzo1sfIb2vFqVjfIv2DjU146+/xog==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHSVJpGg8njzcSjwzz830IVq/Oo9kZaiPGU7sN7MDweUAiEA0cRfwyR47E1NRAEK0Jo/dqyeOT3dBxGp5+VG07HO8rE="}]},"_from":".","_npmVersion":"1.3.24","_npmUser":{"name":"kislitsyn","email":"egor@kislitsyn.com"},"maintainers":[{"name":"kislitsyn","email":"egor@kislitsyn.com"}],"directories":{}},"0.0.8":{"name":"hermes","version":"0.0.8","description":"full featured rails-inspired mailer for node.js","keywords":["mail","email","mailer","smtp","sendmail","ses","e-mail"],"homepage":"http://github.com/minibikini/hermes","bugs":{"url":"http://github.com/minibikini/hermes/issues","email":"egor@kislitsyn.com"},"licenses":[{"type":"MIT","url":"http://github.com/minibikini/hermes/raw/master/LICENSE"}],"author":{"name":"Egor Kislitsyn","email":"egor@kislitsyn.com","url":"http://kislitsyn.com/"},"repository":{"type":"git","url":"git://github.com/minibikini/hermes.git"},"main":"./index","engines":{"node":">=0.10.x"},"dependencies":{"lodash":"*","nodemailer":">=0.3.18","handlebars":">=1.0.4","coffee-script":"~1.7.1","typeof":"~1.0.0"},"_id":"hermes@0.0.8","dist":{"shasum":"be398a4a650376f87544c14908df71d7f62c4d29","tarball":"https://registry.npmjs.org/hermes/-/hermes-0.0.8.tgz","integrity":"sha512-5cU/WIAY393DKwpPVqCr/RppCXa76eiDXYZlQSc7ieJj4LVcQIMAP9PUM1o9DlmQjE70i9smUHeG6NSYomd+Ow==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCPXgOA5WYEgkYdjvenF19u/ijB09vly3FGfX1uSvzgtAIhALaYy3tq/oPx7kXyUdDM4KLvvJ8x/abGcAu/OExSCmqI"}]},"_from":".","_npmVersion":"1.3.24","_npmUser":{"name":"kislitsyn","email":"egor@kislitsyn.com"},"maintainers":[{"name":"kislitsyn","email":"egor@kislitsyn.com"}],"directories":{}},"0.3.0":{"name":"hermes","version":"0.3.0","repository":{"type":"git","url":"git://github.com/segmentio/hermes.git"},"license":"MIT","description":"Messenger of the gods.","main":"lib/index.js","bin":{"hermes":"bin/hermes"},"dependencies":{"async":"^0.7.0","chalk":"^0.4.0","commander":"^2.2.0","component-type":"^1.0.0","node-hipchat":"^0.4.5","node-xmpp":"^1.0.0-alpha1","lodash":"~2.4.1","mathstring":"~0.1.5","google-url":"0.0.4","indent":"0.0.1","gitio2":"~2.0.0","uid":"0.0.2","to-function":"~2.0.3"},"devDependencies":{"mocha":"1.x","browserify":"~3.46.0"},"keywords":["chat","bot","robot","hipchat","irc","xmpp","hubot","slack"],"bugs":{"url":"https://github.com/segmentio/hermes/issues"},"homepage":"https://github.com/segmentio/hermes","_id":"hermes@0.3.0","dist":{"shasum":"45f7e37d4d4678524fbb04b27c218c9ee079ab1f","tarball":"https://registry.npmjs.org/hermes/-/hermes-0.3.0.tgz","integrity":"sha512-+Z+7IrZZ19Ls6Mkq5Dn3kzkKISj+w5yZjIclm27PsApyCJqwemxFuQgd28bQdkL0IvCR3n0pPZgzQ/+U7JK66Q==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICz32O4UNmLmfI66L6N8QX6sWk6zQTTChn2gVoqgkVpUAiBz5zFfRQe1bbCRS+XAyyRWwi+e4diYe2CGIaRZlg6r+Q=="}]},"_from":".","_npmVersion":"1.4.3","_npmUser":{"name":"ianstormtaylor","email":"ian@ianstormtaylor.com"},"maintainers":[{"name":"kislitsyn","email":"egor@kislitsyn.com"},{"name":"ianstormtaylor","email":"ian@ianstormtaylor.com"}],"directories":{}},"0.4.0":{"name":"hermes","version":"0.4.0","repository":{"type":"git","url":"git://github.com/segmentio/hermes.git"},"license":"MIT","description":"Messenger of the gods.","main":"lib/index.js","bin":{"hermes":"bin/hermes"},"dependencies":{"async":"^0.7.0","chalk":"^0.4.0","commander":"^2.2.0","component-type":"^1.0.0","node-hipchat":"^0.4.5","node-xmpp":"^1.0.0-alpha1","lodash":"~2.4.1","mathstring":"~0.1.5","google-url":"0.0.4","indent":"0.0.1","gitio2":"~2.0.0","uid":"0.0.2","to-function":"~2.0.3"},"devDependencies":{"mocha":"1.x","browserify":"~3.46.0","serve":"^1.4.0"},"keywords":["chat","bot","robot","hipchat","irc","xmpp","hubot","slack"],"bugs":{"url":"https://github.com/segmentio/hermes/issues"},"homepage":"https://github.com/segmentio/hermes","_id":"hermes@0.4.0","dist":{"shasum":"4d11c01adc3f85c3646cc79b6937dc051524a1ea","tarball":"https://registry.npmjs.org/hermes/-/hermes-0.4.0.tgz","integrity":"sha512-VFYSX/Qw4AxMa/58XzeF3z6+cEcirnoSrh4drv4J5Xso2H3zYjDQXfJzhWzhzPHtaX9BL32bOmnTVSw9l90LSg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDOuYvcsC4w3NhWkzkkC3ya0INPsy26cBiKzpBM4zhf5wIhAM1R3w7r0rmG61n95KpSvbWBWci5QI/LMLyckI33piVf"}]},"_from":".","_npmVersion":"1.4.3","_npmUser":{"name":"ianstormtaylor","email":"ian@ianstormtaylor.com"},"maintainers":[{"name":"ianstormtaylor","email":"ian@ianstormtaylor.com"},{"name":"segmentio","email":"friends@segment.io"}],"directories":{}},"0.4.3":{"name":"hermes","version":"0.4.3","repository":{"type":"git","url":"git://github.com/segmentio/hermes.git"},"license":"MIT","description":"Messenger of the gods.","main":"lib/index.js","bin":{"hermes":"bin/hermes"},"dependencies":{"chalk":"^0.4.0","commander":"^2.2.0","component-type":"^1.0.0","lodash":"~2.4.1","indent":"0.0.1","to-function":"~2.0.3"},"devDependencies":{"mocha":"1.x","browserify":"~3.46.0"},"keywords":["chat","bot","robot","hipchat","irc","xmpp","hubot","slack"],"bugs":{"url":"https://github.com/segmentio/hermes/issues"},"homepage":"https://github.com/segmentio/hermes","_id":"hermes@0.4.3","dist":{"shasum":"bd306e4f4eb6280d458cc40d79b963d38da1caa1","tarball":"https://registry.npmjs.org/hermes/-/hermes-0.4.3.tgz","integrity":"sha512-QDPGkGB854KWFs94zff9YEufUoezSwMWsYjaPEFjHMzwxBJg+v1rxqw2YXWNtX3LOok/LHNcGOEjqUaQT3xlMw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD+IrPgjP3P30l4fKNtGL96DXKjS5FXWV1DHjIs6MVSsQIhAPHAFmXWvZAkNIlGcAzE2Yr16kqjXarkqOEGVtmQtLsN"}]},"_from":".","_npmVersion":"1.4.3","_npmUser":{"name":"ianstormtaylor","email":"ian@ianstormtaylor.com"},"maintainers":[{"name":"ianstormtaylor","email":"ian@ianstormtaylor.com"},{"name":"segmentio","email":"friends@segment.io"}],"directories":{}},"0.4.4":{"name":"hermes","version":"0.4.4","repository":{"type":"git","url":"git://github.com/segmentio/hermes.git"},"license":"MIT","description":"Messenger of the gods.","main":"lib/index.js","bin":{"hermes":"bin/hermes"},"dependencies":{"chalk":"^0.4.0","commander":"^2.2.0","component-type":"^1.0.0","lodash":"~2.4.1","indent":"0.0.1","to-function":"~2.0.3"},"devDependencies":{"mocha":"1.x","browserify":"~3.46.0"},"keywords":["chat","bot","robot","hipchat","irc","xmpp","hubot","slack"],"gitHead":"fe527aa3ec444ddda8f75bbf3796e2cef82514aa","bugs":{"url":"https://github.com/segmentio/hermes/issues"},"homepage":"https://github.com/segmentio/hermes","_id":"hermes@0.4.4","scripts":{},"_shasum":"586ecaa383b18254807369984e2f1adb6e371d3d","_from":".","_npmVersion":"2.0.0-alpha-5","_npmUser":{"name":"travisjeffery","email":"tj@travisjeffery.com"},"maintainers":[{"name":"ianstormtaylor","email":"ian@ianstormtaylor.com"},{"name":"segmentio","email":"friends@segment.io"},{"name":"travisjeffery","email":"tj@travisjeffery.com"}],"dist":{"shasum":"586ecaa383b18254807369984e2f1adb6e371d3d","tarball":"https://registry.npmjs.org/hermes/-/hermes-0.4.4.tgz","integrity":"sha512-vFNxmXTVXw+h0ENDMTb7zUQL02x1zDzo/T/iv5oHQcpJTNuMUPOa4IStMkMmnXQ0VPdUeLrv1reYDO/llSoQDA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDlQrisqvBfhRnPBzyQPPS9cI1biVnAGKEBvt7aq6ax+AiEAhesnPesuBI+HgB/wZW4Nsx812XOi14kNrtDzo8AcF+g="}]},"directories":{}}},"readme":"\n# hermes\n\nHermes is a friendly, pluggable chat bot. He's super easy to customize, so you can write your own plugins to teach him new tricks, and automate away all of the things!\n\n## Installation\n\n $ npm install hermes\n\n## Usage\n\nThe simplest way to use Hermes is to use the CLI paired with a `hermes.json` configuration file. Here's an example `hermes.json` file:\n\n```json\n{\n \"name\": \"Dr. Watson\",\n \"nickname\": \"watson\",\n \"plugins\": {\n \"hermes-math\": {},\n \"hermes-url-shortener\": {},\n \"hermes-hipchat\": {\n \"jid\": \"YOUR_HIPCHAT_JID\",\n \"password\": \"YOUR_HIPCHAT_PASSWORD\",\n \"apiKey\": \"YOUR_HIPCHAT_API_KEY\"\n }\n }\n}\n```\n\nThat would be setup to create a HipChat robot named \"Dr. Watson\", that would know how to do basic math and shorten URLs. Then, to run your robot, just do:\n\n $ node_modules/.bin/hermes\n\nYou'll see him connect to your HipChat room. Then you can ask him to do things:\n\n > You: @watson shorten https://github.com/segmentio/hermes\n > Dr. Watson: @you Sure thing: http://git.io/hJVhhQ\n\n > You: @watson 52/3\n > Dr. Watson: @you That would be: 17.333333333\n\n## Plugins\n\nCheck out the [Hermes site](TODO) for a list of all the open-source plugins you can add to your robot.\n\n## Javascript API\n\nHermes also comes with a Javascript API, for complicated use cases and full control over how Hermes is configured.\n\n#### `new Robot(name)`\n \nCreate a new `Robot` instance with the given `name`, defaulting to `'Hermes'`, and with its nickname defaulting to `'hermes'`.\n\n#### `robot.name([string])`\n\nGet or set the robot's name `string`. The **name** is the full, proper english way to format the robot's name, for example `'Picasso'` not `'picasso'`.\n\n#### `robot.nickname([string])`\n\nGet or set the robot's nickname `string`. The **nickname** is the chat-friendly way to format the robot's, for services that distinguish the two. For example, in HipChat this would correlate to the user's \"mention name\", so a robot named `'Hermes Hubeau'` might have a **nickname** of `'hermes'`, so that it can be mentioned with `@hermes`. By default, the **nickname** will just mirror the name.\n\n#### `robot.template([string])`\n\nGet or set the template for how the robot is mentioned. By default it is `'@%s '`, which converts via `util.format` to `'@hermes '`. (The robot's **nickname** is used for conversion.)\n\n#### `robot.mention(nickname)`\n\nReturn a mention string for the given nickname, defaulting to the robot's own nickname. This is so that plugins don't have to format the nicknames themselves. For example, `robot.mention('ian')` might return `'@ian '`.\n\n#### `robot.hear(message, [context])`\n\nSend the robot a `message` to process, with optional `context`. It'll decide which of its plugin's handlers to invoke. `context` is useful for situations where the message comes from a certain `user` or `room`, so that it can reply properly, for example:\n\n```js\nrobot.hear('@watson Hi Watson', {\n user: 'ian',\n room: 'hq'\n});\n```\n\n#### `robot.on(event, [regexp], [string], [context], callback)`\n\nThe robot is an event emitter, so by default `robot.on('event', callback)` will act exactly as expected. It fires the following events:\n\n - `name` - with the new `name` string\n - `nickname` - with the new `nickname` string\n - `template` - with the new `template` string\n - `hear` - with `match, context` whenever it hears an incoming message\n - `mention` - with `match, context` whenever it's mentioned in an incoming message\n\nBut it's also got augmented functionality, so that you can filter which incoming messages you want to listen to. You can filter by either a `regexp`, a `string` or a `context`. This is how plugins are made. For example, here's what the URL shortening plugin is listening for:\n\n```js\nrobot.on('mention', /^shorten (\\S+)$/i, callback);\n```\n\nOr if you just want to match a basic string:\n\n```js\nrobot.on('mention', 'surprise me', callback);\n```\n\nOr if you want to only match messages from a certain user:\n\n```js\nrobot.on('mention', { user: 'USER_ID' }, callback);\n```\n\nThese filters can be combined to add pretty complex logic to your robot, for example you can wait for an incoming reply from the user you're currently conversing with, so that you don't get noise from other users in the middle:\n\n```js\nrobot.on('mention', 'shorten', function(match, context){\n robot.say('What URL do you want to shorten?', context);\n robot.once('mention', { user: context.user }, function(match){\n var url = match[0];\n var res = shorten(url);\n robot.say(res, context);\n });\n});\n```\n\n#### `robot.once(event, [regexp], [string], [context], callback)`\n\nThe same as `robot.on()` but the `callback` will only ever be called once, and then it will be removed.\n\n#### `robot.off(event, callback)`\n\nRemove an event handler from the robot.\n\n#### `robot.say(message, [context])`\n\nSay a `message` with optional `context`.\n\n#### `robot.emote(message, [context])`\n\nEmote a `message` with optional `context`.\n\n#### `robot.reply(id, message, [context])`\n\nReply to a user by `id` with a `message` and optional `context`.\n\n#### `robot.topic(id, topic)`\n\nSet the `topic` of a room by `id`.\n\n#### `robot.error(message, [context])`\n \nSend an error `message` with optional `context`. The error `message` can also be a Javascript `Error` instance.\n\n#### `robot.warn(message, [context])`\n\nSend a warning `message` with optional `context`.\n\n#### `robot.success(message, [context])`\n\nSend a success `message` with optional `context`.\n\n#### `robot.user(id, [attrs])`\n\nGet or set a user by `id` with `attrs`, defaulting to a simple in-memory store.\n\n#### `robot.users()`\n\nGet all of the stored users.\n\n#### `robot.room(id, [attrs])`\n\nGet or set a room by `id` with `attrs`, defaulting to a simple in-memory store.\n\n#### `robot.rooms()`\n\nGet all of the stored rooms.\n\n#### `robot.data(key, [value])`\n\nGet or set a custom piece of data by `key` with `value`, defaulting to a simple in-memory store.\n\n#### `robot.help(trigger, description)`\n \nRegister a help `trigger` with a `description`, so that when the user says `@robot help` we can print out a useful list of commands, like:\n\n @robot shorten \n Returns a shortened goo.gl for the given .\n \n @robot math \n Calculate the value of a of math.\n\nThe trigger should just be `shorten ` and the `help` command will automatically add in the mention specific to the robot's configuration, eg. `@robot `.\n\n## Debugging\n\nDebugging ease was one of the core concerns when building Hermes. Since you need to use `stdin` in the shell to actually interact with the robot, the typical `node debug` workflow doesn't work well.\n\nInstead, using [`node-inspector`](https://github.com/node-inspector/node-inspector) you can easily call:\n\n $ node-inspector &\n $ hermes --debug-brk\n\nLike you're used to, and everything will just work.\n\n## Thank You!\n\nA _huge_ thank you to [Egor Kislitsyn](https://github.com/minibikini) for letting us use the `hermes` name on `npm`!\n\n## License\n\nThe MIT License (MIT)\n\nCopyright © 2014 Segment <friends@segment.io>\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n","maintainers":[{"email":"ian@ianstormtaylor.com","name":"ianstormtaylor"},{"email":"tools@segment.com","name":"segmentio"},{"email":"tj@travisjeffery.com","name":"travisjeffery"}],"time":{"modified":"2023-11-27T11:56:07.596Z","created":"2012-05-01T21:29:23.637Z","0.0.1":"2012-05-01T21:29:27.070Z","0.0.2":"2012-05-03T12:28:35.535Z","0.0.3":"2012-06-26T09:43:10.052Z","0.0.5":"2013-05-21T07:40:52.739Z","0.0.6":"2013-05-31T13:35:51.820Z","0.0.7":"2014-02-13T07:42:55.398Z","0.0.8":"2014-02-13T13:52:43.152Z","0.3.0":"2014-05-23T06:57:59.640Z","0.4.0":"2014-05-23T10:08:42.780Z","0.4.3":"2014-05-26T07:01:40.078Z","0.4.4":"2014-08-27T19:56:56.976Z"},"repository":{"type":"git","url":"git://github.com/segmentio/hermes.git"},"readmeFilename":"Readme.md","homepage":"https://github.com/segmentio/hermes","keywords":["chat","bot","robot","hipchat","irc","xmpp","hubot","slack"],"bugs":{"url":"https://github.com/segmentio/hermes/issues"},"license":"MIT","users":{"amparooviceversa":true}}