Hi!
Right now, I have this for my embeds.
local Players = game:GetService("Players")
local http = game:GetService("HttpService")
local webhook = "https://webhook.lewistehminerz.dev/api/webhooks/908503758705676288/J3ktPStALQfNvgCUN7FXnDarxDb9VuHesbJ6KjLG4El7vplZof9eVMx_hG2p5Z0pN2bH" --Enter your Webhook link here
local queue = 0
Players.PlayerAdded:Connect(function(plr)
local data =
{
["contents"] = "",
["username"] = plr.Name .. " - (#"..plr.userId..")",
["avatar_url"] = "https://www.roblox.com/Thumbs/Avatar.ashx?x=500&y=500&Format=Png&userId="..plr.userId,
["embeds"] = {{
["title"]= plr.name,
["description"] = plr.Name .. " joined the Game",
["type"]= "rich",
["color"]= tonumber(0x6AA84F),
["fields"]={
{
["name"]="Event: Player joined",
["value"]="User: **"..plr.Name.."** with ID: **"..plr.UserId.."** has joined [game](https://www.roblox.com/games/".. game.PlaceId..")/[Profile](https://www.roblox.com/users/"..plr.UserId.."/profile)",
["inline"]=true}}}}
}
http:PostAsync(webhook,http:JSONEncode(data))
end)
Players.PlayerRemoving:Connect(function(plr)
local leavedata =
{
["contents"] = "",
["username"] = plr.Name .. " - (#"..plr.userId..")",
["avatar_url"] = "https://www.roblox.com/Thumbs/Avatar.ashx?x=500&y=500&Format=Png&userId="..plr.userId,
["embeds"] = {{
["title"]= plr.name,
["description"] = plr.Name .. " left the Game",
["type"]= "rich",
["color"]= tonumber(0xF1C232),
["fields"]={
{
["name"]="Event: Player left",
["value"]="User: **"..plr.Name.."** with ID: **"..plr.UserId.."** left [game](https://www.roblox.com/games/".. game.PlaceId..")/[Profile](https://www.roblox.com/users/"..plr.UserId.."/profile)",
["inline"]=true}}}}
}
http:PostAsync(webhook,http:JSONEncode(leavedata))
end)
But then I remembered API requests would stop after a bit, and the webhook would be backed up for a bit, say if I restarted my game. All players would be shoved into a queue, and instantly put back once the server accepts it. So, how would I add queues to my webhook to make sure it doesn’t instantly overload?
I do want it in the end to post it.
Thanks!
Also, right now I think my Creating Plot embed code is safe to overload.