Are you allowed to make a FeedbackSystem via a Webhook on your discord server, when it’s filtered? Or can I get banned because of offsite activity?
1 Like
You aren’t allowed to explicitly link to websites the Player is not allowed to see (You can check which websites can be displayed to a Player with PolicyService
), so if you don’t reference Discord itself, you should be alright.
2 Likes
So is this now permitted and can I do it like this, please check!?
Server script:
webhook = "censored!"
-- SETTINGS --
local throttleAmount = 30 -- How long to wait between each time a player sends feedback. Set to 0 for default time. (10 seconds)
-- MAIN CODE -- (Do not edit!)
game:GetService("Players").PlayerAdded:Connect(function(v)
local waiting = game:GetService("ReplicatedStorage").waiting:Clone()
waiting.Parent = v
end)
if webhook == "" then
error("Webhook isn't set! Make sure to set your webhook and follow all instructions in the README.")
end
local http = game:GetService("HttpService")
game:GetService("ReplicatedStorage").sendReport.OnServerEvent:Connect(function(Player, fb)
print("Sending...")
if Player.waiting.Value == false then
print("Sent")
local filteredFb = game:GetService("TextService"):FilterStringAsync(fb,Player.UserId)
local result = filteredFb:GetNonChatStringForUserAsync(Player.UserId)
print(result)
local Data = {
["content"] = "**Feedback received!**\n\n*Username:* `"..Player.Name.."`\n*Feedback:*\n`"..result.."`"
}
Data = http:JSONEncode(Data)
http:PostAsync(webhook, Data)
Player.waiting.Value = true
if throttleAmount == 0 then
wait(10)
else
wait(throttleAmount)
end
Player.waiting.Value = false
end
end)
Client side(PolicyService and all thats stuff):
local http = game:GetService("HttpService")
local policy = game:GetService("PolicyService")
local replicatedStorage = game:GetService("ReplicatedStorage")
-- Function to check if Discord link is allowed
local function canPlayerUseDiscord(player)
local success, policyInfo = pcall(function()
return policy:GetPolicyInfoForPlayerAsync(player)
end)
if success and policyInfo then
-- Check if 'discord' is an allowed external link reference
for _, reference in pairs(policyInfo.AllowedExternalLinkReferences) do
if reference == "Discord" then
return true
end
end
end
warn("Discord link is not allowed for this player.")
return false
end
-- Event handler for MouseButton1Click
script.Parent.MouseButton1Click:Connect(function()
local player = game.Players.LocalPlayer
if script.Parent.Parent.fdbk.Text == "" then return end
local fb = script.Parent.Parent.fdbk.Text
-- Check if Discord reference is allowed
if canPlayerUseDiscord(player) then
script.Parent.Parent.fdbk.Text = ""
print("Sends")
replicatedStorage.sendReport:FireServer(fb)
else
print("Doesn't send")
script.Parent.Parent.fdbk.Text = "Player is not allowed to reference Discord."
warn("Player is not allowed to reference Discord.")
-- Optional: Notify the player in the UI that Discord links are not allowed
end
end)
1 Like
yeah you can as long as you don’t mention discord to the player, you don’t need to use policy service as long as discord isn’t mentioned or anything offsite
This is also a great solution for gathering feedback, created by a Roblox employee:
1 Like
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.