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
This code is not 'Public' ready, I will rewrite it ASAP !
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."
}
Javascript, Discord.js, Keyv
It works using / commands on discord.
#1 On the welcome channel people are asked to register using /verif command followed by their @ student
#2 User use /verif [[email protected]]
Wrong email (not @etu.u-bordeaux.fr):
:
Good email::
Email sent on student's mailbox:
#2 Student use /code [code]
Tadam ! the student gets the role 'verified' that grant access to our discord channels