From the course: Building Bots with Node.js
Unlock the full course today
Join today to access over 22,600 courses taught by industry experts or purchase this course individually.
Handling threaded messages - Node.js Tutorial
From the course: Building Bots with Node.js
Handling threaded messages
- In this video we will extend our bot so that it can follow up messages in a thread even if it wasn't mentioned. For that we will create a new handle that will listen to message events and check if the incoming message is part of a thread we have a session for. This means it's an ongoing conversation. First of all, we want to factor out now everything that we need for mentions as well as for handling messages into a separate function. So, starting with line 40, I will now copy out that code block starting with this regex for mention, and down to posting the message to slack. And I will simply create the new function, async function, process event, and this function should get a session and the event. Pasting in this code block, and I now have to of course call that from my mention handles, so I add return process event, and I'm passing in the session, enter current event. Now I am implementing new handler…
Contents
-
-
-
-
-
(Locked)
Creating conversational flows2m 49s
-
(Locked)
Creating a session management service6m 32s
-
(Locked)
Preparing to add threaded sesssions2m 4s
-
(Locked)
Creating sessions and threads on mentions4m 15s
-
(Locked)
Handling threaded messages3m 44s
-
(Locked)
Implementing a conversation service6m 40s
-
(Locked)
Adding conversation awareness to slack5m 1s
-
(Locked)
Training special and partial utterances7m 3s
-
(Locked)
Handling greetings and good byes4m 13s
-
(Locked)
-
-