Describe your issue here.
x in one of the [ ])x in each of the [ ])Filling out the following details about bugs will help us solve your issue sooner.
package version: 1.4.1
node version: 10 or above
OS version(s): ubuntu
What you expected to happen
respond message to slack messenger
What actually happened
TypeError: respond is not a function
app.action('action-code', async ({ action, ack, respond, body, context }) => {
ack();
respond(`action received`);
console.log('passing data to function');
});
(node:4492) UnhandledPromiseRejectionWarning: TypeError: respond is not a function
at app.action (/home/ubuntu/youSlack_v2/index.js:279:2)
at next (/home/ubuntu/youSlack_v2/node_modules/@slack/bolt/dist/middleware/process.js:18:13)
at /home/ubuntu/youSlack_v2/node_modules/@slack/bolt/dist/middleware/builtin.js:141:9
at next (/home/ubuntu/youSlack_v2/node_modules/@slack/bolt/dist/middleware/process.js:18:13)
at exports.onlyActions (/home/ubuntu/youSlack_v2/node_modules/@slack/bolt/dist/middleware/builtin.js:13:5)
at Object.processMiddleware (/home/ubuntu/youSlack_v2/node_modules/@slack/bolt/dist/middleware/process.js:51:5)
at listeners.forEach (/home/ubuntu/youSlack_v2/node_modules/@slack/bolt/dist/App.js:245:27)
at Array.forEach (<anonymous>)
at process_1.processMiddleware (/home/ubuntu/youSlack_v2/node_modules/@slack/bolt/dist/App.js:243:28)
at next (/home/ubuntu/youSlack_v2/node_modules/@slack/bolt/dist/middleware/process.js:42:13)
at process._tickCallback (internal/process/next_tick.js:61:11)
(node:4492) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:4492) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
@johnsonyick Hello, I guess this block_actions request is coming from a view (=modal or App Home). Am I right? If so, the payload in the case doesn't have a response_url so that respond function is unavailable.
@seratch Thanks so much for your clear eye, I have figured out how to identify it, you saved my days!
I'm glad it helped you! Allow me to close this issue now.
I'm struggling with this same issue.
How can I respond to an ephemeral message after closing a modal?
the flow is post eph message with button -> open modal -> update eph message on modul submit.
Most helpful comment
I'm glad it helped you! Allow me to close this issue now.