justlog/README.MD

57 lines
2.5 KiB
Markdown
Raw Normal View History

2020-06-01 10:18:48 -04:00
# justlog [![Build Status](https://github.com/gempir/justlog/workflows/ci/badge.svg)](https://github.com/gempir/justlog/actions?query=workflow%3Aci)
2017-03-08 18:16:37 -03:00
### What is this?
2020-12-05 13:52:12 -03:00
Justlog is an twitch irc bot. It focuses on logging and providing an api for the logs.
2022-07-31 09:04:32 -04:00
### Optout
Click the X icon on the web ui to find a explanation how to opt out.
2022-03-22 09:23:28 -03:00
### API
API documentation can be viewed via the justlog frontend by clicking the "docs" symbol:
![image](https://user-images.githubusercontent.com/1629196/159481078-0de98f01-2816-49bd-8e17-ba7cf66cb064.png)
### Docker
```
2021-11-23 08:40:31 -03:00
mkdir logs
docker run -p 8025:8025 --restart=unless-stopped -v $PWD/config.json:/etc/justlog.json -v $PWD/logs:/logs ghcr.io/gempir/justlog
```
### Commands
2021-11-23 08:20:19 -03:00
Only admins can use these commands
- `!justlog status` will respond with uptime
2022-07-26 14:58:29 -04:00
- `!justlog join gempir pajlada` will join the channels and append them to the config
- `!justlog part gempir pajlada` will part the channels and remove them from the config
- `!justlog optout gempir gempbot` will opt out users of message logging or querying previous logs of that user, same applies to users own channel
- `!justlog optin gempir gempbot` will revert the opt out
### Config
```
{
2020-08-26 21:35:20 -04:00
"admins": ["gempir"], // will only respond to commands executed by these users
"logsDirectory": "./logs", // the directory to log into
"adminAPIKey": "noshot", // your secret api key to access the admin api, can be any string, used in api request to admin endpoints
"username": "gempbot", // bot username (can be justinfan123123 if you don't want to use an account)
"oauth": "oauthtokenforchat", // bot token can be anything if justinfan123123
2021-09-28 05:39:52 -03:00
"botVerified": true, // increase ratelimits if you have a verified bot, so the bot can join faster, false by default
"clientID": "mytwitchclientid", // your client ID, needed for fetching userids or usernames etc
2020-10-10 19:00:24 -03:00
"clientSecret": "mysecret", // your twitch client secret
2022-07-27 10:53:15 -04:00
"logLevel": "info", // the log level, keep this to info probably, all options are: trace, debug, info, warn, error, fatal, and panic, logs output is stdout
2020-10-10 19:00:24 -03:00
"channels": ["77829817", "11148817"], // the channels (userids) you want to log
"archive": true // probably keep to true, will disable gzipping of old logs if false, useful if you setup compression on your own
}
```
2020-09-25 20:45:18 -03:00
2020-12-05 13:52:12 -03:00
### Development
2020-09-25 20:45:18 -03:00
2020-12-05 13:52:12 -03:00
Development requires [yarn](https://classic.yarnpkg.com/) and [go-swagger](https://goswagger.io/)
2020-09-25 20:45:18 -03:00
2020-12-05 13:52:12 -03:00
Run `go build && ./justlog` and `yarn start` in the web folder.
2020-10-08 16:52:58 -03:00
2022-03-22 09:23:28 -03:00
Or run `make container` and `make run_container`