What do you want to achieve? I want to know if the following would be allowed with text filtering rules:
I have a system in-game where users can report bugs and can add YouTube video links (if their policy info says they can) showing the problem. These happen through datastores on different servers (AKA I’m not in game).
What is the issue? I would use :GetNonChatStringForBroadcastAsync() however this filters out the link due to it being really heavy on restrictions. And for :GetNonChatStringForUserAsync() well that requires me to be in the server.
What solutions have you tried so far?
I am using this code when the user sends a report:
local filteredTextResult
local success, errorMessage = pcall(function()
filteredTextResult = TextService:FilterStringAsync(text, player.UserId)
end)
if not success then
return false
else
return filteredTextResult:GetNonChatStringForUserAsync(player.UserId)
end
And the following when me (the owner) looks at the report: local FilteredText = game:GetService("TextService"):FilterStringAsync(Name, OwnerId):GetNonChatStringForUserAsync(OwnerId)
I’m just wondering if this is with-in Roblox’s terms or if there is something else I can do.
if you are using something like discord to handle these you shouldnt really worry about filtering that much because no one else is gonna see it. you cant get in trouble for making something unfiltered on something that isnt roblox
its okay if you are scared/cry about seeing other people messages, there is another method. Filter the message seperately and dont filter the link. if you want to make sure that someone doesnt type something random in the link, you could use the almighty, glory
string.match(link, "www.youtube") -- Hey mate, i am a very special function
function to see whether it has www.youtube.
example
--lets say this script might be inside a remote function
function OnServerEvent(player, message, link)
-- Filter the message then
if string.match(link, "www.youtube") then
-- continue
else
return "wrong link" -- you could use this info to prompt a message telling the player it is not a link
-- more stuff
end
end)
Thanks however the problem isn’t me being scared about the messages not being YouTube URLs it’s that Roblox takes down games that don’t filter user’s content appropriately.
if the message was going to public and other people could see it then it would make sense to filter it because people can report the game, but the message is private to you so nobody would be able to report to roblox
Broadcast is meant for, as the method’s name implies, a string intended for widespread display. If you are making a report system then you shouldn’t be using broadcast. Store the raw string when you need to parse it and when it comes to needing to view it, use GetNonChatStringForUserAsync with the viewing player (in this case, yourself) before displaying the text.
Yes, however I am the only one who can see the links plus YouTube has their own report system which is why Roblox allows YouTube links in the first place.