Webhooker | A lightweight, easy-to-use Discord webhook module

Webhooker
A lightweight, easy-to-use Discord webhook module

Roblox Marketplace (17547191286) • GitHubSource (1.6 KB)
Documentation

About

Webhooker is a module to send webhook messages to Discord easily. It's extremely lightweight and super easy to use with custom types for everything!

Example

Here's an example of how you'd use webhooker to send a message with an embed:
Example Code
local webhooker = require(script.Webhooker)
local types = require(script.Webhooker.types)

local webhookUrl = ""

local webhook = webhooker.new(webhookUrl)

local exampleEmbed: types.embed = {
	["title"] = "Hello, world!",
	["description"] = "Example embed!",
	["author"] = {
		["name"] = "Askaye",
		["icon_url"] = "https://tr.rbxcdn.com/30DAY-AvatarHeadshot-6EA6524813D519F72492E88418026D4D-Png/150/150/AvatarHeadshot/Webp/noFilter"
	},
	["fields"] = {
		{
			["name"] = "Field 1",
			["value"] = "Pitbull",
			["inline"] = true
		},
		{
			["name"] = "Field 2",
			["value"] = "Harambe",
			["inline"] = true
		}
	}
}

local payload: types.webhook_payload = {
	["content"] = "This webhook sent!",
	["username"] = "Webhooker example",
	["embeds"] = {
		exampleEmbed
	}
}

local success, response = webhook:sendMessage(payload)

print(success, response)

This would send a message like this
image

Planned features

  • Embed colors
  • Poll support
  • Better documentation

Feel free to add your contributions to the GitHub!

Released under the MPL-2.0 license.

7 Likes

I’ll definitely consider using this in the future. I love it.

1 Like

Very nice resource! Sadly, I can’t access the module through the creator marketplace link.

Is the example code you provided in a client, server or module script?

1 Like

Sorry, I forgot to set it public, you should be able to access it now.
The example code is a server script in serverscriptservice with webhooker as a child.

1 Like