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.
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!