So my code is sending the message and embeds but not the buttons,
i cant figure it out and i cant seem to find anything on this.
local HttpService = game:GetService("HttpService")
local webhookUrl =
local function sendDiscordMessage()
local data = {
["content"] = "test test test",
["embeds"] = {
{
["title"] = "Sample Embed",
["description"] = "regggee",
["color"] = 7506394
}
},
["components"] = {
{
["type"] = 1,
["components"] = {
{
["type"] = 2,
["label"] = "Primary tg",
["style"] = 1,
["custom_id"] = "button_1"
},
{
["type"] = 2,
["label"] = "Visit rrree",
["style"] = 5,
["url"] = "https://devforum.roblox.com"
}
}
}
}
}
local jsonData = HttpService:JSONEncode(data)
local success, response = pcall(function()
return HttpService:PostAsync(webhookUrl, jsonData)
end)
if success then
print("Message sent successfully!")
else
warn("Failed to send message: " .. response)
end
end
wait(4)
sendDiscordMessage()
any help is greatly appreciated.