zenbot is a Slack bot that enforces "zen periods" for users, during which they are reprimanded for using Slack. Currently, the only available action is giving negative karmabot karma points.
- add a zen:
./zen <duration e.g. 1h30m> [reason - optional]
- cancel a zen:
./zen cancel [reason]
- cancel all zens:
./zen cancel
- clone the repo:
git clone -b v1.1.0 https://github.com/kamaln7/zenbot.git
- run
go get
and thengo build
insidecmd/zenbot
cd zenbot
go get
cd cmd/zenbot
go build
- head to the repo's releases page and download the appropriate latest release's binary for your system
- add a Slack Bot integration:
https://team.slack.com/apps/A0F7YS25R-bots
. an avatar is available here. - invite
zenbot
to any existing channels and all future channels (this is a limitation of Slack's bot API, unfortunately) - run
zenbot
. the following options are supported:
option | required? | description | default |
---|---|---|---|
-token string |
yes | slack RTM token | |
-debug=bool |
no | set debug mode | false |
-timeout string |
no | timeout between actions (karma downvotes) | 10s |
-whitelist.chan string |
no | may be specified multiple times set a list of channel that zenbot may be used in. | [] |
example: ./zenbot -token xoxb-abcdefg -whitelist.chan zen -whitelist.chan zenbot-test
It is recommended to pass zenbot's logs through humanlog. humanlog will format and color the JSON output as nice easy-to-read text.
A systemd service unit file is available here. Edit the service file and replace xoxb-abcdefg
with your Slack RTM token. Install it as usual.
see ./LICENSE