justlog/README.MD

53 lines
2.3 KiB
Markdown
Raw Normal View History

2020-06-01 16:18:48 +02: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 22:16:37 +01:00
### What is this?
2020-12-05 17:52:12 +01:00
Justlog is an twitch irc bot. It focuses on logging and providing an api for the logs.
2022-03-22 13:23:28 +01: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 12:40:31 +01: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 12:20:19 +01:00
Only admins can use these commands
- `!justlog status` will respond with uptime
2022-07-26 22: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-27 03:35:20 +02:00
"admins": ["gempir"], // will only respond to commands executed by these users
"logsDirectory": "./logs", // the directory to log into
2020-10-11 00:00:24 +02:00
"adminAPIKey": "noshot", // your secret api key to access the admin api (documented below)
"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 10:39:52 +02: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-11 00:00:24 +02:00
"clientSecret": "mysecret", // your twitch client secret
"logLevel": "info", // the log level, keep this to info probably
"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-26 01:45:18 +02:00
2020-12-05 17:52:12 +01:00
### Development
2020-09-26 01:45:18 +02:00
2020-12-05 17:52:12 +01:00
Development requires [yarn](https://classic.yarnpkg.com/) and [go-swagger](https://goswagger.io/)
2020-09-26 01:45:18 +02:00
2020-12-05 17:52:12 +01:00
Run `go build && ./justlog` and `yarn start` in the web folder.
2020-10-08 21:52:58 +02:00
2022-03-22 13:23:28 +01:00
Or run `make container` and `make run_container`