The Discord Multipurpose Bot streamlines user verification through email codes, manages roles based on verification status, and includes interactive trivia games with leaderboard tracking for enhanced server engagement.
Find a file
2024-09-05 03:50:51 +01:00
commands restructure commands to be in seperate dirs, add mod commands and plenty others 2024-09-05 03:50:51 +01:00
models restructure commands to be in seperate dirs, add mod commands and plenty others 2024-09-05 03:50:51 +01:00
.env.example ensure the /verify and /code only work in the specified channel, and add admin log channel to the .env.example 2024-09-02 23:05:25 +01:00
.gitignore initial commit 2024-08-31 02:34:09 +01:00
index.js restructure commands to be in seperate dirs, add mod commands and plenty others 2024-09-05 03:50:51 +01:00
LICENSE Create LICENSE 2024-08-31 02:38:00 +01:00
package.json initial commit 2024-08-31 02:34:09 +01:00
Procfile rewrite the bot to use slash commands and use empheral messages for privacy 2024-09-02 18:32:03 +01:00
README.md ensure the /verify and /code only work in the specified channel, and add admin log channel to the .env.example 2024-09-02 23:05:25 +01:00

Discord Verification Bot

Welcome to the Discord Verification Bot! This bot is designed to handle user verification for Discord servers. It verifies users through their student email addresses and manages roles based on their verification status.

Features

  • Email Verification: Users receive a verification code via email and must enter it in Discord to verify their account.
  • Role Management: Automatically assigns a specific role to users once they have been verified.
  • Customizable: Easy to configure email domains, roles, and channels for different needs.
  • Expiration Handling: Verification codes expire after 10 minutes for added security.

Getting Started

Prerequisites

Before you begin, ensure you have:

  • A Discord bot token (create a bot on the Discord Developer Portal).
  • Access to a MongoDB database (you can use MongoDB Atlas for a free tier).
  • A Gmail account for sending emails (you can use any email service, but make sure to adjust the Nodemailer configuration).

Installation

  1. Clone the Repository
git clone git@github.com:aydenjahola/esports-verification-bot.git
cd esports-verification-bot
  1. Install Dependencies
npm install
  1. Set Up Environment Variables

Create a .env file in the root directory and add the following:

# Bot token
BOT_TOKEN=YOUR_BOT_TOKEN

# Nodemailer
EMAIL_NAME="Example"
EMAIL_USER=example@example.com
EMAIL_PASS=YOUR_EMAIL_PASS

# Allowed domains for email verification
EMAIL_DOMAINS=example@example.com // or it can be a list, example: "example.com,example2.com"

# Discord
GUILD_ID=YOUR_GUILD_ID
VERIFICATION_CHANNEL_NAME=YOUR_VERIFICATION_CHANNEL_NAME
VERIFIED_ROLE_NAME=YOUR_VERIFIED_ROLE_NAME
ADMIN_LOG_CHANNEL_ID=YOUR_ADMIN_LOG_CHANNEL_ID

# Database
MONGODB_URI=YOUR_MONGODB_URI

this can also be seen in in the .env.example

  1. Run the Bot
node bot.js

Usage

  • /verify your_email@example.com: Sends a verification code to the provided email.
  • /code your_code: Validates the provided verification code.