|
|
|
# Lorebot
|
|
|
|
This is the bot running over at the sampled slack.
|
|
|
|
|
|
|
|
## Commands
|
|
|
|
### 2 parameters
|
|
|
|
* `lore`: get a specific lore
|
|
|
|
* `rip`: rest in piece a target
|
|
|
|
* `summon`: summon the specified target
|
|
|
|
* `gnu`: educate the target on freedoms
|
|
|
|
* `created`: lookup when lore was created (some old lore wont have this field)
|
|
|
|
* `owner`: lookup who created a lore (some old lore wont have this field)
|
|
|
|
* `removedby`: lookup who removed a lore
|
|
|
|
* `removed`: lookup when lore was removed
|
|
|
|
|
|
|
|
### 1 parameter
|
|
|
|
* `help`: display help message 1
|
|
|
|
* `help2`: display help message 2
|
|
|
|
* `rng`: display random lore with the new rng algorithm
|
|
|
|
* `depricatedrng`: select random lore with the old rng algorithm
|
|
|
|
* `roll`: generate a random 8 digit integer
|
|
|
|
* `d20`: roll a 20 sided die
|
|
|
|
* `rr`: play russian roulette
|
|
|
|
* `dice`: roll a 6 sided die
|
|
|
|
* `listen`: its what you hearin
|
|
|
|
* `lorelist`: generate a list of all lore
|
|
|
|
* `removedlore`: generate a list of removed lore
|
|
|
|
* `lorestatus`: display the number of active lore
|
|
|
|
|
|
|
|
|
|
|
|
## Building
|
|
|
|
This project makes use of the `make` command. The following commands are supported.
|
|
|
|
|
|
|
|
* `all`: dynamically compiles/builds the bot. outputs binary file to `bin/`
|
|
|
|
* `run`: runs the bot
|
|
|
|
* `stat`: statically compiles/builds the bot. outputs binary file to `bin/`
|
|
|
|
* `docker`: builds a docker image
|
|
|
|
* `aci`: builds an ACI image
|
|
|
|
* `test_docker`: tests the docker image
|
|
|
|
* `test_aci`: tests the ACI image
|
|
|
|
* `clean`: cleans the project directory of any temp files
|
|
|
|
|
|
|
|
## Configuration
|
|
|
|
This bot takes advantage of the gcfg configuration which follows the INI
|
|
|
|
syntax.
|
|
|
|
|
|
|
|
`config.gcfg`
|
|
|
|
```
|
|
|
|
[lorebot]
|
|
|
|
loglevel = "debug"
|
|
|
|
slackdebug = false
|
|
|
|
bootstrapdelay = 1
|
|
|
|
AuthFile = ".auth"
|
|
|
|
|
|
|
|
[redis]
|
|
|
|
host = "127.0.0.1:6379"
|
|
|
|
password = ""
|
|
|
|
```
|
|
|
|
* `loglevel`: loglevel for the app (debug/info/error)
|
|
|
|
* `slackdebug`: wheather or not to show slacks API debugging
|
|
|
|
* `bootstrapdeplay`: number in seconds to delay binding the bot to redis (useful in containers)
|
|
|
|
* `AuthFile`: name/location of file containing the slack key
|
|
|
|
* `host`: location of the redis server
|
|
|
|
* `password`: password of the redis server
|
|
|
|
|
|
|
|
`.auth`
|
|
|
|
```
|
|
|
|
xoxb-86456556-IJDJksfkejsjdfj
|
|
|
|
```
|
|
|
|
this is a key generated by slack for the bot
|