Hello developers,
I am trying to send a Embed to discord using HTTPService but I keep getting this error. Can anybody help?
local http = game:GetService("HttpService")
local Data = {
['embeds'] = {{
color = 16753920,
title = "Application Logs",
fields = {
name = player.Name.." - "..player.UserId,
value = "Passed Application!",
footer = 'Moonlight Services'
}
}}
}
local FinalData = http:JSONEncode(Data)
local URL = "(WebhookLink)"
http:PostAsync(URL,FinalData)
Anyone know the problem or how I can fix it?
5 Likes
Also, yes I do have a function that calls it.
1 Like
ORdenDev
(orden)
August 22, 2020, 6:55am
#3
just wanted to say that there’s no function , like you said that there is . And I don’t see any problem in your code , really . It should work correctly , maybe there’s some connection errors ?
and you should read more about this error here
1 Like
lluckvy
(aaron)
August 22, 2020, 7:25am
#4
Just to be sure, did you toggle on ‘Allow HTTP Requests’ in Game Settings?
1 Like
Try reading the discord developer API, chances are you have a mistake there.
1 Like
Is HTTP Enabled on game settings? And recheck the httpservice article on the dev hub
1 Like
Webm07
(Webm07)
August 22, 2020, 11:17am
#7
This is likely due to incorrect formatting/missing information with the data. Use https://embed.discord.website and change it to look like this
["title"] = "Embed",
["description"] = "Hello!",
["color"] = 16614400,
["footer"] = {
["text"] = "testing", }
}},}
Hope this helps
6 Likes