How can I connect my discord server and my roblox game using rover?

Personally I don’t know how to do this, I’ve seen multiple games use rover to connect their discord server to their roblox game.

Recently a game i play has made discord verification using rover to access their game, instead of having to be in the group. How may I do this?

Just don’t know how to code or begin.

1 Like

HttpService. I don’t know what Rover is, but I assume it’s a third-party website that allows you to connect Discord guilds with Roblox.
Read documentation on Rover, I am sure there is everything you need.

Rover is a bot service for roblox, its a bot you add to your discord server to verify peoples accounts and if they are in a certain group. It also has a option to take their API and connect discord servers to roblox although i don’t know how to do that or script that,

API is what you are looking for.

yeah. but i just said how do i code the part to check if they are in the server…?

Using HttpService. Read documentation on API.
Also can you send a link to Rover’s website? I can’t seem to find it.

https://rover.link to get the API, add it to a server and go to to that servers dashboard and press developer API

I read the documentation, it just explains endpoints and terms nothing about coding in roblox.

Not familiar with http service, i only used it once for webhooking thats it

So after you register and add the bot to your server,

Using HttpService:Get(ENDPOINT, HEADERS), you can get if a user is on the server. The endpoint should be https://registry.rover.link/api/guilds/YOUR GUILD ID/roblox-to-discord/ROBLOX ID TO CHECK, and headers can be empty.

The code should look something like this:

local HttpService = game:GetService("HttpService")

USER_ID = 1
GUILD_ID = 1
ENDPOINT = `https://registry.rover.link/api/guilds/{GUILD_ID}/roblox-to-discord/{USER_ID}`

local response = HttpService:Get(ENDPOINT)
local data = HttpService:JSONDecode(response) -- we must get json from the response
print(data)

data is a dictionary and will contain key discordUsers. By doing print(data["discordUsers"]), you will get every user on the server that has been verified with account USER_ID.

And, to solve your task, you can simply check the length of data["discordUsers"]. If the length is 0, then the account is not verified on the server.

NOTE: YOU MUST ENABLE HTTP SERVICES IN YOUR GAME’S SETTINGS

It wont let me access registry.rover, where did you get that from?
Or is that just a directory for the script itself

i forgor to make it a string :skull:
I updated the code.

Is the userid for the server owner becuase i cant be asked to change the players id

USER_ID is the Roblox user ID that you will check for.
Since you cannot do HttpServices on Client, make a RemoteEvent and take the player.UserId.

Would game.Players.PlayerAdded function work for this?

Yeah, it will.

“Get is not a valid member of HTTP Service”

    local response = HttpService:Get(ENDPOINT)

Did you mean getasync

Yes, it’s GetAsync. I usually use my own module for HttpService, I often forget that it is :GetAsync.

Okay, well its saying unauthorized im guessing you meant something other then userid

Is there a part to get the API because i have my key

You can try inputting HEADERS in the GetAsync, and do this

{
  ['x-api-key'] = "API KEY"
}