Leif
Leif is a really stupid Go bot for Slack
Requirements
In order for Leif to run you need to:
- Create a Slack bot user.
- Then generate an OAuth2 bot token from the apps page.
The actual token can then be found under the Your Apps page if you click on the name of your created bot and then go to the OAuth & Permissions
page and then Bot User OAuth Access Token
.
The token should start with xoxb-*.
Running Leif
Make sure you have the generated tokens from the requirements step and run:
docker run -e SLACK_TOKEN=<slack-token> antonjah/leif
Running with all functionality:
docker run -d --restart unless-stopped \
-e SLACK_TOKEN=<slack-token> \
-e GITLAB_TOKEN=<gitlab-token> \
-e GITLAB_BASE_URL=<gitlab-url> \
-e POSTMORD_TOKEN=<postmord-token> \
-e JIRA_URL=<jira-url> \
-e JIRA_USERNAME=<jira-username> \
-e JIRA_TOKEN=<jira-token> \
antonjah/leif
Commands
List of possible commands
Asking a question
Leif <question>?
Examples:
Leif what is the meaning of life?
Leif what is the weather like in Skellefteå?
Leif how high is the empire state building?
Leif what's the IMDB score for Band of Brothers?
F1 Results
Get the latest grand prix results
.f1
Search for something you'd like to eat or get a specific menu for a restaurant
.lunch carbonara
.lunch pizzeria mama mia
Get all lunch menus for today
.lunch
Tacos
If you want to know if any restaurants are serving tacos today, there's a command for that!
.tacos
Insult
Insulting someone. What more do you need?
.insult @Simon
GitLab
Given that the GITLAB_TOKEN
and GITLAB_BASE_URL
ENVs are set you can search GitLab for
commits, projects and merge requests
.gitlab JIRAISSUE1234
PostMord
Given that the POSTMORD_TOKEN
ENV is set you can get the shipment status for your parcel
from PostNord
.postmord 1234567890
TLDR
Leif will try to get information on how to use a specific command
.tldr docker-compose
.tldr grep
Flip
Flip a coin
.flip
Decide
Make Leif decide something for you
.decide do we really need these unit tests?
Log
Get Leif logs. Supported levels are:
- Info
- Warning
- Error
- Fatal
- Trace
- Debug
- Panic
.log error
Corona
Get the COVID19 status for a country
.corona sweden
JIRA
Get information about an issue on JIRA
.jira FOO-1234
Suggest
Having trouble naming a variable or a baby?
.suggest
Help
Output help and known commands
.help