I know its part of the ['username'] because it works, but it stops working when I have the string and the plr.UserId
together
local url = "https://discord.osyr.is/api/webhooks/my-webhook" local http = game:GetService('HttpService') game.ReplicatedStorage.RemoteEvent.OnServerEvent:Connect(function(plr, msg) local data = { ['username'] = plr.Name.." User Id: "..plr.UserId, ['content'] = msg } local newdata = http:JSONEncode(data) http:PostAsync(url,newdata) print('sent') end)
Discord started blocking webhook requests from Roblox servers because they were being abused for things like game error logging and storing arbitrary data outside of Roblox.
To get around this, you can use try to use a proxy server as detailed in this devforum post.
However, it's only a matter of time until Discord finds each proxy and blocks them too, so I wouldn't rely too heavily on connecting to Discord in this way for your game.
Edit: After re-reading your code, it seems that you're already using the proxy, so it could be that Discord has already found it and blocked requests from that IP address.