Skip to content

Approova is a Discord Bot to allow existing members in your guild to approve new members.

License

Notifications You must be signed in to change notification settings

alex4108/Approova

Repository files navigation

Approova Discord Bot

Tests Release GitHub forks GitHub stars GitHub contributors GitHub license GitHub All Releases Docker Pulls Discord

Supports Architecture aarch64 Supports armhf Supports amd64

Discord Support

Purpose

Let existing users of a Discord guild approve new joins

Did I save you some time? Buy me a ☕😄

Bot workflow

  1. User joins Discord guild
  2. Approvals Team will be messaged via Approvals Channel
  3. A member of the approvals team will confirm their approval
  4. The user who joined will be given the public role

Configure the bot

Bot will listen with prefix * and will only listen to the Guild owner!_

  1. Join the bot to your server
  2. Run the following commands in any text channel Approova can see, as the guild owner
  3. *setApproverChannel <name of channel> to set the text channel where Approvers will receive requests.
  4. *setApproverRole <name of role> to set the role required to approve a request.
  5. *setPublicChannel <name of channel> to set the public room that Approova will talk to new members in.
  6. *setPublicRole <name of role> to set the public role to assign after approval.
  7. 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.

Running in Development

The master branch is the latest working copy of the project. It should be considered unstable. Use a latest Release for a stable version.

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.

Running in Production

From Online Sources

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.

From Local Sources

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

Using Kubernetes

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, eg live|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.

Production Notes

  • 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.

Contributing

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.

  1. Fork the project
  2. Create your feature branch (git checkout -b feature/AmazingFeature)
  3. Make changes, and update CHANGELOG.md to describe them.
  4. Commit your changes (git commit -m 'Add some AmazingFeature')
  5. Push to the branch (git push origin feature/AmazingFeature)
  6. Open a pull request

About

Approova is a Discord Bot to allow existing members in your guild to approve new members.

Resources

License

Security policy

Stars

Watchers

Forks

Sponsor this project

Packages

No packages published