Skip to content

Commit

Permalink
Update CHANGELOG.md and README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
Michal Dudzinski committed Feb 28, 2018
1 parent db0dbc2 commit faa108a
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
### 0.10.6 (Next)

* Your contribution here.
* [#180](https://github.com/slack-ruby/slack-ruby-bot/pull/180): Allow to respond to text in attachments #177 - [@mdudzinski](https://github.com/mdudzinski).
* [#173](https://github.com/slack-ruby/slack-ruby-bot/pull/173): Exposing SlackRubyBot::CommandsHelper.find_command_help_attrs - [@alexagranov](https://github.com/alexagranov).
* [#179](https://github.com/slack-ruby/slack-ruby-bot/pull/179): Allow multiline expression - [@tiagotex](https://github.com/tiagotex).

Expand Down
17 changes: 17 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,23 @@ end

See [examples/market](examples/market/marketbot.rb) for a working example.

### Matching text in message attachments

You can respond to text in [attachments](https://api.slack.com/docs/message-attachments) with
`attachment`. It will scan `text`, `pretext` and `title` fields in each attachment until a first
match is found.

For example you can match [this example attachment](goo.gl/K0cLkH)
by its `title` with the following bot:

```ruby
class Attachment < SlackRubyBot::Bot
attachment 'Slack API Documentation' do |client, data, stocks|
data.attachments[0] # access the attachment record and do somethig with it
end
end
```

### Providing description for your bot and commands

You can specify help information for bot or commands with `help` block, for example:
Expand Down

0 comments on commit faa108a

Please sign in to comment.