slack-ruby / slack-ruby-bot

The easiest way to write a Slack bot in Ruby.
MIT License
1.12k stars 187 forks source link

without mention in channel bot can't reply #268

Closed fadhlimaulidri closed 3 years ago

fadhlimaulidri commented 3 years ago

can the bot reply member chat in channel without mention?

Screenshot 2020-07-16 at 15 13 51
dblock commented 3 years ago

Yes, there are a few ways to do this:

  1. Operators, messages prefixed with an operator, https://github.com/slack-ruby/slack-ruby-bot#commands-and-operators.
  2. Match and scan, https://github.com/slack-ruby/slack-ruby-bot#generic-routing
  3. Using a :message hook, https://github.com/slack-ruby/slack-ruby-bot#hooks

This is a common question, if someone (you) could build a demo and document this better I'd appreciate that.