Discord Webhook
Key RequiredUniversal

Discord Webhook

Universal ScriptAuraAura 16.8K views 58 executesUpdated Aug 15, 2023
4.0/ 5(5 votes)
4180% Positive
Lua Script•72 lines (1690 chars)
function SendMessage(url, message)
    local http = game:GetService("HttpService")
    local headers = {
        ["Content-Type"] = "application/json"
    }
    local data = {
        ["content"] = message
    }
    local body = http:JSONEncode(data)
    local response = request({
        Url = url,
        Method = "POST",
        Headers = headers,
        Body = body
    })
    print("Sent")
end

function SendMessageEMBED(url, embed)
    local http = game:GetService("HttpService")
    local headers = {
        ["Content-Type"] = "application/json"
    }
    local data = {
        ["embeds"] = {
            {
                ["title"] = embed.title,
                ["description"] = embed.description,
                ["color"] = embed.color,
                ["fields"] = embed.fields,
                ["footer"] = {
                    ["text"] = embed.footer.text
                }
            }
        }
    }
    local body = http:JSONEncode(data)
    local response = request({
        Url = url,
        Method = "POST",
        Headers = headers,
        Body = body
    })
    print("Sent")
end


--Examples 

local url = "YOUR_WEBHOOK_HERE"
SendMessage(url, "EXAMPLE")


local embed = {
    ["title"] = "This is an embedded message",
    ["description"] = "This message has an embed with fields and a footer",
    ["color"] = 65280,
    ["fields"] = {
        {
            ["name"] = "Field 1",
            ["value"] = "This is the first field"
        },
        {
            ["name"] = "Field 2",
            ["value"] = "This is the second field"
        }
    },
    ["footer"] = {
        ["text"] = "This is the footer text"
    }
}
SendMessageEMBED(url, embed)

Features & Information

a discord webhook that can be used for your scripts. How to get a Discord Webhook 1. Log in to your Discord account and go to the server and channel you want to create a webhook for. 2. Right-click on the channel and select Edit Channel from the context menu. From the left menu, select Integrations, and then click Create Webhook. 3. Enter a name and an avatar for the webhook and copy the webhook URL. 4. Replace YOUR_WEBHOOK_HERE in the code with your own webhook url
#Discord Webhook#Free#Open Source#IDK#Script

Community Comments (3)

323627983323627983Aug 19, 2023(edited)

discord why kick me bruh

AuraAuraAug 19, 2023(edited)

@323627983 huh??

323627983323627983Aug 20, 2023(edited)

You kicked me out.

More Scripts for Universal Scripts