Skip to content
This repository has been archived by the owner on Sep 20, 2024. It is now read-only.

bot start conversation based on another bot #558

Closed
trongdong opened this issue Dec 16, 2016 · 2 comments
Closed

bot start conversation based on another bot #558

trongdong opened this issue Dec 16, 2016 · 2 comments

Comments

@trongdong
Copy link

Hi there,
First, thanks for your great library.
At the moment, we have another bot (bot A) in our channel. I want my bot (botkit) to listen to these messages and start conversation with another member (John).
Like this:

Bot A: Yay! Build #1550 passed 
Botkit: hi @john, do you want to deploy it now? 
John: yes, please do it
Botkit: Done! 

How can I achieve this use botkit? I can listen on bot_message event but I don't know how to start conversation with another member?

@trongdong
Copy link
Author

Ok, I figured it out.
I need to create a message object to do so.

    const context = {
      user: config.owner,
      channel: message.channel
    }
    bot.startConversation(context, (err, convo) => {
    // conversation logic goes here
    });

Just wondering if this is the right way to do it?

@benbrown
Copy link
Contributor

Yes, this is how to do it.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants