As Discord now allow web requests from Roblox again, I started using a chatlog system. The game is very small and only sends around 50 messages a day, so I'm not overfilling the API, so please don't lecture me about that.
I have the basic script sorted out, But Im wondering how to make it so the players group rank also appears next to the name. Currently the discord message is as follows.
WEBHOOK USERNAME - Player name WEBHOOK CONTENT - Player message.
Id like it to be like this in the server
WEBHOOK USERNAME - Playername,playerrank WEBHOOK CONTENT - Player message,
All help is appreciated. My current script in located below.
``` local url = "REMOVED DUE TO SECURITY" local http = game:GetService('HttpService')
game.Players.PlayerAdded:connect(function(plr) plr.Chatted:connect(function(msg) local data = { ['username'] = plr.Name, ['content'] = msg } local newdata = http:JSONEncode(data) http:PostAsync(url,newdata) end) end) ```
local url = "REMOVED DUE TO SECURITY" local http = game:GetService('HttpService') game.Players.PlayerAdded:connect(function(plr) plr.Chatted:connect(function(msg) local data = { ['username'] = ""..plr.Name.." Rank:"..plr:GetRankInGroup(GroupId), ['content'] = msg } local newdata = http:JSONEncode(data) http:PostAsync(url,newdata) end) end)