ScriptzO_0
(Gothganistan)
June 1, 2022, 10:46pm
#1
Everytime I try to use icon_url it never loads the icon in the web hook.
Heres my script
function webhook:CreateHook(HookUrl)
local Embed = {
["content"] = nil,
["embeds"] = {{
["icon_url"] = "https://pngimg.com/uploads/earth/earth_PNG21.png",
["title"] = "Test",
["description"] = "Test",
["color"] = tonumber(0x48BE89),
["footer"] = {
["text"] = "Test"
},
["fields"] = {
{
["name"] = "Server Name:",
["value"] = MarketPlaceService:GetProductInfo(game.PlaceId).Name
},
{
["name"] = "Player Count:",
["value"] = #Players:GetChildren()
}
}
}}
}
local Result = HttpService:JSONEncode(Embed)
HttpService:PostAsync(HookUrl, Result)
end;
return webhook
From what I remember the icon_url
refers to the webhook, so take it out of the “embeds”.
ScriptzO_0
(Gothganistan)
June 1, 2022, 10:48pm
#3
Placing it below content doesnt make it pop up either
Oh, by referring to some documentation about Discord Webhooks, it seems it should be called avatar_url
instead of icon_url
. Try changing that, and of course placing it under “content” instead of inside your embed.
Discord Webhook - Discord Webhooks Guide (birdie0.github.io)
ScriptzO_0
(Gothganistan)
June 1, 2022, 10:53pm
#5
LegendOJ1:
avatar_url
Still does not seem to work ([30chartestestest])
Are there any errors? I just tested this and it seems to work properly.
ScriptzO_0
(Gothganistan)
June 1, 2022, 10:59pm
#7
Turns out i forgot to use “author” I was talking about the “icon_url” which displays a icon in the embed
(Basically saying i fixed it)
1 Like