0

I want my bot to respond only if anyone mentions its name like @mybot.

How to achieve this?

Erik Kalkoken
  • 30,467
  • 8
  • 79
  • 114
Mohamed Naveen
  • 131
  • 1
  • 4
  • 8
  • Possible duplicate of [How to make slackbot reply if the message starts only with a tag](https://stackoverflow.com/questions/52878765/how-to-make-slackbot-reply-if-the-message-starts-only-with-a-tag) – Erik Kalkoken Oct 25 '18 at 09:44
  • This question is already answered here: https://stackoverflow.com/questions/41864731/slack-event-api-for-bot-mentions/41875457#41875457 – Erik Kalkoken Oct 25 '18 at 12:45

1 Answers1

0

For that you need to use the Events API and subscribe to the event app_metion.

That way your app will receive all message that directly mention your bot with @mybot.

Those messages will be sent as request from Slack to the endpoint provided for receiving events.

Erik Kalkoken
  • 30,467
  • 8
  • 79
  • 114