Webhook Setup
Guardex supports Discord webhooks for real-time notifications. This allows you to receive alerts about player connections, bans, detections, and more directly in your Discord server.
Creating a Discord Webhook
Go to Server Settings
Open your Discord server and click on the server name to open the dropdown menu. Select "Server Settings".
Navigate to Integrations
In the server settings sidebar, click on "Integrations".
Create a Webhook
Click on "Webhooks" and then "New Webhook".
Configure the Webhook
Give your webhook a name (e.g., "Guardex Bans"), optionally set an avatar, and select the channel where you want the notifications to be sent.
Copy the Webhook URL
Click "Copy Webhook URL". This is the URL you'll need to add to your Guardex configuration.
Discord Webhook Creation Interface
Configuring Webhooks in Guardex
Once you have created your Discord webhooks, you need to add them to your Guardex configuration:
Open your config.lua file
Locate the Webhooks section
Add your webhook URLs
Config.Webhooks = { Enabled = true, -- Set to true to enable webhooks PlayerConnect = { Enabled = true, URL = "YOUR_DISCORD_WEBHOOK_URL_HERE" }, Bans = { Enabled = true, URL = "YOUR_DISCORD_WEBHOOK_URL_HERE" }, Detections = { Enabled = true, URL = "YOUR_DISCORD_WEBHOOK_URL_HERE" }, TriggerMonitor = { Enabled = true, URL = "YOUR_DISCORD_WEBHOOK_URL_HERE" } }Save the file and restart your server
Testing Your Webhooks
After configuring your webhooks, you can test them to ensure they're working correctly:
In-game, use the test command:
/gxtestwebhook allCheck your Discord channel
You should see test messages for each webhook type.
Webhook Types
| Type | Description |
|---|---|
| PlayerConnect | Notifies when players connect to or disconnect from the server |
| Bans | Notifies when players are banned or unbanned |
| Detections | Notifies when cheats or suspicious activity are detected |
| TriggerMonitor | Notifies when monitored events are triggered |
Webhook Rate Limits
Discord imposes rate limits on webhooks (max 30 requests per minute). If you have a high-traffic server, consider using separate webhooks for each notification type to avoid hitting these limits.