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)