Skip to content

Commit ed94921

Browse files
authored
Create setup.md
1 parent b4aac7f commit ed94921

File tree

1 file changed

+33
-0
lines changed

1 file changed

+33
-0
lines changed

docs/tutorial/group-bot/setup.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# Discord-Roblox Group Management Bot
2+
One of the most common uses of ro.py is for Discord-Roblox bots, usually for managing groups. In this guide, we'll create a bot from scratch using [discord.py](https://discordpy.readthedocs.io/en/stable/) and ro.py to manage a group.
3+
While this will all work on its own, you will likely need to make modifications to have some parts work in your own bot (if you already have one).
4+
!!! note
5+
This tutorial uses discord.py prefix commands, which will require the Message Content intent to be enabled on
6+
September 1st, 2022. Concepts related to ro.py will likely still apply when using application commands, but this
7+
guide does not use them.
8+
9+
## Prerequisites
10+
* Basic knowledge (and how to use [async/await syntax](https://realpython.com/async-io-python/#the-asyncawait-syntax-and-native-coroutines)) and installation of Python
11+
* Basic knowledge of discord.py
12+
13+
## Setup
14+
Before we get started, there are 2 packages we need to install. Use the following commands in your terminal:
15+
```
16+
pip install discord.py
17+
pip install roblox
18+
```
19+
Next, create a new Python file wherever on your system that you'd like. Once you've done so, open it in your favorite editor, and add the following:
20+
```python title="main.py"
21+
import discord
22+
from discord.ext import commands
23+
import roblox
24+
25+
bot = commands.Bot("!")
26+
client = roblox.Client("YOUR_TOKEN_HERE")
27+
```
28+
Here, we've imported the discord.py package, the commands extension, and the ro.py package, then created a new Discord Bot Client and Roblox Client. Replace `YOUR_TOKEN_HERE` with your [.ROBLOSECURITY](https://ro.py.jmk.gg/dev/roblosecurity/) token.
29+
!!! danger
30+
Under no circumstances should you give anyone else access to your .ROBLOSECURITY token, as this gives them access
31+
to your account. It is recommended to use an alternate account for this, and one with only the permissions necessary
32+
for your bot to function. It is also recommended to [enable 2FA](https://en.help.roblox.com/hc/articles/212459863),
33+
as this makes it much more difficult for some to randomly gain access to your account, even if they know your password.

0 commit comments

Comments
 (0)