Achieve
I simply want to make a webhook bot to go to my discord server when I trigger.
Issues
I get a HTTP 400
Error. I’m also having an issue of grabbing the games Icon/Thumbnail.
Solutions
I’ve tried rewriting the entire scripts, making new bots and getting new HTTP Links and nothing works.
Script
function DiscordShouts(plr,Send,One,Two,Three,Four,Five,Six,Seven)
local function ColorTransfer(c)
return math.floor(c.R*255)*256^2+math.floor(c.G*255)*256+math.floor(c.B*255)
end --GotFromTMB
local HS = game:GetService("HttpService")
local Place = game:GetService("MarketplaceService"):GetProductInfo(game.PlaceId)
local PlaceLink = "https://www.roblox.com/games/"
--[[ShowName, StartTime, Color]]
if Send == "Results" then
--[[ShowName,Result,Color,Matchtype]]
local MessageData = {
["embed"] = {
["color"] = ColorTransfer(Three),
["thumbnail"] = {
["url"] = "https://www.roblox.com/asset-thumbnail/image?assetId="..Place.."&width=768&height=432&format=png"
},
["fields"] =
{
["name"] = "Result",
["value"] = Two
},
{
["name"] = "Match Type",
["value"] = Four,
["inline"] = false
},
{
["name"] = "Place Located",
["value"] = "Where At",
["inline"] = true
},
{
["name"] = "Who Sent",
["value"] = plr.Name,
["inline"] = true
}
}
}
MessageData = HS:JSONEncode(MessageData)
HS:PostAsync(MatchResultsWebhook,MessageData) --The MatchResultsWebhook goes to a StringValue that is set to a HTTP Value.
end
end
Thank you to anyone who’s willing to help.