Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/go-joe/slack-adapter
Slack adapter for the Joe bot library
https://github.com/go-joe/slack-adapter
bot chat chatbot-framework joe slack
Last synced: 20 days ago
JSON representation
Slack adapter for the Joe bot library
- Host: GitHub
- URL: https://github.com/go-joe/slack-adapter
- Owner: go-joe
- License: bsd-3-clause
- Created: 2019-03-03T11:29:20.000Z (almost 6 years ago)
- Default Branch: main
- Last Pushed: 2022-01-30T14:03:23.000Z (almost 3 years ago)
- Last Synced: 2024-09-23T09:16:21.544Z (4 months ago)
- Topics: bot, chat, chatbot-framework, joe, slack
- Language: Go
- Homepage: https://github.com/go-joe/joe
- Size: 92.8 KB
- Stars: 7
- Watchers: 4
- Forks: 9
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
Joe Bot - Slack Adapter
Connecting joe with the Slack chat application. https://github.com/go-joe/joe
---
This repository contains a module for the [Joe Bot library][joe].
## Getting Started
This library is packaged as [Go module][go-modules]. You can get it via:
```
go get github.com/go-joe/slack-adapter
```### Example usage
In order to connect your bot to slack you can simply pass it as module when
creating a new bot:```go
package mainimport (
"os""github.com/go-joe/joe"
"github.com/go-joe/slack-adapter/v2"
)func main() {
b := joe.New("example-bot",
slack.Adapter(os.Getenv("SLACK_TOKEN")),
…
)
b.Respond("ping", Pong)err := b.Run()
if err != nil {
b.Logger.Fatal(err.Error())
}
}
```If you want to use the [Slack Events API](https://api.slack.com/events-api) you
need to call the `slack.EventsAPIAdapter(…)` function instead.The adapter will emit the following events to the robot brain:
- `joe.ReceiveMessageEvent`
- `joe.UserTypingEvent`
- `reactions.Event`## Built With
* [slack-go/slack](https://github.com/slack-go/slack) - Slack API in Go
* [zap](https://github.com/uber-go/zap) - Blazing fast, structured, leveled logging in Go
* [testify](https://github.com/stretchr/testify) - A simple unit test library## Contributing
The current implementation is rather minimal and there are many more features
that could be implemented on the slack adapter so you are highly encouraged to
contribute. If you want to hack on this repository, please read the short
[CONTRIBUTING.md](CONTRIBUTING.md) guide first.## Versioning
We use [SemVer](http://semver.org/) for versioning. For the versions available,
see the [tags on this repository][tags].## Authors
- **Friedrich Große** - *Initial work* - [fgrosse](https://github.com/fgrosse)
See also the list of [contributors][contributors] who participated in this project.
## License
This project is licensed under the BSD-3-Clause License - see the [LICENSE](LICENSE) file for details.
[joe]: https://github.com/go-joe/joe
[go-modules]: https://github.com/golang/go/wiki/Modules
[tags]: https://github.com/go-joe/slack-adapter/tags
[contributors]: https://github.com/go-joe/slack-adapter/contributors