Skip to content

lkaesberg/EmailVerify

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation


EmailBot

Discord Email Verify

A powerful Email Verification Bot for Discord servers

Build Status License GitHub forks GitHub stars

Report Bug ยท Request Feature

๐ŸŒ Website


๐Ÿ“‹ Table of Contents

  1. About
  2. Built With
  3. Usage
  4. Commands
  5. Self Hosting
  6. Contributors
  7. Support the Project

๐Ÿ“– About

This bot verifies that a Discord user owns an email address with a specific domain (e.g., verify [email protected] emails). This is useful for servers that need to restrict access to verified members only, such as:

  • University/College servers - Verify students with .edu emails
  • Company servers - Verify employees with corporate emails
  • Organization servers - Verify members with organization emails

How it works:

  1. User clicks a verification button
  2. Bot sends a DM asking for their email address
  3. A verification code is sent to the email
  4. User enters the code to receive the verified role

๐Ÿš€ Usage

Invite the Bot

Use this link to invite the bot to your server:

Invite Bot

Quick Setup

  1. Invite the bot using the link above
  2. Set the verified role: /role verified @YourVerifiedRole
  3. Add allowed domains: /domain add @university.edu (use @*.edu for all .edu domains)
  4. Create a verification button: /button #verification-channel "Click to Verify"
  5. Done! Users can now verify themselves

๐Ÿ“ Commands

๐Ÿ‘ค User Commands

Command Description
/verify Start the email verification process
/data delete-user Delete your verification data and remove verified status

๐Ÿ‘ฅ Role Configuration

Command Description
/role verified [role] Set or view the role given after verification
/role unverified [role] Set or view the optional role for unverified members

๐Ÿ“ง Domain Management

Command Description
/domain add <domains> Add allowed email domains (supports * wildcard)
/domain remove <domains> Remove allowed domains
/domain list View all allowed domains
/domain clear Remove all allowed domains

๐Ÿ’ก Wildcard Example: Use @*.edu to allow any .edu email address

๐Ÿšซ Blacklist Management

Command Description
/blacklist add <patterns> Block email patterns (supports * wildcard)
/blacklist remove <patterns> Unblock patterns
/blacklist list View all blacklisted entries
/blacklist clear Remove all blacklist entries

๐Ÿ’ก Wildcard Examples: *@tempmail.* blocks all tempmail domains, *spam* blocks emails containing "spam"

โš™๏ธ Settings

Command Description
/settings language <lang> Change the bot's language
/settings log-channel [channel] Set or disable the verification log channel
/settings verify-message [message] Set or reset custom message in verification emails
/settings auto-verify <enable> Auto-prompt new members to verify on join
/settings auto-unverified <enable> Auto-assign unverified role to new members

๐Ÿ›ก๏ธ Moderation & Setup

Command Description
/button <channel> <buttontext> Create a verification button embed in a channel
/manualverify <user> <email> Manually verify a user without email confirmation
/set_error_notify Configure where error notifications are sent

๐Ÿ“Š Information

Command Description
/status View bot configuration, statistics, and check for issues
/help Show setup instructions and command overview

โš ๏ธ Data Management

Command Description
/data delete-user Delete your personal verification data
/data delete-server Delete all server data and remove the bot

โš ๏ธ Note: Most commands require administrator permissions

Important: Role Hierarchy

The EmailBot role must be higher in the role hierarchy than the verified and unverified roles, otherwise you'll get a Can't find roles. Please contact the admin! error.

Role Hierarchy Example


๐Ÿณ Self Hosting

If you want to self-host the bot, you have two options: Docker (recommended) or Manual Installation.

๐Ÿ’– Enjoying the bot? If you find this project useful, please consider buying me a pizza to support ongoing development!

Docker (Recommended)

The easiest way to self-host is using Docker with the pre-built image.

1. Create a directory for the bot

mkdir emailverify && cd emailverify

2. Create the config file

mkdir config
nano config/config.json

Add your configuration:

{
  "token": "<Discord Bot Token>",
  "clientId": "<Discord Bot Client ID>",
  "email": "<Email Address>",
  "username": "<Mail Server Username>",
  "password": "<Email Password>",
  "smtpHost": "<SMTP Server>",
  "isGoogle": false
}

3. Create docker-compose.yml

version: '3'
services:
  emailverify:
    image: ghcr.io/lkaesberg/emailverify:latest
    ports:
      - 8181:8181
    volumes:
      - ./config:/usr/app/config
    restart: always

4. Start the bot

docker-compose up -d

Docker CLI Alternative

docker run -d \
  --name emailverify \
  -p 8181:8181 \
  -v $(pwd)/config:/usr/app/config \
  --restart always \
  ghcr.io/lkaesberg/emailverify:latest

Manual Installation

Requirements: Node.js v16.15.0 or higher

1. Clone the repository

git clone https://github.com/lkaesberg/EmailVerify.git
cd EmailVerify

2. Create the config file

nano config/config.json
{
  "token": "<Discord Bot Token>",
  "clientId": "<Discord Bot Client ID>",
  "email": "<Email Address>",
  "username": "<Mail Server Username>",
  "password": "<Email Password>",
  "smtpHost": "<SMTP Server>",
  "isGoogle": false
}

3. Install dependencies and start

npm install
npm start

Configuration Options

Option Description
token Your Discord Bot Token from the Discord Developer Portal
clientId Your Discord Bot's Client ID
email The email address that will send verification codes
username SMTP server username (usually your email address)
password SMTP server password or App Password
smtpHost Your SMTP server (e.g., smtp.gmail.com)
isGoogle Set to true if using Gmail
topggToken (Optional) Your Top.gg API token

๐Ÿ’ก Gmail Users: You need to create an App Password and use that instead of your regular password.

Debugging

Type email in the console to see debugging messages for email errors.


๐Ÿ‘ฅ Contributors

Developer

Translators

Language Contributor
๐Ÿ‡ฌ๐Ÿ‡ง English Lars Kaesberg
๐Ÿ‡ฉ๐Ÿ‡ช German Lars Kaesberg
๐Ÿ‡ช๐Ÿ‡ธ Spanish gus2131
๐Ÿ‡ต๐Ÿ‡ฑ Polish kploskonka
๐Ÿ‡ฎ๐Ÿ‡ฑ Hebrew Norma1Name
๐Ÿ‡ฐ๐Ÿ‡ท Korean iplayagain
๐Ÿ‡ซ๐Ÿ‡ท French Charles Van
๐Ÿ‡น๐Ÿ‡ท Turkish EmreSoftware

Want to add a new language?

Create an issue with your translation file using the English template as a reference.


๐Ÿ’– Support the Project

If you're self-hosting this bot and find it useful, please consider supporting the development! Your contribution helps keep the project maintained and improved.

Buy Me A Pizza


Made with โค๏ธ by Lars Kaesberg

Sponsor this project

Packages

 
 
 

Contributors 11