API
This page provides a reference for the discord-verify SDK’s API.
Important
Discord Verify reports a membership signal, not a player’s identity, age, or permission to use Discord. Review Discord References on Roblox before adding a player-facing verification flow.
verify.verify(player)
Verifies if a player is currently in the Discord server. This function yields until verification is complete and will only send one HTTP request if called multiple times in quick succession for the same player.
Parameters
player(Player): The player to verify.
Returns
boolean: Returnstrueif the player is currently in the Discord server, otherwisefalse.
Example
local isVerified = verify.verify(player)
if isVerified then
print(player.DisplayName .. " is currently in the Discord server!")
else
print(player.DisplayName .. " is NOT currently in the Discord server! :(")
endNote
After a player verifies, you should save their verification status to their profile data. This prevents needing to make an HTTP request every time they join.
verify.verified
A signal that fires when a player successfully verifies.
Parameters
The callback function connected to this signal receives the following parameter:
player(Player): The player who was verified.
Example
verify.verified:Connect(function(player: Player)
print(player.DisplayName .. " successfully verified!")
end)verify.openedMenuEvent(player, values)
Tracks when the player opens the verification menu. This is used for analytics to track your verification funnel.
Parameters
player(Player): The player who opened the menu.values(table?): An optional table of additional values to log with the event.
Example
-- Call this when the player opens the verification UI
verify.openedMenuEvent(player)