Is a button to a discord invite allowed?

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:
image

2 Likes

A Discord invite should just be in the games social links. Though after more thought, GetPolicyInfoForPlayerAsync does return AllowedExternalLinkReferences so in that sense you should be fine if its restricted to that.

3 Likes