From 1b99bf9d688fb4b5283c4cedcded7dbdfbacfc4f Mon Sep 17 00:00:00 2001 From: PixeL Date: Tue, 25 Aug 2020 04:55:11 -0500 Subject: [PATCH] Update readme --- README.md | 34 +++++++++++++++++++++------------- 1 file changed, 21 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index d4e3667..b8ab330 100644 --- a/README.md +++ b/README.md @@ -1,27 +1,35 @@ # slack_rtm -TODO: Write a description here +A crystal slack real-time-messaging lib ## Installation -TODO: Write installation instructions here +Just add to your `dependencies` and DEWIT -## Usage +```yaml +slack_rtm: + git: https://git.sr.ht/~pixelinc/Slack-RTM + branch: master +``` -TODO: Write usage instructions here +## Usage -## Development +```cr +client = Slack::Client.new("token") -TODO: Write development instructions here +# optionally enable caching +cache = Slack::Cache.new(client) +client.cache = cache -## Contributing +client.on_message do |event| + user = cache.resolve_user(event.user) + puts "I got a message that says: #{event.text}" + puts user.name +end -1. Fork it () -2. Create your feature branch (`git checkout -b my-new-feature`) -3. Commit your changes (`git commit -am 'Add some feature'`) -4. Push to the branch (`git push origin my-new-feature`) -5. Create a new Pull Request +client.run +``` ## Contributors -- [your-name-here](https://github.com/your-github-user) - creator and maintainer +- [PixeL](https://git.sr.ht/~pixelinc) - creator and maintainer -- 2.45.2