discord-account-verification/README.md
2023-06-26 16:24:21 +02:00

4.3 KiB
Raw Blame History

English: club elec uses Gitea for the development of its free softwares. Our GitHub repositories are only mirrors. If you want to work with us, fork us on collabore forge (no registration needed, you can sign in with your GitHub account).

Français : club elec utilise Gitea pour le développement de ses logiciels libres. Nos dépôts GitHub ne sont que des miroirs. Si vous souhaitez travailler avec nous, forkez-nous sur collabore forge (linscription nest pas nécessaire, vous pouvez vous connecter avec votre compte GitHub).


discord account verification

Account verification bot for club elec's Discord server

AboutFeaturesDeployConfigurationLicense

About

club elec needed a tool to validate the Discord accounts of people joining its Discord server.
Validating student accounts manually is a time-consuming operation requiring the presence of an administrator.
This Discord bot was therefore created to allow newcomers to easily validate their Discord account by receiving a verification code on their university email address, saving everyone time.

Features

  • Easy to use
  • Receive a validation code by email
  • Easy to deploy
  • Using Discord interactions

Deploy

We have deployed discord account verification on a server running Debian 11.

Please adapt these steps to your configuration, ...
We do not describe the usual server configuration steps.

Install required packages

apt install python3-pip python3-venv

Create discord-account-verification user

groupadd discord-account-verification
useradd -r -s /sbin/nologin -g discord-account-verification discord-account-verification

Retrieve sources

mkdir /opt/discord-account-verification
chown discord-account-verification:discord-account-verification /opt/discord-account-verification
cd /opt/discord-account-verification
runuser -u discord-account-verification -- git clone https://forge.collabore.fr/ClubElecINSSET/discord-account-verification .

Create Python virtual environment

runuser -u discord-account-verification -- virtualenv .env

Install Python dependencies

runuser -u discord-account-verification -- .env/bin/pip install -r requirements.txt

Install systemd service

cp discord-account-verification.service /etc/systemd/system/

Enable and start systemd service

systemctl enable discord-account-verification
systemctl start discord-account-verification

Configuration

To configure discord account verification, please modify the configurations of the systemd service according to your needs.

Do not forget to create an application in the Discord Developer Portal and to give the permissions:

  • Manage Roles
  • Send Messages
  • Use Slash Commands

License

This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details.

You should have received a copy of the GNU Affero General Public License along with this program. If not, see http://www.gnu.org/licenses/.