Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/brenns10/slacksoc
Slack bot framework. Runs on YAML and procrastination.
https://github.com/brenns10/slacksoc
bot golang slack
Last synced: about 8 hours ago
JSON representation
Slack bot framework. Runs on YAML and procrastination.
- Host: GitHub
- URL: https://github.com/brenns10/slacksoc
- Owner: brenns10
- Created: 2017-03-16T21:34:49.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2017-09-23T18:13:52.000Z (about 7 years ago)
- Last Synced: 2024-06-20T03:36:03.322Z (5 months ago)
- Topics: bot, golang, slack
- Language: Go
- Homepage:
- Size: 87.9 KB
- Stars: 3
- Watchers: 4
- Forks: 0
- Open Issues: 10
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
Awesome Lists containing this project
README
slacksoc [![GoDoc](https://godoc.org/github.com/brenns10/slacksoc?status.svg)](https://godoc.org/github.com/brenns10/slacksoc)
========This is a new, and maybe improved Slack bot library for Go.
Features:
- Plugin based architecture, providing built-in documentation for users
- Configure plugins through a single YAML file
- Entire Slack API exposed to plugins
- Bot operations are thread-safe, allowing plugins to leverage concurrencyIncluded Plugins:
- Triggers / responses, like the original Slackbot
- Send [CWRU/Yelp Love](https://github.com/hacsoc/love)
- Create GitHub issuesUsage
-----If all you would like to do is use the included plugins, usage is simple. First,
install the `slacksoc` binary:go get github.com/brenns10/slacksoc/slacksoc
Create a YAML configuration file - see [sample.yaml](sample.yaml) for an
example. Be sure that, at a minimum, the config contains your Slack API token,
and an entry with appropriate configuration for each plugin you want to use.
Finally, run the bot like this:slacksoc config.yaml
### Using External Plugins
If you would like to implement your own plugins, or use a third-party plugin (if
they ever exist), you will need to write a small amount of boilerplate code.
This is because Go has no support for dynamic module loading, and therefore
plugins need to be registered with the bot before they can be used. Here is a
sample:```go
package mainimport "github.com/brenns10/slacksoc/lib"
import "github.com/brenns10/slacksoc/plugins"func main() {
plugins.Register()
lib.Register("plugin name", PluginConstructor)
lib.Run()
}
```### Developing Plugins
This slack bot implementation focuses on providing a simple and powerful
experience for plugin developers. Currently, the plugin interface is still in
flux, but it will soon stabilize. Documentation on plugin development can be
found in the [Wiki](https://github.com/brenns10/slacksoc/wiki).- [GoDoc (lib)](https://godoc.org/github.com/brenns10/slacksoc/lib)
- [GoDoc (plugins)](https://godoc.org/github.com/brenns10/slacksoc/plugins)### Contributing
Contributions to this repository are welcomed! Changes ought to be tested on a
real Slack team before being submitted. Plugin contributions will be accepted at
my (Stephen's) sole discretion, since custom plugins are easy to use without
being part of the core plugin set. See the Github issues for suggestions on
bugs, features, and plugins I'm interested in.Please make sure that when you do development, you install the pre-commit hooks:
```
$ pip install --user pre-commit
$ pre-commit install
```This ensures well-formatted code. You need only do this the first time you check
out the repository.