Let existing users of a Discord guild approve new joins
Did I save you some time? Buy me a ☕😄
- User joins Discord guild
- Approvals Team will be messaged via Approvals Channel
- A member of the approvals team will confirm their approval
- The user who joined will be given the public role
Bot will listen with prefix * and will only listen to the Guild owner!_
- Join the bot to your server
- Run the following commands in any text channel Approova can see, as the guild owner
*setApproverChannel <name of channel>
to set the text channel where Approvers will receive requests.*setApproverRole <name of role>
to set the role required to approve a request.*setPublicChannel <name of channel>
to set the public room that Approova will talk to new members in.*setPublicRole <name of role>
to set the public role to assign after approval.- Move
Approova
role to top of roles list in Discord Guild Settings
At this point, Approova will monitor for new joins to the Guild and execute the flow as outlined above.
The master branch is the latest working copy of the project. It should be considered unstable. Use a latest Release for a stable version.
- Create a Discord Bot Token as outlined in the Production Notes section.
Use VSCode Dev Containers extension to get off the ground quickly.
This project uses cgo for sqlite connection. You can find build instructions for non-x86 architectures in this project.
The docker image is built for linux/amd64 (amd64), linux/arm/v7 (armhf), and linux/arm/v8 (aarch64).
You should install Docker Compose if you haven't already.
Then, modify the docker-compose.yml to include your Discord Bot Token.
Finally, run: docker-compose up -d
In production, the application will default to using /content
to store the sqlite database.
Replace image: alex4108/approova
with build: .
in the docker-compose.yml file.
Replace the 9999
Discord Bot Token with your own
Run: docker-compose up -d
In the kube/
directory there are two files of importance, deployment.yml.template
and pv.yml
There are a few variables in deployment.yml.template
which get filled in by the travis.sh
script while the pipeline is running, namely:
environment
: The environment tag, eglive|test
COMMIT
: The commit / container tag to deploy
You must deploy the PV's and PVC's in pv.yml
once, before running any deployments.
You must deploy a secret that the pod will use for the Discord Bot Token:
kubectl create secret generic approova-environment-discord --from-literal=username="discord" --from-literal=password="${APPROOVA_DISCORD_TOKEN}"
Be sure to edit these configurations to match your environment's needs.
- This guide seems to have a good write up on how to generate a bot token.
- Note that during the creation of the bot, you will need to enable the "Server Members Intent" flag on the Bot page in the Discord developers portal.
- Once you have the token in step 5, replace "9999" in the
docker-compose.yml
file with your bot's token. - Finally, craft your authorization URL. You can copy the authorization URL from the Discord developers portal as mentioned in step 5.
- Once the authorization URL is copied, replace the permissions integer with that from the URL given above to join the public bot to your server.
- You should now be able to visit your authorization URL and join your own bot to your Discord guild.
Contributions are what make the open source community such an amazing place to be learn, inspire, and create. Any contributions you make are greatly appreciated.
- Fork the project
- Create your feature branch (
git checkout -b feature/AmazingFeature
) - Make changes, and update
CHANGELOG.md
to describe them. - Commit your changes (
git commit -m 'Add some AmazingFeature'
) - Push to the branch (
git push origin feature/AmazingFeature
) - Open a pull request