N-RTD | Retrieve data from Discord (Service ended)

N-RTD | Retrieve data from Discord

:warning: On April 3 2022 this service has shut down.

Hello everyone! This is probably one of the best things i’ve ever created: N-RTD.

I have been working on this for about 3 weeks and i got the first stable version of this system.

With this system you will be able to retrieve some data from a Discord server.

Features:
Check if a player is in a Discord server;
Check if a player has a role in a Discord server.

How does this work?
This system is based on the fact that roblox allows only one account to have a specific username. To use this the player will need to have a nickname set to his roblox username in the Discord server.

How to use this?
This system requires a Discord bot and some lines of codes. If you are not experienced with HTTPService i have created a module to interact with the system easily.

:warning: You need to grant the bot the permissions it asks for in order to get it to work correctly.

While developing this i kept in mind the privacy and the security.

Privacy: The system requires that you bind the game to the Discord server.
Security: Every request will need to pass a security token in the request.

:warning: CODE DEPRECATED REFER TO THIS

Binding the game

Binding a game is very easy. If you want to use the module you will need to run this command in the command bar or in a script:

local NRTD = require(8247119473)
local guildId = "Discord server id"

local result = NRTD:RequestBind(guildId)

print(result)

Once you submit the request you will have 10 minutes to approve it from the Discord server using the bot. To approve a request use:
/bind-experience <game-id>

Check if a user is in a server

Requesting the data is also very easy. You will need to run this command in the command bar or in a script:

local NRTD = require(8247119473)
local username = "The username of the player"
local guildId = "Discord server id"
local token = "The token of the Discord server"

local result = NRTD:CheckForUser(username, guildId, token)

print(result)

Making this request without binding the game or without providing the correct token will result in HTTP error 401 (Unauthorized) this is to protect people’s privacy.

Retrieve the Discord server token:

Use the command /view-token to receive a DM from the bot with the token. If the token gets leaked you can regenerate it with the command generate-token

Check if a user has a role

Checking if user has a role in a Discord server is very easy. You will need to do the same process you do to check if a user is in a server but you will need to change the method and provide a roleId.

local NRTD = require(8247119473)
local username = "The username of the player"
local guildId = "Discord server id"
local token = "The token of the Discord server"
local roleId = "The id of the role you want to check for"

local result = NRTD:CheckForUserRole(username, guildId, token, roleId)

print(result)

Unbinding a game

Ubinding a game is very easy. Run this code:

local NRTD = require(8247119473)
local guildId = "Discord server id"
local token = "The token of the Discord server"

local result = NRTD:Unbind(guildId, token)

print(result)

This can be also done with the bot with the command /unbind-experience <game-id>

IMPORTANT

:warning: Removed in version 0.7

You don’t need to do the setup anymore as the /view-token command was removed. You can view your guild token on the dashboard.

To use bot’s commands you have to do the setup using the command /setup.

General info

All the print statements are optional. The result will be the response that the system will give to the request.

If someone knows the security token he will be allowed to get the data from any binded game. You should keep the token private. Regenerating the token will result in all the requests done with old ones being rejected.

Data storage
All the data needs to be stored somewhere. All the data is actually stored in an external database. The data isn’t shared with anyone and i will not access it if not extremely necessary for important situations (system data problems, ecc)

Security info
If I discover a way through someone could access the data or make requests that will get the data granted without following the correct process i will put the system offline until the issue is fixed.

Tokens are unique, no one will have your same token and old tokens cannot be choosen as new ones.

What’s next?
I’m planning to add:

  1. A verification system so people can get the correct nicknames by verifying them self (added in version 0.6)
  2. More than 1 token per server with custom permissions.

Summary
Invite the bot to the server and follow the instructions in this post.

I’ve seen many people asking how they can achieve this and so i decided to put or at least try to put and end to this story.

To stay up with updates or be notified about service status join the support server.

19 Likes

It would be great if you can implement a system that checks for certain messages in a discord server/channel like announcements and announce it on roblox.

1 Like

woah this is amazing, this will help lots of people

1 Like

Great idea, I will take it in consideration

this looks… sussy.

can you show us the source code to see id its safe or not?

its still cool tho.

I agree, can you show us the code of the Bot API?

I’m actually not going to make this open source as i do for other projects. The reason i do this is because i don’t want others to know the code so it’s harder to make scripts to take bad actions against it. If you want more informations about how it works than i will be as transparent as i can to make you feel safe using it as long as you don’t request to see the code

i have an idea. put a license under this project and nobody can steal, edit it.

then you can open-source

I’m pretty sure all contributions in this category must be open sourced, according to the rules.

For who is using the system, it is temporarily offline for maintainance To get notified when it’s back online join the support server.

So an MIT license of sorts, not very reliable as people will already probably open source their exploits to the program. Not a good idea.

2 Likes

just an idea, maybe implement an endpoint to see if a player is a discord booster for the server !

1 Like

This is really cool! I wonder if this can be used to give special perks in-game to Nitro boosters.
EDIT: just realized this might be against Roblox’s TOS lol. Still, amazing project nonetheless! ^^

2 Likes

Well it’s already possible using the function CheckForUserRole() as it returns true if the user has a role so just copy the id of the role you want to check for. Also if i’m correct using this for providing perks for nitro booster is against the tos

1 Like

Its simple and all, don’t get me wrong if it works it works, but maybe add a cooldown for an x amount of requests sent. Good work though

2 Likes

Thanks for your feedback. After fixing the current issue i will be working on the improvements and this was already in my mind but i didn’t list it.

1 Like

The issue has almost been fixed. The service should be back up online tomorrow.

Question. How will we know whether the user is on the server or not? Sorry if this was already been answered before, just out of curiosity. Nonetheless, awesome creation.

Also, when checking for the user (if in the server) method, do you mean their UserId?

The system checks for a user in the server with a nickname equal to the passed username. The method is a parameter needed for the system to run the correct function.

when i try the /view-token it returns “This interaction failed”