Verification via email
  • Python 97.7%
  • HTML 2.3%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2025-04-02 16:46:59 -05:00
.gitignore implement blocklist 2025-04-02 14:01:04 -05:00
functions.py making otps more random 2025-04-02 16:46:59 -05:00
main.py fixing dumb misspelling 2025-01-29 18:22:07 -06:00
message.html implementing config file 2025-01-28 19:31:42 -06:00
README.md update readme 2025-03-26 15:33:54 -05:00

veribot

Discord bot for verification via (TTU) .edu email accounts.

Usage

Automatically, the bot will log:

  • Username, display name and avatar changes.
  • Messages entered in the quarantine channel.
  • Email addresses entered by users.
  • If any incorrect usage is detected, and by who. Additionally, the bot will automatically delete messages sent by non-admins in the quarantine channel.

App Commands

  • verify <email>
    • User-facing.
    • Takes the email string as an argument, makes sure that it is a (TTU) email address, then sends an email containing a One-Time-Passcode to it.
  • otp <OTP Key>
    • User-facing.
    • Takes the OTP Key string as an argument, casts it to an integer then checks if it matches the One-Time-Passcode on file.
    • If it matches, it grants the user access to the rest of the Discord server.
    • If it does not match, it removes one of the three tries.
    • At the end of the three tries, it institutes a 30 minute countdown on the verify command for the user and removes the One-Time-Passcode on file.

Dependencies

python >3.12
discord.py 2.4.0
resend 2.6.0
PyYAML 6.0.1

Installation

Server-Side

  • Clone the repository using git clone https://github.com/Linux-Open-source-Computing-Org-LOCO/veribot.git into the directory where you want to install it.
  • There are two files and a directory that need to be created and populated before you launch the bot.
    • Create the directory .cache using the command mkdir .cache within the veribot directory.
    • Next, run touch config.yaml .tokens to create the other two required files.
    • Populate .tokens with the following:
      • Line 1: Discord Bot token
      • Line 2: Resend API token
      • Example:
discordtoken
resendtoken

- Ensure there is no extraneous text within this file. Extra newline characters will be taken care of. + Populate `config.yaml` with the following (replacing placeholder text with your own configuration): ```yaml guildID: integer channels: quarantineChannelID: integer logChannelID: integer deletedMessagesChannelID: integer roles: verifiedRoleID: integer adminRoleID: integer text: fullClubTitle: "string" emailAddress: "Example String " emailSubject: "string" status: "string" ```
+ The IDs can be found by enabling "Developer Mode" on your Discord account, then opening the context menu of the relevant item. + Internally, Discord servers are known as guilds. * Ideally, you would run the bot in a screen. + Ensure you have the `screen` program installed. + You can enter a screen by typing `screen` into the console. + You can reenter a screen by typing `screen -r `. + You can list active screens by typing `screen -ls`. + You can exit a screen by pressing the key combination: `C-a d`. (aka `ctrl` + `a`, then `d`) * Next, run the bot by typing `python3 main.py`.

Client-Side

  • You will need at least:
    • A quarantine channel, and a log channel.
    • An administrator or moderator role (can post messages in the quarantine channel).
    • A "verified" role that can see the rest of the public server, but not the quarantine channel.
  • Configure the default @everyone permissions to be minimal.
  • Configure the server so that @everyone can only see the quarantine channel.