Skip to content

Commit 8643073

Browse files
authored
Update automate-right-to-erasure.md (#1004)
Added tabs for different Python modules needed for Guilded and Discord respectively. Changed DISCORD_BOT_TOKEN and GUILDED_BOT_TOKEN to just BOT_TOKEN for a more universal approach to access token usage. There are different tabs everywhere else for differences between creating a bot for Discord and Guilded, so this feels like an inconsistency. This inconsistency was brought to my attenting by [@bura1414](https://devforum.roblox.com/u/bura1414) from t[his devforum post](https://devforum.roblox.com/t/robloxo-opencloud-documentation-issue/3422904). ## Checks By submitting your pull request for review, you agree to the following: - [x] This contribution was created in whole or in part by me, and I have the right to submit it under the terms of this repository's open source licenses. - [x] I understand and agree that this contribution and a record of it are public, maintained indefinitely, and may be redistributed under the terms of this repository's open source licenses. - [x] To the best of my knowledge, all proposed changes are accurate.
1 parent 601e2c9 commit 8643073

File tree

1 file changed

+39
-25
lines changed

1 file changed

+39
-25
lines changed

content/en-us/cloud/webhooks/automate-right-to-erasure.md

Lines changed: 39 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,7 @@ After you add the webhook, use it to configure the bot with the following steps:
8989
</TabItem>
9090

9191
<TabItem label="Discord">
92+
9293
1. Navigate to the [Applications page](https://discord.com/developers/applications).
9394
1. Create a new application and name it to `GDPR Bot`.
9495
1. The system redirects you to the **General Information** settings of the bot. Copy and save its application ID in a secure place.
@@ -125,20 +126,33 @@ To obtain these identifiers, open the [Creations](https://create.roblox.com/dash
125126

126127
After you finish setting up the webhook, bot, and API key for data stores, add them to the scripts that implement the bot's automation logic. The following example uses Python 3:
127128

128-
1. Install Python libraries using the following commands:
129+
1. Install Python libraries using the following commands:
129130

130-
```bash title="Install Libraries"
131-
pip3 install discord
132-
pip3 install guilded.py==1.8.0
133-
pip3 install requests
134-
pip3 install urllib3==1.26.6
135-
```
131+
<Tabs>
132+
<TabItem label="Guilded">
133+
134+
```bash title="Install Libraries"
135+
pip3 install guilded.py==1.8.0
136+
pip3 install requests
137+
pip3 install urllib3==1.26.6
138+
```
139+
140+
</TabItem>
141+
<TabItem label="Discord">
136142

137-
1. Copy and save the following scripts corresponding to different parts of the bot logic in the same directory:
143+
```bash title="Install Libraries"
144+
pip3 install discord
145+
pip3 install requests
146+
pip3 install urllib3==1.26.6
147+
```
148+
149+
</TabItem>
150+
</Tabs>
151+
152+
1. Copy and save the following scripts corresponding to different parts of the bot logic in the same directory:
138153

139154
```python title="bot_config.py"
140-
DISCORD_BOT_TOKEN = ""
141-
GUILDED_BOT_TOKEN = ""
155+
BOT_TOKEN = ""
142156
OPEN_CLOUD_API_KEY = ""
143157
ROBLOX_WEBHOOK_SECRET = ""
144158

@@ -237,7 +251,6 @@ After you finish setting up the webhook, bot, and API key for data stores, add t
237251
else:
238252
failures[owned_start_place_id].append((data_store_name, scope, entry_key))
239253
return successes, failures
240-
241254
```
242255

243256
```python title="message_parser.py"
@@ -369,7 +382,7 @@ After you finish setting up the webhook, bot, and API key for data stores, add t
369382
await message.reply(f"Failed to delete ordered data stores data for " +
370383
f"user ID: {user_id}, data: {dict(failures)}")
371384

372-
client.run(bot_config.GUILDED_BOT_TOKEN)
385+
client.run(bot_config.BOT_TOKEN)
373386

374387
if __name__ == "__main__":
375388
run()
@@ -422,7 +435,7 @@ After you finish setting up the webhook, bot, and API key for data stores, add t
422435
await message.reply(f"Failed to delete ordered data stores data for " +
423436
f"user ID: {user_id}, data: {dict(failures)}")
424437

425-
client.run(bot_config.DISCORD_BOT_TOKEN)
438+
client.run(bot_config.BOT_TOKEN)
426439

427440
if __name__ == "__main__":
428441
run()
@@ -431,17 +444,18 @@ After you finish setting up the webhook, bot, and API key for data stores, add t
431444
</TabItem>
432445
</Tabs>
433446

434-
1. On the **bot_config.py** file for main configuration of the bot:
447+
1. On the `bot_config.py` file for main configuration of the bot:
448+
449+
1. Set `BOT_TOKEN` to the token generated by your bot.
450+
2. Set `OPEN_CLOUD_API_KEY` as the API key you created.
451+
3. Set `ROBLOX_WEBHOOK_SECRET` as the secret you set when configuring the webhook on Creator Dashboard.
452+
4. In `STANDARD_DATA_STORE_ENTRIES` and `ORDERED_DATA_STORE_ENTRIES` dictionaries for locating the data store of each record to delete:
453+
1. Add your copied Start Place IDs as keys.
454+
2. Add Universe IDs as the first element of the tuple value.
455+
3. Replace the second element of the tuple with the name, scope, entry key name, and associated User ID of your data stores. If you use a different data schema, modify to match your own data schema accordingly.
435456

436-
1. Set `DISCORD_BOT_TOKEN` or `GUILDED_BOT_TOKEN` to the token generated by your bot.
437-
2. Set `OPEN_CLOUD_API_KEY` as the API key you created.
438-
3. Set `ROBLOX_WEBHOOK_SECRET` as the secret you set when configuring the webhook on Creator Dashboard.
439-
4. In `STANDARD_DATA_STORE_ENTRIES` and `ORDERED_DATA_STORE_ENTRIES` dictionaries for locating the data store of each record to delete:
440-
1. Add your copied Start Place IDs as keys.
441-
1. Add Universe IDs as the first element of the tuple value.
442-
1. Replace the second element of the tuple with the name, scope, entry key name, and associated User ID of your data stores. If you use a different data schema, modify to match your own data schema accordingly.
457+
1. Execute the following command to run the bot:
443458

444-
1. Execute the following command to run the bot:
445459
<Tabs>
446460
<TabItem label="Guilded">
447461

@@ -459,7 +473,7 @@ After you finish setting up the webhook, bot, and API key for data stores, add t
459473
</TabItem>
460474
</Tabs>
461475

462-
1. The bot then starts to listen and verify Roblox webhooks for right to erasure Requests and calls the Open Cloud endpoint for deleting the corresponding data store.
476+
1. The bot then starts to listen and verify Roblox webhooks for right to erasure Requests and calls the Open Cloud endpoint for deleting the corresponding data store.
463477

464478
<Alert severity="warning">
465479
To ensure constant and secure execution of the scripts, save and run them locally only. Keep your local device or virtual machine running the scripts turned on at all times. In the event that your device goes offline, you need to manually manage any missed messages during the offline period and handle delivery failures according to the [retry policy](../../cloud/webhooks/webhook-notifications.md#delivery-failure-retry-policy).
@@ -486,10 +500,10 @@ You can create and run a test message to verify that your custom program can pro
486500
}'
487501
```
488502

489-
2. If you have a webhook secret:
503+
1. If you have a webhook secret:
490504
1. Generate a `Roblox-Signature` by applying HMAC-SHA256 encoding to your webhook secret key.
491505
2. Set the current time using UTC timestamp in seconds as `Timestamp`.
492-
3. Put together the `description` in the following format:
506+
1. Put together the `description` in the following format:
493507

494508
```plain title="Description Field Format"
495509
{Timestamp}. You have received a new notification for Right to Erasure for the User Id: {userId} in the game(s) with Ids: {gameIds}`.

0 commit comments

Comments
 (0)