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.
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.
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 commandgenerate-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
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:
- A verification system so people can get the correct nicknames by verifying them self (added in version 0.6)
- 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.