question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Chatbot did not response to some people

See original GitHub issue

Hi,

I’m developing a simple chatbot using slackbot toolkit. However, my bot only response to some people (about 3 people) in the channel. When other people send messages to the bot, nothing received at the respond_to function. My function is this:

@respond_to('(.*)') def process_message(message, text): logger.info(text) text = text.lower() if (text.startswith('hello')): message.reply('Hi, how can I help?') else: reply = TFIDF.predict(text) message.reply(reply)

Do you have any suggestion? Thanks.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
StewPollcommented, Oct 7, 2016

Hey hey!

I helped solve a similar issue in limbot. The issue there was how the underlying slackrtm library was handling events. I can see the similar thing happening here.

In particular it’s happening due to this code:

    def loop(self):
        while True:
            events = self._client.rtm_read()
            for event in events:
                if event.get('type') != 'message':
                    continue
                self._on_new_message(event)
            time.sleep(1)

Because you’re ignoring every event that doesn’t have the type attribute message you’re not able to update the user base. Of particular use to the issue that was happening in limbo, were the group_joined events, when the bot is added to a new group, and the team_joined event, when a new member is added to the team.

I’ll have a look at the codebase and see if I can figure out how to solve this here to. Any pointers you can provide to the following would be great help to me!

  • Where does it create the list of groups it is upon start up?
  • Where does it create the list of users in the team upon start up?
0reactions
jtatumcommented, Apr 8, 2017

No response from original reporter, but this does sound like a dupe of #61.

Read more comments on GitHub >

github_iconTop Results From Across the Web

5 Typical Chatbot Fails + Prevention Tips - Userlike
Chatbot fails can be hilarious, but when you're the victim, it's just frustrating. Here's how to prevent common fails at your business.
Read more >
Chatbot does not respond to some users : r/Telegram - Reddit
Background: I am currently developing some DialogFlow chatbots, and one of our tasks was to integrate if with telegram.
Read more >
Breaking Down the Pros and Cons of Chatbots as a Customer ...
One of the advantages of chatbots is that, unlike humans, bots can respond to customer inquiries around the clock without costing you extra....
Read more >
Lessons From The Failed Chatbot Revolution - CB Insights
Many chatbots couldn't understand enough human language or process enough data to complete the kinds of complex requests companies promised they ...
Read more >
Why You Don't Need an AI Support Chatbot - Help Scout
While the promise of using a support chatbot is compelling, there are better ways to improve team efficiency while delivering great support.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found