Skip to content

mrc2rules/UTMJBC-Bot

Β 
Β 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

416 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation


UTM JBC

UTM JBC Email Verification Bot

Email verification and specialized AI powered query bot for UTM JBC.

Build Status License Forks Stars

Join Discord


πŸ“‹ Table of Contents

  1. About
  2. How It Works
  3. Commands
  4. Self Hosting
  5. Contributors

πŸ“– About

This is the official bot for the UTMJBC Discord server. It handles email verification for students and provides an AI-powered query system to answer questions relevant to UTM students.

  • Email verification to confirm student identity
  • AI-powered grounded query system for UTM-related questions, with the help of UTMWiki (https://utm.gitbook.io/)

⚠️ Disclaimer: UTM Johor Bahru Community (UTMJBC) and this project are not affiliated with or endorsed by Universiti Teknologi Malaysia (UTM) in any way. This is an independent student-run community.


πŸ“ 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 add <role> Add a default role given to all verified users
/role remove <role> Remove a role from the default roles list
/role list View all default roles
/role unverified [role] Set or view the optional role for unverified members

🎭 Domain-Specific Roles

Command Description
/domainrole add <domain> <role> Add a role for a specific email domain
/domainrole remove <domain> <role> Remove a role from a domain
/domainrole list View all domain-role mappings
/domainrole clear <domain> Remove all roles for a domain

πŸ“§ 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

🚫 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

βš™οΈ 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 reset the bot

⚠️ Note: Most commands require administrator permissions

Important: Role Hierarchy

The bot role must be higher in the role hierarchy than the verified and unverified roles, otherwise role assignment will fail.


🐳 Self Hosting

Docker (Recommended)

1. Create a directory for the bot

mkdir emailverify && cd emailverify

2. Create the config file

mkdir config
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. 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

Manual Installation

Requirements: Node.js v16.15.0 or higher

1. Clone the repository

git clone https://github.com/mrc2rules/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

πŸ’‘ Gmail Users: You need to create an App Password instead of using your regular password.

Debugging

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


πŸ‘₯ Contributors

UTMJBC Development

Original Project

This bot is based on EmailVerify by Lars Kaesberg.


Made with ❀️ for the UTM Johor Bahru Community

Join Discord Β  Community Guide Β  Email

About

Email verification and specialized AI powered query bot for UTM JBC.

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • JavaScript 99.9%
  • Dockerfile 0.1%