I am working on a main menu for a project and was wondering if I could include a button that shows a Discord invite code, but I am not sure if the API to check if a player is allowed to see external links includes allowing a Discord link to be shown in-game
PolicyService
GetPolicyInfoForPlayerAsync
This is my server code to check if the player can see external links
local PolicyInfo = PolicyService:GetPolicyInfoForPlayerAsync(player)
local DataToSend = {
AllowedLinks = {
Discord = false
},
}
local Found = false
for Index,Value in pairs(PolicyInfo["AllowedExternalLinkReferences"]) do
if Value and Value == "Discord" then
Found = true
break
end
end
if Found then
DataToSend.AllowedLinks.Discord = true
print("AllowedExternalLinkReferences: Discord")
end
ReplicatedStorage.Events.LoadMenu:FireClient(player, DataToSend)
Image example: