clonn / slack-node-sdk

slack.com, slack, node sdk
MIT License
167 stars 32 forks source link

callback can be omitted #5

Closed juanpabloaj closed 9 years ago

juanpabloaj commented 9 years ago

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.<anonymous> (/user/src/slack-node-sdk/node_modules/request/request.js:978:14)
     at Request.emit (events.js:117:20)
     at IncomingMessage.<anonymous> (/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)
clonn commented 9 years ago

@juanpabloaj thanks for contribute