forked from brandonapt/roblox-manager
-
Notifications
You must be signed in to change notification settings - Fork 0
/
PostSource.txt
188 lines (131 loc) · 12.1 KB
/
PostSource.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
## 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. This is a combination of my [ranking bot](https://devforum.roblox.com/t/roblox-group-managerranking-bot/934111) and my [moderation bot](https://devforum.roblox.com/t/discord-to-roblox-moderation-bot/989798) all updated into one package
(This post is under a different account as @zachariapopcorn got unfairly terminated)
This tool has almost all of the features from these two projects, but I didn't implement features that are either now blocked by a captcha or unrealistic to have in an automated environment
# 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: ![8mb.video-W1h-Y5HhK6S7|video](upload://c8SEnG6IGniag04tu5E3WjGzMLZ.mp4)
# 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
# NOTE
As of the addition of the login command, services such as repl are now able to host this bot. If you wish to host this bot on repl, make a **Blank Repl** and name it whatever. Once done, delete ``README.md`` and locate the shell. From here, skip step 1 and follow the **LINUX** steps in the tutorial, with occasional repl-specific instructions
# Step 1
Install Node.js on your system. For Windows, go to [here](https://nodejs.org/en/) and select the LTS version. For Linux, assuming GUI-less server, one way you can install Node.js is using [nvm](https://github.com/nvm-sh/nvm)
If you are using Windows, it is recommended that you also install the [Git CLI](https://git-scm.com/download/win)
# Step 2
Go to the [Github repository](https://github.com/zachariapopcorn/rbx-manager) 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/zachariapopcorn/rbx-manager``
# Step 3
Once you have the unextracted folder, open it, it's contents should look something like [this](https://i.imgur.com/30bzkeA.png)
If hosting on Repl, run the following commands
``mv rbx-manager/* .``
``mv rbx-manager/.* .`` (This will give warnings, ignore them)
``rm rbx-manager/ -d``
# 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**
If using Repl, go to the secrets tab (Tools > Secrets). Click on "Open raw editor" and paste the following JSON
```
{
"DISCORD_TOKEN": "",
"ROBLOX_USERNAME": "",
"ROBLOX_PASSWORD": "",
"ROBLOX_COOKIE": "",
"ROBLOX_API_KEY": "",
"ROVER_API_KEY": "",
}
```
Once you've done that, click the save button. Now configure the env file as shown in the subsets of step 5, but to paste in the value, click on the key and paste it in the value box, then click save on that
# 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 https://discord.com/developers 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_USERNAME``, is your bot's Roblox username. This is used to generate new cookies using the login command
# Step 5.3
The value, ``ROBLOX_PASSWORD``, is your bot's Roblox password. This is used to generate new cookies using the login command
# Step 5.4
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.5
The value, ``ROBLOX_API_KEY``, is your API key for the Open Cloud endpoints. To get it, go to [your API keys](https://create.roblox.com/credentials) 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](https://i.imgur.com/5w8Qw2I.png) 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.6
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](https://rover.link/) 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|304x39](upload://g4xudwRW9kFU2FATi9VQISvUENd.png)
# 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](https://discord.js.org/#/docs/discord.js/main/typedef/ColorResolvable)
# 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](https://create.roblox.com/creations), 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
If hosting on Repl, click the run button after installing packages (you may get an incorrect cookie error, if you do, try running the login command to fix this)
# Step 8.1 (Repl exclusive)
So now that you got the bot to boot, go to https://uptimerobot.com and make a new account
Once on the dashboard, click "Add New Monitor", and make it an HTTP(S) monitor
For the friendly name, this can be anything, and for the URL, input the URL that popped up when you started the repl
![image|676x365, 75%](upload://4lnkdFmZnu89WVyKypjcAEDpuYT.png)
After that, click "Create Monitor" (ignore the contact email warning, that's optional)
# 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](https://raw.githubusercontent.com/zachariapopcorn/rbx-manager/master/roblox/SetupScript.lua)
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
[poll type=regular results=always chartType=bar]
# Do you find this resource useful?
* Yes
* No
[/poll]