Webhooker (Object-Oriented Discord webhook system)

Webhooker

It’s just a module I made in about an hour, I wanted an object-oriented module for administrative logging on a game I work for so I made this.

Making it public just for anyone who needs or wants something like this, I might not update it, I might, I’ll try and patch bugs, Should be simple to understand.

Supports:

  • Normal Messages
  • Embed Titles, Colors, Descriptions and footers

Usage:

local Webhooker = require(path.to.webhooker)

local Webhook = Webhooker.new()
Webhook:setToken("discord webhook token")
Webhook:setChannel("discord channel ID")

local Message = Webhook.Message()
Message:setName("Test User")
Message:setText("Hello!")

local Embed = Webhook.Embed()
Embed:title("Test Embed")
Embed:description("Hello world!")
Embed:color(Color3.new(1, 1, 1))
Embed:footer("Test")

Message:addEmbed(Embed)
Webhook:stashMessage(Message)
Webhook:Run()

Messages in queue are cleared out on :Run()

2 Likes