clonn/slack-node-sdk — pull request #5 by juanpabloaj (2014-11-29 21:51:43+00:00)
Title: callback can be omitted

with a `if` the callback can be omitted, like

slack.api('chat.postMessage', {text:'hello from nodejs', channel:'#general'});

without the `if` I get this error message

TypeError: undefined is not a function
at Request._callback (/user/src/slack-node-sdk/lib/lib/slack.seed.js:87:7)
at Request.self.callback (/user/src/slack-node-sdk/node_modules/request/request.js:121:22)
at Request.emit (events.js:98:17)
at Request. (/user/src/slack-node-sdk/node_modules/request/request.js:978:14)
at Request.emit (events.js:117:20)
at IncomingMessage. (/user/src/slack-node-sdk/node_modules/request/request.js:929:12)
at IncomingMessage.emit (events.js:117:20)
at _stream_readable.js:929:16
at process._tickCallback (node.js:419:13)