What does this do?
This bot allows Roblox game administrators to ban users in there games from a Discord channel, pretty cool right?
What does this bot look like?
Here is what the commands look like in the bot
help - https://gyazo.com/90c236c005acbf4ff704ce80b2cd7e4b
ban - https://gyazo.com/476205c9176aa1153c9e8965a6662d81
listbans (if no one if banned) - https://gyazo.com/d0b8dd1559af84e28c1aeac96a4ba307
listbans (if people are banned) - https://gyazo.com/d681318258bb2300a37e293c7dea0fca
setreason - https://gyazo.com/249a3ca81bba430fbd9241468c167667
How do we (you guys) get it?
Simple! Just follow these steps!
Sign into your Glitch.com account if you have one, if not, create one!
Make a project, it can be any type - https://gyazo.com/f6f1dda916507fe42a518f20c6116e69
Delete all the project files, you’ll be ending up deleting/overwriting them anyways. Your project should now look something like this - https://gyazo.com/97621557d79c873a371b87532bd9a568
Open Terminal - https://gyazo.com/8bb540e6602f053e914921a369d5f33d
Type these commads in the command line
wget -O .env https://raw.githubusercontent.com/zachariapopcorn/discord-roblox-ban-bot/master/.env wget -O db.js https://raw.githubusercontent.com/zachariapopcorn/discord-roblox-ban-bot/master/db.js wget -O index.js https://raw.githubusercontent.com/zachariapopcorn/discord-roblox-ban-bot/master/index.js wget -O package.json https://raw.githubusercontent.com/zachariapopcorn/discord-roblox-ban-bot/master/package.json refresh npm install discord.js noblox.js keyv @keyv/sqlite express got
You can delete the ‘.wget-hsts’ file if you wish
Find the code where it says ‘got(“DIRECT GLITCH URL”);’ replace DIRECT GLITCH URL with your direct Glitch url
Open the ‘.env’ file, you should see a screen that looks like this
Configure the bot
token = The token (or login) the bot will use to login to Discord (read this if you don’t know how to get your Discord bot token)
subURLForGettingBans = The sub-url thing that the bot would send a request to from Roblox to get bans
prefix = The character that the bot listens to for commands
banPermsRole = The Discord role required to use the commands, case sensitive
Make a new directory called data and put a file named db.sqlite in it - https://gyazo.com/ea7ed2dae757a34c8c0f805d03062bdb
Open a game in Roblox studio and enable https service (as it needs to connect to the glitch server). After that, please make 2 new server scripts in ServerScriptService. The name can be anything, but make sure to paste both scripts in the server scripts (1 script in each other’s script)
You would notice that some variables say ‘LINK TO YOUR GLITCH PROJECT’ or ‘SUB URL FOR BANS’ This means that you need to still do a little more configuration, which isn’t that hard, so let’s start
For the glitch url, you wanna do what this gif is doing - https://gyazo.com/823bb4c85ac1e5e2e1bf22b9c491f593
After when you got that copied, paste the link in the ‘banURL’ variable for both scripts and add a ‘/’ to the end of it
For the subURL variable, please go back to your .env configuration file and copy the value that’s next to ‘subURLForGettingBans’ and paste that in the subURL variable in both scripts
Congrats! You’ve setup the bot (hopefully correctly). Now try to test it, if it works, then yay! You set it up correctly! If it didn’t, either ask for help here or make a Github issue here
I took inspiration from this DF post from a couple months back, though I wanted to make it a little more simple and easier for the average person to understand
Thanks for reading this post on my Discord to Roblox Ban Bot, as it took me a few hours to make and test. If you do like this, you can show your kindness by liking this post, or maybe spreading the word, that’s up to you. If you wish to add something to this bot, make a PR or add a request on the replies, I’m all ears. Anyways, good day and good bye. READ UPDATE POST FOR UPDATES