Git Product home page Git Product logo

u-bordeaux-verif-old's Introduction

U-Bordeaux-Verif

U-Bordeaux-Verif allows you to check that a discord user is a student at the university of Bordeaux thanks to his email @etu.u-bordeaux.fr

Disclaimer

This code is not 'Public' ready, I will rewrite it ASAP !

Config

For the bot to work properly you must create a config.json following config.json.template :

{
    "DATABASE_URL"           : "sqlite://verified_users.db",
    "DISCORD_LOGIN_API_TOKEN": "BOT API TOKEN",
    
    "ROLE_NAME"              : "ROLE YOU WANT TO BE ADDED",
    "CLIENT_ID"              : "BOT ID",
    "GUILD_ID"               : "SERVER ID",
    "WELCOME_CHANNEL_ID"     : "CHANNEL ID WHERE THE BOT SEND MSG",
    
    "EMAIL_REGEX"            : ".*@etu.u-bordeaux.fr",
    "EMAIL_HOST"             : "smtpauth.u-bordeaux.fr",
    "HOST_USER"              : "ENT ID",
    "EMAIL_PWD"              : "ENT PASSWORD",

    "EMAIL_SUBJECT"          : "Discord U-Bordeaux Vérification CODE",
    "FROM_EMAIL"             : "[email protected]",
    "EMAIL_MSG"              : "Voici ton code pour te vérifier sur discord : ",

    "MSG_INVALID_EMAIL"      : "Tu ne peux verifier que ton email étudiant \n`ex: [email protected]`",
    "MSG_ALREADY_VERIF"     : "\n\nCette email est déja verifié et liée à ",
    "MSG_INVALID_CODE"       : "Le code n'est pas bon :/",
    "MSG_JOIN"               : "\n\nBienvenue sur le serveur !\nAfin de te donner accès au serveur nous avons besoin de vérifier ton email etudiant !\n\nPour cela envoi /verif [tonEmailUBordeaux]\n`ex: /verif [email protected]`",
    "MSG_VERIFIED"           : "\n\n Tu es maintenant vérifié !\nGrâce à cela tu peux avoir accès aux channels du serveur."
}

What did i use ?

Javascript, Discord.js, Keyv

Demo

It works using / commands on discord.
#1 On the welcome channel people are asked to register using /verif command followed by their @ student
website preview
#2 User use /verif [[email protected]]
Wrong email (not @etu.u-bordeaux.fr):
website preview website preview:
Good email::
website preview website preview
Email sent on student's mailbox:
website preview
#2 Student use /code [code]
website preview website preview
Tadam ! the student gets the role 'verified' that grant access to our discord channels

u-bordeaux-verif-old's People

Contributors

oniriik avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.