Production-Quality Discord Webhooks for Roblox Server Environments

WebhookLib provides a complete suite of features for sending Discord webhook messages including rich embeds, player notifications, automatic rate limiting, and robust error handling.

Lua
-- Minimal setup
local WebhookLib = require(game.ReplicatedStorage.WebhookLib)
local webhook = WebhookLib.new("YOUR_WEBHOOK_URL")

-- Send a message
webhook:SendMessage("Server started!")

-- Send player join notification
game.Players.PlayerAdded:Connect(function(player)
    webhook:SendJoinMessage(player)
end)

Powerful Features

Production Ready

Built for high-traffic Roblox games with robust error handling, automatic retries, and comprehensive logging.

Rate Limiting

Optional automatic rate limiting with request queueing and exponential backoff to prevent Discord API limits.

Player Tracking

Automatic player join/leave notifications with avatar thumbnails and DataStore-backed join count tracking.

Rich Embeds

Send beautiful Discord embeds with automatic sanitization, text truncation, and profanity filtering.

Thread Safe

Non-blocking operations that won't freeze your game with background processing and smart caching.

Easy Setup

Minimal configuration required with smart defaults. Just provide a webhook URL and you're ready to go.

Quick Examples

Basic Usage

local WebhookLib = require(game.ReplicatedStorage.WebhookLib)
local webhook = WebhookLib.new("https://discord.com/api/webhooks/...")

webhook:SendMessage("Hello Discord!")

Rich Embed

webhook:SendEmbed({
    title = "Game Statistics",
    description = "Current server stats",
    color = 0x0099ff,
    fields = {
        {name = "Players", value = "15", inline = true},
        {name = "Uptime", value = "2 hours", inline = true}
    }
})

Player Events

-- Auto join/leave notifications
game.Players.PlayerAdded:Connect(function(player)
    webhook:SendJoinMessage(player)
end)

game.Players.PlayerRemoving:Connect(function(player)
    webhook:SendLeaveMessage(player)
end)

Ready to Get Started?

Check out the comprehensive documentation to learn how to integrate WebhookLib into your Roblox game.

View Documentation