So i’m trying to create a webhook going to my discord server sending info about someone who joined. I use https://hooks.hyra.io so it should work. The service allows to send roblox info to discord.
Could anyone please have a look why i’m getting the error Http 400 (Bad Request)
Script:
local webhook = "https://hooks.hyra.io/api/webhooks/removedforsafety"
local Players = game:GetService("Players")
local http = game:GetService("HttpService")
game.Players.PlayerAdded:Connect(function(plr)
local userId = plr.UserId
local thumbType = Enum.ThumbnailType.HeadShot
local thumbSize = Enum.ThumbnailSize.Size420x420
local content, isReady = Players:GetUserThumbnailAsync(userId, thumbType, thumbSize)
local luaData =
{
["embeds"] = {
{
["title"] = plr.Name,
["url"] = "https://www.roblox.com/users/"..plr.UserId,
["color"] = 8380233,
["fields"] = {
{
["name"] = "Rank:",
["value"] = "Racer"
},
{
["name"] = "User Id:",
["value"] = plr.UserId
},
{
["name"] = "Game:",
["value"] = game.Name
}
},
["footer"] = {
["text"] = "Joinlogger V1",
["icon_url"] = "https://cdn.discordapp.com/attachments/843187749976670228/969990472703561748/NK_logo.png"
},
["thumbnail"] = {
["url"] = content
}
}
}
}
http:PostAsync(webhook, http:JSONEncode(luaData))
end)
Anything is appreciated. Thank you.