Discord-Roblox Verification Bot [OPEN-SOURCE]

Disclaimer: This bot was built on older versions of the required packages. I will not help you with upgrading it to work with the newest packages

Discord-Roblox Verification Bot

Introduction

This bot was created by extracting the verification aspect from a more extensive bot I made for one of my servers. I chose to use my own verification bot instead of one of the popular bots (such as RoVer and Bloxlink) due to the ability to fully control the process and database. If you have no interest or need to use your own bot for verification, I recommend using Bloxlink.

So what’s included? I have included four slash commands (help, verify, update, and view), along with an index and configuration file, and finally the code for the Roblox verification game.

Setup

Let’s learn how to use the bot. Step one is to get the files you will be using from GitHub.

Roblox Setup

Once you have downloaded the files, go ahead and open Roblox Studio and create a new game. This will be your verification game, so name it accordingly. I would recommend making the servers single-person servers, however, it will work either way.

Once you have created a new game, navigate to the game’s settings. Turn on “Allow HTTP Requests” under the “Security” tab as seen below.

Next, insert the Server.rbxm file you downloaded earlier into ServerScriptService

Promotion: This script utilizes my FirebaseService module. If you use Google’s Firebase in your projects, I highly recommend checking it out.

After you have inserted the model, the verification game is done. Publish these changes and take note of the game’s link, as you will need it later.

Bot Setup

Upload the files provided to your Discord bot.

Head over to the config.json file. Set botToken to your bot’s token and verificationLink to the link of the game we created earlier.

Next, you will need to install the necessary packages. This can be done by running the following commands:

If you already have any packages that require a specific version installed, run npm uninstall package before reinstalling it.

npm install fs
npm install discord.js@13.9.2
npm install snekfetch
npm install firebase@7.18.0
npm install pm2
npm install moment

Now that the bot has everything it needs, we need to create a Firebase Realtime Database before starting it. Head to https://console.firebase.google.com/ and log in with Google (if you haven’t already). You will see an “Add Project” box. Click it and follow the instructions to create your Firebase.

newProject

After creating a Firebase, navigate to “Realtime Database” on the sidebar under “Build” and create a Realtime Database.

Once your Realtime Database has been created, you can copy the link using the “Copy Link” button.

Paste that link in the config.json file where it says firebaseURL. Now we need to make it so both the bot and game can read/ write in the database. Head over to the rules tab and change your rules to the following:

{
  "rules": {
    ".read": true,
    ".write": true
  }
}

Finally, we need to create a verified role and start the bot. To create a verified role, head over to your server and create a role (the name doesn’t matter). Paste the name of this new role into the config.json file under verifiedRole. Once done, save all of the edits you have made to the config.json file (and re-upload it to your bot if that is something you need to do).

All done! We can use pm2 to start the bot by running pm2 start index.js. Once the bot is online, give your new verification system a try!

Bonus: Now that you have an active app, make sure to claim your “Active Developer” badge from Discord!

13 Likes

Set this up as the guide shows. Went to run this and faced this error:


Looked all over to try and find a solution, any ideas? Looks like a great resource and I’m trying to get it working.

Looks like the Firebase module might have encountered an error while installing. I would try uninstalling it and then reinstalling it using the version information I specified in the post.

Upload your filed to you discord bot, can you explain HOW…

If you mean this:

Here are the files.

Maybe the process in uploading the files

More specifically, how do you upload the files to the bot.

First, make a Discord bot + Application at Discord Developer Portal. Copy your Token and save it.

Now, go to the Hosting Platform, where you want to host the Bot (like replit,google,aws,etc.). Paste this there, change the BotToken in “config.json” and there you go.

I didn’t go into depth on that part because it varies greatly depending on the host platform. I would recommend searching “How to make a Discord bot using [your platform]” for the basics of how to use that platform, then follow the rest of my tutorial.

What did you use? Im currently using replit

I use Vultr (character limit).

Im going to attempt with replit.

Also where is the rules tab? I cannot find it anywhere.

I may have found the issue… hold on…

Alright what are the commands…

They are slash commands so they should show up when you type /

Yeah they didn’t, hmmmmmm. Weird…