https://arc-verification.unswsecurity.com
- Get a Mailgun API key (required for sending email, note: costs a small amount of money) and a Discord bot key.
- Using the exampledotenv file as a template, create a prod.env file with all the required details.
- Use docker-compose 1.25 or above to run the stack. Command:
docker-compose --env-file prod.env up -p vbot -d
- Manually migrate using
./scripts/migrate.sh
because I haven't gotten around to doing that yet. Usedocker inspect vbot_postgres_1
to get the IP address of the docker container. Then runDBHOST=<ip address> DBPASS=<POSTGRES_ROOT_PASSWORD inside prod.env> ./scripts/migrate.sh
to perform the migration. - Restart the API service by running
docker-compose --env-file app.env up api -d
otherwise it won't connect to a non-existent database.
- This bot was designed to be able to service multiple clubs on multiple servers, but is currently only being used by the UNSW Security Society.
- Still working on a more granular security model, but it should be fine for now.
- Enable developer mode on discord. Right click on your username on the bottom left and go into User Settings > Appearance > Developer Mode.
- Modify the
scripts/club-template.json
file to your liking. - Run
curl -X POST -H "Content-Type: application/json" -d scripts/club-template.json -H 'Authorization: Bearer srv.<API_SECRET inside the prod.env>' https://server_address/priv/clubs
to create the club. For thediscord_id
, right click on the server and select copy id. - Add the bot to your server by following the instructions on the Discord developer page.
- A user with administrator permissions needs to run
$avsetadmin
on a channel which only moderators are allowed to access. - From that channel, they will then need to run
$avsetverified @mention-the-role
to set the role for verified users.
TODO
- Automatic deletion if user doesn't verify within an hour
- More robust authentication between services.