Error 500 on log with webhook

So i made this script to track player on the blue app but it doesnt always work and gives me error 500 or just doesnt send the message

this should be the result

if i remember good i cot error 500 at the line whit HTTPService:PostAsync(hook, d)
the script:

local HTTPService = game:GetService("HttpService")
local proxy = "https://webhook.lewisakura.moe"
local hook = "https://discord.com/api/webhooks/--/--"
hook = string.gsub(hook, "https://discord.com", proxy)
local players = game:GetService("Players")
local verifiedBadge = "<:v_:1274384244529041510>"
local premiumBadge = "<:p_:1274384503577510100>"

game:GetService("Players").PlayerAdded:Connect(function(player)
	local starterDisplay = player.DisplayName
	local isPremium = false
	local isVerified = false

	if player.MembershipType == Enum.MembershipType.Premium then
		starterDisplay = starterDisplay.." "..premiumBadge
	end

	if player.HasVerifiedBadge  then
		starterDisplay = starterDisplay.." "..verifiedBadge
	end
	
	local avatarImg = ""
	local thumbnail = HTTPService:GetAsync("https://thumbnails.roproxy.com/v1/users/avatar?userIds="..player.UserId.."&size=250x250&format=Png&isCircular=false")
	thumbnail = HTTPService:JSONDecode(thumbnail)

	if thumbnail["data"][1]["state"] == "Completed" then
		avatarImg = thumbnail["data"][1]["imageUrl"]
	end
	
	local d = HTTPService:JSONEncode({
		['embeds'] = {{
			["image"] = {["url"] = avatarImg},
			['title'] = "**Player Joined**",
			['description'] = "**["..starterDisplay.." (@"..player.Name.." | "..player.UserId..")](https://roblox.com/users/"..player.UserId.."/profile)**",
			['type'] = "rich",
			["color"] = tonumber(0x00ff00),
			["timestamp"] = DateTime.now():ToIsoDate(),
		}
		},
	})

	HTTPService:PostAsync(hook, d)
end)

1 Like

post bump characterslezgoooo

proxy’s fault

Summary

dwefwrgthyjukh

Use Guilded for webhooks. I used discord webhook proxies such as this one and got the same error but proxies aren’t 100% reliable.

i fixed by changing discord.com to discordapp.com and it works very well

2 Likes