[V3] RbxManager | Roblox Group and Game Management Bot | Ranking and Moderation Bot

Introduction

Hello Roblox Community! I’m here today releasing a project that I thought could be pretty helpful to yall. It’s a roblox group and game management tool designed to be as simple as possible.

Showcase

As this bot has multiple things to showcase, I’m going to showcase a bit of the main things
Command Logs - https://i.imgur.com/JUeaXoc.png
Ranking Logs - https://i.imgur.com/hCObICu.png
Example Command Output: https://i.imgur.com/95uSCXd.png
Showcase Video:

Setup

This bot has two components, a Node.js part and a Lua part. Please follow the steps carefully in order to set the bot up successfully

Step 1

Install Node.js on your system. For Windows, go to here and select the LTS version. For Linux, assuming GUI-less server, one way you can install Node.js is using nvm

If you are using Windows, it is recommended that you also install the Git CLI

Step 2

Go to the Github repository and download the code by clicking Code > Download ZIP and then extracting the zip. If you have Git installed, run git clone https://github.com/sv-du/rbx-manager

Step 3

Once you have the unextracted folder, open it, its contents should look something like this

Step 4

Rename ENV_FORMAT.txt to .env and then open it in your favorite text editor
On Windows, file extensions are hidden by default. You must enable them in order to change the file extension

Step 5

Configure the env file. All of these values are very sensitive information, so don’t leak them!

Step 5.1

The value, DISCORD_TOKEN, is your bot’s Discord token. To get it, go to the Discord Developer Portal and clicking “New Application” and name it whatever you want. After that, click on the Bot tab and click “Add Bot” and accept that a bot’s creation is irreversible. Once you created a bot, click on “Reset Token” and then click “Copy”. While you’re still here, go to the the “Public Bot” toggle and make sure it’s disabled. Back in the .env file, copy the token value that you copied after the equal sign

Step 5.2

The value, ROBLOX_COOKIE, is your bot’s Roblox cookie. To get it, log in to your bot’s Roblox account in an incognito window, open inspect element, click on Storage, then on Cookies, expand it, and click roblox.com. You will see multiple cookies that the site uses, what you need is the cookie labelled .ROBLOSECURITY

The above instruction was tested with Firefox, for Chrome based browsers, look up how to get a site’s cookies

Once you found the .ROBLOSECURITY cookie, copy it and paste it after the equal sign in the .env file

Step 5.3

The value, ROBLOX_API_KEY, is your API key for the Open Cloud endpoints. To get it, go to your API keys and click “Create API Key”. Once you do so, name it whatever you want and give it the Datastore and Messaging Service API systems and add your desired experience to it and for the scopes, give Datastore these scopes and Messaging Service the Publish scope. Once done, go to section 3: Security, and input the IP address of the machine you want to host the bot on.

If you want to allow all requests regardless of IP address, type 0.0.0.0 and 0.0.0.0/0 (If hosting on Repl or a similar service with dynamic IPs, this is required)

After that, click “SAVE & GENERATE KEY”, and then click “COPY KEY TO CLIPBOARD”. Paste the API key after the equal sign in the .env file

Step 5.4

The value, ROVER_API_KEY, is your API key for Rover, the verification provider that this bot uses. To get it, go to the Rover website and login with your Discord account. Once you do that, click on “Manage Servers” and click on the server(s) that you bot is going to be in, and then click “Developer API”. Once you’re here, type a name for your API key and click “Create” and then click “Copy” on the prompt that came up. Paste what you copied after the equal sign in the .env file

Step 6

Now that you’re done configuring the .env file, close it, and open the config.ts file with your favorite text editor.

Step 6.1

The value, groupIds, is an array of group IDs of the groups you want the bot to manage. To get them, go to the group page and it is the numbers after /groups/
image

Step 6.2

The value, permissions, is an object with certain permission nodes. These take a string of Discord role IDs

Step 6.3

The value, antiAbuse, is an object with the anti-abuse configuration

antiAbuse.enabled → Determines whether the system is enabled or not
antiAbuse.thresholds.* → Determines how many actions a user can do in a minute before the system takes action on them
antiAbuse.actions.* → Determines what the punishment is for people caught abusing the specific action

Step 6.4

The value, xpSystem, is an object with the XP system configuration

