bot/README.md

33 lines
1.1 KiB
Markdown
Raw Permalink Normal View History

2022-05-27 14:30:58 +02:00
# Discord bot for 42CTF
This bot allows you to automatically assign the top1/top10/top50 roles on the 42CTF Discord server.
2022-05-28 13:35:09 +02:00
Create an `env_file` file containing :
2022-05-27 14:30:58 +02:00
```
DISCORD_TOKEN=<token_discord>
AUTH_TOKEN=<api_42CTF_token>
```
And then run it with :
```
2023-02-06 21:58:22 +01:00
docker-compose up --build -d
2022-05-27 14:30:58 +02:00
```
2023-02-06 21:58:22 +01:00
By default it will run on 42CTF Guild and with RolesID from this server.
You can run :
```
2023-02-06 22:19:55 +01:00
docker-compose run bot_discord [--wait WAIT] [--force] [--dryrun]
2023-02-06 21:58:22 +01:00
```
## Arguments
| arg | Default | Usage |
|:------------:|:-------:|:---------------------------------------------:|
| --guild / -g | `nil` | Guild ID |
| --top1 | `nil` | TOP1 Role ID |
| --top10 | `nil` | TOP10 Role ID |
| --top50 | `nil` | TOP10 Role ID |
| --wait | `1` | Minutes to wait between runs |
| --force | `false` | Force update of all users |
| --dryrun | `false` | Display log but don't execute discord command |