Adding a "Is a Nitro booster" check

How would you guys go about adding a feature in the game that requires you to be a nitro booster of a server? What system would you use? Open to suggestions

5 Likes

I was going to say use a Discord webhook, but I’m not too sure that would work. Perhaps a Discord bot continuously checking the members Discord profile, and if they have the booster role on Discord, you give them a tag. I have never scripted anything associated with Discord bots, so I’m not the best at these type of things but that’s a guess.

1 Like

I think you’re forgetting something fundamental which is that before checking if a user Nitro boosted a server, you need their Discord account at all. RoVer’s public API can help with that.

Theeeen the rest involves searching, which I don’t assume you did first before posting this topic (please do so in the future!). Refer to the following Discord Support topic about Nitro boosting and the API:

https://support.discordapp.com/hc/en-us/community/posts/360044355652-Nitro-Boost-the-API

ELI5 Version: First, you need a Roblox user’s Discord account. Then, you need a medium to check if someone has a role in your guild.

One way I’ve dealt with this is by using Trello (or any other simple database that you want to use) that a Discord bot can constantly monitor so that the users who Nitro boost are automatically added and removed from the lists on the Trello board. Then, all you have to do is check from Roblox to see if a UserId is in the list.

1 Like

You can right click the role and press copy ID if you have developer mode on for discord.
Then in your code, if you’re using discord.js, you can check in their roles if they have it:

if (GuildMember.roles.find('id', 'the real id goes here')) {
    // They have it, now do what you need to
}

Although this is not really related to the original question, I’ll tell you anyway.

That method is actually deprecated.

Use this instead:

if(GuildMember.roles.find(x => x.id === "id of role")) {
// if the member has a role with the following id, it will execute the code inside
}

Or, as an alternative:

if(GuildMember.roles.find(x => x.name === "name of role")) {
// if the member has a role with the following name, it will execute the code inside
}

Hope this helped make your code more efficient.

7 Likes

You can no longer use this method, unless you previously applied for a Rover API key.

This method is still usable! The only difference now is that you will need to find an alternative API or build your own Roblox-Discord association service. I made sure to note that RoVer’s public API can help with that but in the case that it doesn’t then you’re free to build your own services.

The main point is finding a way to associate a Discord account with a Roblox account or identifier (it can be super simple and one way as well) then checking if the Discord user is boosting the server. If they are, you can apply benefits accordingly into games.