xpSystem.enabled → Determines whether the system is enabled or not
xpSystem.rewards → The rewards for getting a certain XP amount. The format for these rewards is in the config
xpSystem.earnings → The rate on which XP is given (by default, 2 XP is given for messages, 1 XP is given for reactions)

Step 6.5

The value, counting, is an object with the group counting configuration

counting.enabled → Determines whether the system is enabled or not
counting.goal → The goal that it wants to track
counting.loggingChannel → The logging channel on which to send member count updates

Step 6.6

The value, logging, is an object with logging properties. To enable/disable it, toggle the enable values, and to set the logging channel, set it to a channel ID

Step 6.7

The value, embedColors, is an object setting the colors of different types of embeds. You don’t need to change these values, but if you want to, here are the valid options

Step 6.8

The value, defaultCooldown, is the default command cooldown in milliseconds. The default is 5000 milliseconds (5 seconds)

Step 6.9

The value, cooldownOverrides, are exceptions to the default cooldown set in step 6.8. The takes properties of commandName: new_cooldown. For example, if I wanted to set the cooldown of the exile command to 20 seconds (20000 milliseconds), the value would be cooldownOverrides: {"exile": 20000}

Step 6.10

The value, suspensionRank, is the rank ID of the suspended rank in your group. This is the rank that people get set to when suspended

Step 6.11

The value, universes, is an array value representing the universes that you want to link. This is an array of universe IDs
To get a universe ID, go to your creations page, click the “…” on the games you want to configure, and click “Copy Universe ID” and set it in the config

Step 6.12

The value, datastoreName, is the name of the datastore to use. You don’t need to configure this

If you change this value, you MUST change it’s value in the Roblox files in step 9

Step 6.13

The value, verificationChecks, is the toggle for verification checks on the group commands. This by default is enabled, but if you want to disable it, set this to false

Step 6.14

The value, collectorTime, is how long collectors wait before being terminated in milliseconds. The default is 2 minutes, but you can change this if you want

Step 6.15

The value, maximumNumberOfUsers, indicates how many users you can execute a bulk action on. The default is 5, but you can change this if you want

Step 6.16

The value, lockedRanks, “locks” the ranks inputted, meaning that you can’t promote/demote/setrank to those ranks. This accepts rank names and ids

Step 6.17

The value, lockedCommands, locks commands, meaning that no one can use them. Simply type a command name and it will lock it. Casing does not matter

Step 7

Now that you’ve configured your bot, go back to your bot’s Discord develop page and copy it’s client ID. After doing so, paste the following link into your browser: https://discord.com/oauth2/authorize?client_id=CLIENT_ID_HERE&permissions=8&scope=applications.commands%20bot and replace CLIENT_ID_HERE with your bot’s client ID

Step 8

Once you’ve added the bot into your server, go back to your bot file and open a command line terminal. In here, type npm install and then once that completes, run npm run winStart if on Windows or npm run linuxStart if on Linux. If you’ve done everything successfully, the bot should boot up with no errors

Step 9

Now that you’re done with the Node.js portion, it’s time to move onto your Roblox portion

Copy the following code

You will see a configuration section. Before pasting this code into the console of the game you want to install this system to, configure it

Unless you configured the datastoreName value in Step 6.12, which would then need to be reflected in the DATASTORE_NAME value, no configuration is needed

You are now done with setting up this system! Was that hard?

Questions

If you have any questions or need help setting up, don’t be hesitant to ask in the comments. If you found/find this resource useful, please vote in the poll below. If not, please still vote, but also tell me what I should do to improve it, but for now, good day to you all!

FYI: If you want updates on this system, follow this post as I will reply to it when I release updates

Do you find this resource useful?
  • Yes
  • No

0 voters

45 Likes

Hi Zach! Glad to see this tool back in a new form. Can you show us what moderator commands are available in this new version and maybe a little video of it in action?

2 Likes

Yea sure, let me get home and I’ll upload that

Update 2/12/23

Replace reactions with buttons

1 Like

Update 2/20/23

Add multi-universe support

Since this update modified a config value, please revisit step 6.5 in order to figure out how to configure it

To update, run git pull

3 Likes

MAJOR UPDATE - 3/2/23
This update changes a lot of internals, adds commands, and more!

Specifically, it adds the following commands

Login command
Revert ranks command
Timeban command
Timemute command

It also does the following internal changes

