sample-message-menus-node
sample-message-menus-node copied to clipboard
Getting method deprecated
When I run npm start, I get the following error:
> node index.js
server listening on port 3000
error: Response not OK: method_deprecated
Error: method_deprecated
at handleHttpResponse (/sample-message-menus-node/node_modules/@slack/client/lib/clients/transports/call-transport.js:103:17)
at handleTransportResponse (/sample-message-menus-node/node_modules/@slack/client/lib/clients/transports/call-transport.js:153:19)
at apply (/sample-message-menus-node/node_modules/lodash/lodash.js:478:17)
at wrapper (/sample-message-menus-node/node_modules/lodash/lodash.js:5337:16)
at Request.handleRequestTranportRes (/sample-message-menus-node/node_modules/@slack/client/lib/clients/transports/request.js:21:5)
at apply (/sample-message-menus-node/node_modules/lodash/lodash.js:478:17)
at Request.wrapper [as _callback] (/sample-message-menus-node/node_modules/lodash/lodash.js:5337:16)
at Request.self.callback (/sample-message-menus-node/node_modules/request/request.js:186:22)
at Request.emit (events.js:189:13)
at Request.<anonymous> (/sample-message-menus-node/node_modules/request/request.js:1060:10)
at Request.emit (events.js:189:13)
at IncomingMessage.<anonymous> (/sample-message-menus-node/node_modules/request/request.js:980:12)
at Object.onceWrapper (events.js:277:13)
at IncomingMessage.emit (events.js:194:15)
at endReadableNT (_stream_readable.js:1125:12)
at process._tickCallback (internal/process/next_tick.js:63:19)
The slackbot does not respond when I DM it. Any idea to resolve this?
hi @vsetlur I had the same issue, which I fixed in the following way:
I replaced the line in lib/bot.js where it said this.web.im(userId) with this.web.conversations.open({users:userId})
The web.im method has been deprecated, so that was the issue. Good luck!