scrapinghub / slackbot

A chat bot for Slack (https://slack.com).
MIT License
1.26k stars 394 forks source link

Is is possible for a bot which is added in slack channel to listen in the background? #137

Open PrajaktaNaik opened 7 years ago

PrajaktaNaik commented 7 years ago

I have a usecase, where I want to add my bot to a slack channel and want to make it listen in the background to all the conversations people have. If a user posts a question and no body answers it for say 2hrs, I want the bot to be active and reply to it. If someone already repplies to the question, the bot shall remain silent. Is there any idea about how to implement this?

jtatum commented 7 years ago

PR #95 would add a mechanism to call a function that happens when the bot is idle. A listen_to function could record conversations into a data structure of some sort, then the idle function could iterate through the data structure. Doing this without creating a memory leak would be the trick.