WebhookService
An easy to use Discord webhook wrapper
v1.0.0
Download on Roblox
Download on Github
View Source
What is WebhookService?
WebhookService is a super simple object-oriented Discord webhook wrapper!
It gives developers an easier way to send webhooks by providing them with classes for embeds & webhook messages! Both are also fully type-checked so you don’t need to keep looking back at the documentation!
WebhookService is currently still in development so you may encounter some bugs!
It has not been tested on any other proxy besides for hooks.hyra.io.
WebhookService is licensed under the MIT License
How do I install WebhookService?
It is pretty simple to install WebhookService, all you need to do is either get the model on Roblox or download the file on Github!
Once you’ve gotten either of those, insert it into ServerScriptService
& then you’re ready to start using it!
Scroll down for some usage examples & documentation
Examples
Example usage of WebhookService
Below is some sample code which you can use for your webhooks!
local WebhookService = require(game:GetService("ServerScriptService"):WaitForChild("WebhookService")) --// Put the location of WebhookService here!
local WebhookURL = "https://hooks.hyra.io/api/webhooks/GUILD_ID/WEBHOOK_ID" --// Paste in your webhook but replace discord.com with hooks.hyra.io!
local Webhook = WebhookService:CreateWebhook() --// Initializing the webhook object
Webhook:SetMessage("This was sent using WebhookService!") --// Setting the webhook's message
local Embed = WebhookService:CreateEmbed() --// Create an embed object
Embed:SetTitle("Hey there!") --// Set the title of the embed
Embed:SetDescription("This is a cool embed!") --// Give the embed a description
Embed:AddField("Example Field","You can put something here!") --// Add a field!
Embed:SetColor(Color3.fromRGB(0, 162, 255)) --// Give it some color!
Embed:SetTimestamp() --// Make it show the current time!
Webhook:AddEmbed(Embed) --// Add the embed to your webhook message!
WebhookService:SendAsync(Webhook,WebhookURL) --// Send your webhook!
List of functions
WebhookService:SendAsync(WebhookObject : WebhookObject, WebhookURL : WebhookURL) --// Sends a message using the webhook object to the URL
WebhookService:CreateWebhook() -> WebhookObject --// Creates a webhook object
WebhookService:CreateEmbed() -> EmbedObject --// Creates a embed object
WebhookObject:SetMessage(Message : string) --// Sets the message content of the webhook
WebhookObject:SetAvatar(Avatar : string) --// Sets the avatar of the webhook
WebhookObject:SetUsername(Username : string) --// Sets the username of the webhook
WebhookObject:SetTTS(TTS : boolean) --// Sets whether text to speech is enabled for the webhook
WebhookObject:AddEmbed(Embed : EmbedObject) --// Adds an embed object to the webhook
EmbedObject:SetTitle(Title : string) --// Sets the title of the embed object
EmbedObject:SetDescription(Description : string) --// Sets the description of the embed object
EmbedObject:SetAuthor(Name : string, URL : string?, Icon : string?) --// Sets the author of the embed object
EmbedObject:SetColor(Color : Color3 ) --// Sets the color of the embed object (Color3)
EmbedObject:SetTimestamp(Timestamp : ISO8601 string | nil) --// Sets the timestamp of the embed object (defaults to DateTime.now())
EmbedObject:SetURL(URL : string) --// Sets the URL of the embed object
EmbedObject:SetFooter(Text : string, Icon: string?) --// Sets the footer of the embed object
EmbedObject:AddField(Name : string, Value : string, Inline : boolean?) --// Adds a field to the embed object
Credits
WebhookService was developed by @Starnamics
If you encounter any bugs, please send me a message or reply to this post!
hope you guys enjoy my monthly module release, i’ll think of another one to release next month hopefully
Thank you!