Swear Words not getting Tagged

So I have a suggestion feature in my game and apparently people are abusing the feature by swearing off of it which is surprisingly working.

Idk why it isn’t getting tagged.
Probably because the message is being send to another web without any filters.
FYI,the suggestions are being sent to one of my Discord Servers.

Here’s my script:

local HttpService = game:GetService("HttpService")
local TextService = game:GetService("TextService")

local WebhookURL = [I wont show]

local function postToDiscord(Message)
	local Data = {
		["content"] = Message
	}
	Data = HttpService:JSONEncode(Data)
	HttpService:PostAsync(WebhookURL, Data)
end

game.ReplicatedStorage.Suggest.OnServerEvent:Connect(function(Player, Suggestion)
	local filteredString = TextService:FilterStringAsync(Suggestion,Player.UserId,Enum.TextFilterContext.PublicChat)
	local filtered = filteredString:GetNonChatStringForBroadcastAsync()
	postToDiscord("Suggestion from " .. Player.Name .. ": " .. filtered)
end)

The filter text function wasnt an event of the Chat service?

FilterAsync doesn’t work in studio. Only in the real game

3 Likes

You need to enable HttpRequest in-game for this to work. You can find this option in the game settings in studio.

1 Like