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

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”

The bot is offline with all the system I was fixing an issue

Issue fixed

The issue that made the system being down for this time has been fixed.

What was the issue?

The bot was answering to commands 2 times and there was a little security problem. Everything has been solved.

You can invite the bot again as i made it leave every server to correctly sync with the database.

Database has been reset. Run the /setup command to set the system up correctly. Tokens will now be send in the channel that is created with the setup so if you demote a user from his charge of server manager he will not be able to look at the token anymore as before the person was able to look at it in DM.

If you downloaded the module you will need to redownload it again as it has been changed. It is now suggested to use the module to make requests as now the bot has 2 hosts in case one is down. The module automatically refers to the secondary host if the first one is unavailable.

Fixed right in time for Christmas, start awarding your players!

Changelog

Updates and news

After over one month and a half this system exited its beta status.

API rate limit

Rate limit system has been implemented. You can now make only 100 requests/60 seconds, basic plan is the only current one, others will be added in the next few days.

Exceeding the rate limit will make the experience banned from the API for 3 minutes and every request made during that period of time will receive an HTTP error 429 (Too many requests).

Requests are temporarily stored until the next minute of the hour comes.

Exceeding the rate limit too many times will result in all the experiences owned by the creator of the one which exceeded getting permanently banned from the API in the future.

API wrapper

The old API wrapper is half deprecated and it won’t really work without editing it. You can get the new one here. If you already own it download it again or download it here
N-RTD API Wrapper.lua (1.4 KB).

API’s changes

The API does not support requests sending parameters with wrong type anymore, doing so will result in HTTP error 400 (Bad request).

Host

This service is not hosted on Heroku anymore. Read more in the support server.

Status page

You can now monitor systems’ status here.

Upcoming features

In the next months this service will have a website which is already being worked on. Sessions handling only is left. The website will have a dashboard where you will be able to configure the settings for your server/experience. These includes, as it has been asked a lot, checking for a user with the option nickname is equal or nickname is equal or contains.

Downtimes

If you used this system for a while you probably know that there have been several downtimes, using the new system seems to have decreased these.

Code changes

Moved from CommonJS into ES6 modules;
Refactored code;
Splitted the bot and the API into separate projects hosted on different servers (same host) which should lower the ping.

More info in the support server.

Submit issues you encounter here.

1 Like

This seems useful, however does this require a bot? If not, how do I retrieve messages?

Yes it does and the bot is linked in the first post, it acts as a proxy between roblox and discord.

Is there any way we can host the bot ourselves? I just wanted to implement it into my server’s custom bot I made. (node.js)

No there is no way you can host it yourself currently, I may try to add it in the future after I finish the sessions handling for the dashboard

1 Like

Also how would you host it bry yourself? Do you mean making your bot responding to the commands instead of mine? If you want you can submit it as a feature request in the support server.

I just wanted like a GitHub repo of the command code, and I could input the code into my own command handler and such, and download all the required packages.

Changelog

Updates and news

The system got a website which is available here. The website has a dashboard where you can manage the service for your server and verify your account.

From now on you can change the API’s check method which means that if it is set to nickname is qual or contains the system will not check for a user that has the nickname equal to the passed username but for a user that has a nickaname containing the passed username this can be useful if you have people with nicknames like: Mod | NinjaFurfante07.

You will need to log in with your Discord account in order to access the dashboard.

Bot changelog

Updates and news

You can now verify your account by using the /verify command.

Upcoming changes to the API

Upcoming changes to API

Later this month the API will receive an important update. From that date on requests to the API will require an API key which you will be able to obtain on your developer page on the website.

You will be notified in the support server (the Discord server) 7 days before the change goes live. Once the update is up requests that provide an invalid API key will be rejected. This will help blocking access to the API to banned users.

Also comment below features you would like to see.

Important notice

There are upcoming changes to the API. On 2022-03-20T04:00:00Z the API reponses will be changed: the API currently sends back a bool value as response, this is unfortunately changed to a string by roblox HTTPService causing some issues with users thinking that the API is not working correctly if they use a code similar to the one below.

local IsAdmin = NRTD:GetUserWithRoleAsync("username", "guildId", "token", "roleId")

if isAdmin then --isAdmin is true/false (bool) when sent by the API, becomes "true"/"false" (string) when received on roblox
    -- grant access to admin commands
end

With the new API version the responses will be a JSON table which you will then need to decode if an automatic decode function is not implemented in the API wrapper. A new response would look like the one below.

-- Code is in JSON

{
    "found": true
}

--OR

{
    "found": false
}

You should start preparing your code to adapt to this change else it will break.

For who was confused with the documentation posted on the website it is actually outdated due to changes that have been made to the API wrapper and will soon be updated. The documentation has been updated

Hey geometrical, sorry for the late reply. Can you please what you mean by “retrieve messages”?

having a few issues

when I run this, I get an error: print(result):4: attempt to call a nil value

where do you find the token for your server?

Also the token of your server can now be found on your dashboard at https://n-rtd.up.railway.app

thanks but now i’m getting a http 401 unauthorized?

local NRTD = require(8247119473)

local result = NRTD:GetUserWithRoleAsync("Ben10Tam", "guildid", "token", "roleid")

print(result)

this is my code, i’ve hidden my guildid, token and roleid but this should work right?