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.

Adding conversation awareness to slack

Adding conversation awareness to slack - Node.js Tutorial

From the course: Building Bots with Node.js

Start my 1-month free trial

Adding conversation awareness to slack

- [Instructor] We just created our conversation service, and now it's time to add this to our Slack back-end. Now in this case I will just require this service in my routing file because it's stating we don't create an instance that we want to pass along between different routes, so it's totally fine. So just add here "Conversation Service equals require "services Conversation Service." And now we want to modify our process event function to use this service. Let's scroll down. And I see here that we have one chrono case that we're handling there, and I see that we have one cona case that we're handling here in line 34 and 35. It's the case when the user just mentions our bot and we don't really get any event text. In this case, we don't want to send that to wit. So we should also handle that within our conversation service, so I'll add this real quick. I'll open Conversation Service js, and in there, I will just say, after…

Contents