Enforces rank locks and suspensions with group actions
Adds cooldown system
Completes the switch from reactions to buttons

UPDATE STEPS
Before updating, I recommend saving your config in a temporarily notepad instance before updating as it will restore everything

Step 1

Run git restore * && git fetch && git pull (If this errors try running the commands one-by-one)

Step 2

Copy your old config to their respected values in the new config file, and configure the new config values (Steps 5.2, 5.3, 6.5, 6.6, 6.7)

Step 3

Since this added new packages, please run npm install to install these packages

Step 4

Since this modified the Roblox files, follow the following steps

Replace the code in game.ServerScriptService["Discord to Roblox Moderation System"].Main to the code in roblox.Server.ServerScriptService.["Discord to Roblox Moderation System"].Main.lua in the Github repo

Replace the code in game.ServerScriptService["Discord to Roblox Moderation System"].Utils.DatabaseHandler to roblox.Server.ServerScriptService.["Discord to Roblox Moderation System"].Utils.DatabaseHandler.lua in the Github repo

Step 5

Congrats, you’ve successfully updated

Edit: I forgot to mention, this bot can now be hosted on Repl due to the login command existing

3 Likes

Wow Zach, you really outdid yourself with this one. Can’t wait to test this out. :eyes:

2 Likes

MINOR UPDATE - 3/9/23
This update attempts to fix a bug that caused some users to get the error Property 'send' does not exist... in the login command. Please report any bugs to me

UPDATE STEPS

Step 1

Run git fetch && git pull to get the updated files (If this errors try running the commands one-by-one)

Step 2

Delete the node_modules folder

Step 3

Run npm install to reinstall the packages

MINOR UPDATE - 3/11/23
I added support for replit, that’s it.

MEDIUM UPDATE - 3/15/23
This update updates noblox.js to version 4.14.0 and removes the dependency of axios. This update dropped because noblox.js version 4.13.1 used outdated API endpoints, which would’ve caused issues in the future

I removed axios as a dependency because I was using a very old version of it because later versions were littered with bugs. I now use the built in fetch() API, but this means that NodeJS v18+ is required

UPDATE STEPS

Step 1

Run git fetch && git pull to get the updated files (If this errors try running the commands one-by-one)

Step 2

Delete the node_modules folder

Step 3

Run npm install to reinstall the packages

1 Like

Seems like the GetJobId command doesn’t work, not sure if it’s on my end, but it says:

HttpService is not allowed to access roblox resources.

Do you mind sending what you put as your server url? This shouldn’t happen if you did it correctly

Is the server url the server I’m hosting at or the discord server id? I’m currently using this.

image

1 Like

That’s the same as putting localhost in your address bar, hence why it’s sending an error. You’d have to port forward to get Roblox to see your server, but you should know the risks of that before doing so

1 Like

Though what’s supposed to be in here? I’m kinda confused. I was confused when I saw that at the end of the tutorial.

1 Like

“Port forwarding, also known as port management, allows remote servers and devices on the internet to be able to access devices that are on a private network. If you are not using port forwarding, only devices on that private internal network can have access to each other or your network.”

You need to do it in order for Roblox to connect to your server

1 Like

MEDIUM UPDATE - 3/16/23
Since today Roblox has released the new text chat by default, I have added support for it. I also do some other small things that don’t affect much

Update the Roblox files to get the majority of this update

1 Like

MAJOR UPDATE - 4/7/23 - V2 RELEASE

This is the release of V2, which provides a rework of internal and external systems, and adds new features. You may look at the changelog in this pull request

Update Steps

Step 1

Save your config.ts file as this will be overwritten while updating.

Step 2

Delete the node_modules folder

Step 3

Run git restore * && git fetch && git pull

Step 4

Run npm install

Step 5

Copy your old config to their respected values in the new config file, and configure the new config values
(Step 6.3 in the main post)

Step 6

Since this updated the Roblox files, please re-extract them via following steps 9-11

I am very interested at stuff like this, could you add a feature where you can monitor the stuff people say to ban/kick them, be able to kick players from game and/or give people stuff from the commands. Also make it adjustable so I can make it customizable for my game.

These are ideas, im not trying to tell you what to do. :sweat_smile: t

Discord chat logging is not allowed as per Discord TOS, and although I could make it, I prefer not to

Already a thing

Technically, the eval command can do this (runs raw lua code),

What do you mean?

1 Like