Repository for the discord bot of 42CTF
Go to file
Starthur 1806c9b494 Merge pull request 'fix(bot): Check if user exist before perform action' (#6) from Starthur/bot:main into main
Reviewed-on: 42CTF/bot#6
2023-02-07 09:25:07 +01:00
.dockerignore dockerfiles + env lice 2022-02-18 20:54:27 +01:00
.gitignore Add docker-compose 2022-05-28 12:24:10 +02:00
Dockerfile Change Discord bot to GO 2023-02-06 21:58:22 +01:00
README.md Update 'README.md' 2023-02-06 22:19:55 +01:00
api.go Change Discord bot to GO 2023-02-06 21:58:22 +01:00
discord.go fix(bot): Check if user exist before perform action 2023-02-07 09:22:32 +01:00
docker-compose.yaml fix(bot): Check if user exist before perform action 2023-02-07 09:22:32 +01:00
go.mod Change Discord bot to GO 2023-02-06 21:58:22 +01:00
go.sum Change Discord bot to GO 2023-02-06 21:58:22 +01:00
main.go fix(bot): Check if user exist before perform action 2023-02-07 09:22:32 +01:00
rank.go fix(bot): Check if user exist before perform action 2023-02-07 09:22:32 +01:00

README.md

Discord bot for 42CTF

This bot allows you to automatically assign the top1/top10/top50 roles on the 42CTF Discord server.

Create an env_file file containing :

DISCORD_TOKEN=<token_discord>
AUTH_TOKEN=<api_42CTF_token>

And then run it with :

docker-compose up --build -d

By default it will run on 42CTF Guild and with RolesID from this server. You can run :

docker-compose run bot_discord [--wait WAIT] [--force] [--dryrun]

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