Hookify - Module for Discord Webhooks

Hookify

GitHub Repository: https://github.com/Gonistical/Hookify/tree/main


You may have heard of Discord Webhooks some time before, and probably may used them.
Usually they are used inside Roblox games for logging User behavior. (ex. user has left, user has joined and etc.)

But creating these kinds of webhooks is pretty time consuming. So I came up with a solution, Hookify
What is that? I am Glad you asked!


Hookify is a Module that simplifies discord webhooks.

How to use it?


Here is an example of how to send messages via HookBlox:
local DiscordWebhook = ""
local Hookify = require(script.Hookify)
local DiscordClient = Hookify.new(DiscordWebhook)

DiscordClient:Send("I am sentient")

The result?


image


Something’s missing, well what if we want the webhook’s username and avatar be different?
No problem!

DiscordClient:Send({
	content = "I am also sentient",
	name = "Gonistical",
	avatar = "https://tr.rbxcdn.com/30DAY-AvatarHeadshot-BF23077D7DA0BD69E4F17304686EDA4E-Png/150/150/AvatarHeadshot/Webp/noFilter"
})

image


Isn’t this just amazing?
This isn’t the only thing the module comes with.
You can also send messages using JSON!


local DiscordWebhook = "https://discord.com/api/webhooks/1253609454847524865/b7bBGECNMwPSQvExO9NNH3k0hRiGYYY-oBujjjWSB6GE7DEQj22vOhJyU7zS1vovpms-"
local Hookify = require(script.Hookify)
local DiscordClient = Hookify.new(DiscordWebhook)

DiscordClient:SendJSON("{\"content\": \"Oh god i am a json thingy\"}")

It comes with a custom, built-in Embed Builder!


local DiscordWebhook = ""
local HookBlox = require(script.Hookify)
local DiscordClient = Hookify.new(DiscordWebhook)
local EmbedBuilder = Hookify.EmbedBuilder

local MyEmbed = EmbedBuilder.new()
MyEmbed:setProperties({
	title = "I am a title",
	description = "I am a description",
	url = "https://www.roblox.com/users/3966473181/profile",
	color = 0xFF0000
})
MyEmbed:setAuthor({
	name = "I am the author (of this module)",
	imageUrl = "https://tr.rbxcdn.com/30DAY-Avatar-BF23077D7DA0BD69E4F17304686EDA4E-Png/352/352/Avatar/Webp/noFilter",
	url = "https://www.roblox.com/users/3966473181/profile"
})
MyEmbed:setImages({
	thumbnail = "https://tr.rbxcdn.com/30DAY-Avatar-BF23077D7DA0BD69E4F17304686EDA4E-Png/352/352/Avatar/Webp/noFilter",
	image = "https://tr.rbxcdn.com/30DAY-AvatarHeadshot-BF23077D7DA0BD69E4F17304686EDA4E-Png/150/150/AvatarHeadshot/Webp/noFilter"
})
MyEmbed:createField({
	name = "I am da cool field",
	value = "I am the cool value.",
	inline = false
})

DiscordClient:Send({
	embeds = {MyEmbed},
	content = "oh, cool, now i have a embed"
})

image


Now, this is pretty much all that this has to offer, but making discord webhooks in Roblox will be easier!


But, let’s say you want to delete the webhook? Don’t know why you ever would, but there;s a feature for that.

DiscordClient:Destroy()

Thank you for paying attention, if this helps, please support me by liking this post so more people can see this.

best wishes, mwa

6 Likes

Also, I deleted the test webhook I used for this, so dont try to do anything horrible with it