Logging & Discord

CXA Anticheat writes every detection, ban and staff action to up to three places: Discord channels through webhooks, the Detections tab of the web panel and your server console. This page explains each place, how to send different logs to different Discord channels and how to keep your webhook URLs secret.

Treat Webhook URLs Like Passwords

Anyone who has a webhook URL can post messages into that Discord channel. Keep webhooks in the panel or in sv_config.lua, never in config.lua, which players can read.

How It Works

  1. A detection triggers, or a staff member bans, kicks or unbans someone.
  2. If Console is on, a line is printed in the server console.
  3. If Panel logs is on, detections and bans are sent to the panel's Detections tab.
  4. If Discord webhooks is on, a message is queued for the matching Discord channel. The channel depends on the punishment: ban goes to Bans, kick to Kicks, warn to Warns and log to the detection's log channel, usually Detections.
  5. The queue sends one Discord message every Webhook interval, so Discord's rate limit (a cap on how many messages Discord accepts per second) is not hit.

The none punishment only blocks the action. It is not logged anywhere.

The Detections Tab

Open your license in the panel and go to Detections. It shows what the anticheat found on your server.

  • The cards at the top count the Last 24 hours, and of those the Bans, Kicks and Logged entries.
  • Search with Search player, detection or ban ID.
  • Filter by punishment: All punishments, Ban, Kick, Warn or Log.
  • The refresh button loads the newest entries.
  • The table shows Time, Player, Detection, Punishment and Ban ID. Click a row to see the Details of the detection and the player's Identifiers (license, discord, steam, fivem).
  • Load more shows the next 50 entries.

Entries are kept for 30 days. The tab is filled while Configuration → Logs → Panel logs is on and your server is running. Bans you make from the web panel, the in-game panel or the BanPlayer export also appear here.

Changes made by your team, such as saved configurations, revealed webhooks and panel actions, are listed in the Activity tab instead. See Team Access.

Discord Channels

ChannelWhat is posted there
DefaultFallback for every channel you leave empty.
BansEvery new ban: automatic bans from detections, manual bans and bans from your scripts.
KicksAutomatic kicks from detections.
WarnsDetections with the warn punishment (the player sees a warning and stays).
DetectionsDetections with the log punishment that have no channel of their own, and flags from the FlagPlayer export.
ExplosionsExplosion detections with the log punishment.
EntitiesEntity blacklist and entity spam detections with the log punishment.
ConnectionsBlocked player names, banned players trying to join, duplicate accounts, VPN blocks, global ban and account trust results, and join rules from the Rule Engine.
DevToolsNUI devtools detections with the log punishment.
ChatChat filter detections with the log punishment.
AdminStaff actions: manual bans from commands, unbans, manual kicks, in-game panel actions, Event Guard inject and removal, and server health warnings.
ScreenshotsScreenshots taken with the screenshot command, the in-game panel or the web panel.

When a channel is empty, its messages go to Default. When Default is empty as well, the message is not sent. The simplest setup is a single Default webhook. Add more channels later when one channel gets too busy.

Log Channel per Detection

The log channel is only used when a detection's punishment is log. Bans, kicks and warnings always go to Bans, Kicks and Warns.

Most detections log to Detections. A few have their own channel by default: explosions log to Explosions, the entity blacklist and entity spam to Entities, the chat filter to Chat and NUI devtools to DevTools. For NUI devtools you can pick the channel in the panel under Configuration → Client detections → NUI devtools → Log channel.

Setting Up Webhooks

Step 1 — Create the Webhooks in Discord

In your Discord server, open the settings of the channel that should receive the logs, go to Integrations → Webhooks, create a webhook and copy its URL. Repeat this for every channel you want to use.

Step 2 — Add Them in the Panel

  1. Open your license and go to Webhooks & keys.
  2. Paste each URL into its channel under Discord webhooks. The help text next to each channel says what it receives.
  3. Press Save webhooks & keys.

The panel shows Saved. Your server receives them on the next sync. and your server picks them up within a minute. URLs must be Discord webhook URLs such as https://discord.com/api/webhooks/..., otherwise the field shows Not a valid Discord webhook URL.

Saved webhooks and keys are hidden. To see one again, press the eye in its field. Revealing is recorded in Activity as Webhooks / keys were revealed. Only the owner and admins of the license can open this tab, see Team Access.

Step 3 (Optional) — Use sv_config.lua Instead

You can also put webhooks into sv_config.lua, a server-only file in the resource folder. Leave a channel empty ('') to fall back to Default.

SvConfig.Webhooks = {
    Default = 'https://discord.com/api/webhooks/123456789012345678/xxxxxxxx', -- Used for every empty channel
    Bans = '',          -- Automatic and manual bans
    Kicks = '',         -- Automatic kicks
    Warns = '',         -- Warnings shown to players
    Detections = '',    -- Log-only detections
    Explosions = '',    -- Explosion logs
    Entities = '',      -- Blacklisted / spam entity logs
    Connections = '',   -- Duplicate accounts, blocked names, VPN, banned join attempts
    DevTools = '',      -- NUI devtools detections
    Chat = '',          -- Blacklisted chat messages
    Admin = '',         -- Admin command usage (ban, unban, kick, screenshot)
    Screenshots = '',   -- Screenshots taken with the screenshot command
}

Which Value Wins

SvConfig.License.UsePanelSecrets in sv_config.lua decides how the two places work together.

  • UsePanelSecrets = true (default): every channel you filled in the panel overrides the same channel in sv_config.lua. Channels you left empty in the panel keep their sv_config.lua value. Then empty channels fall back to Default.
  • UsePanelSecrets = false: the panel's webhooks and keys are ignored and only sv_config.lua is used.

Clearing a channel in the panel does not clear it on the server if sv_config.lua still has a URL for it. Remove it from both places.

Ban Mention and API Keys

The API keys card on the Webhooks & keys tab holds the other secrets.

FieldKey in sv_config.luaWhat it does
Ban log mentionSvConfig.BanMentionText added to the Bans channel message of automatic bans from detections, for example <@&ROLE_ID> or @here. Up to 64 characters.
Steam Web API keySvConfig.SteamApiKeyShows Steam names and avatars in logs. A key saved in the panel is also used for the Steam account age in Account Trust. Steam keys are 32 characters.
Fivemanage API keySvConfig.Fivemanage.ApiKeyUsed when screenshots are stored on Fivemanage. See Storing Screenshots on Fivemanage.
VPN provider and VPN API keySvConfig.VpnUsed by the VPN check in Join Screening.

Log Settings

Change these in the panel under Configuration → Logs.

OptionKeyDefaultWhat it does
Discord webhooksLogs.DiscordtrueSends logs to Discord.
Panel logsLogs.PaneltrueSends detections to the Detections tab.
ConsoleLogs.ConsoletruePrints detections in the server console.
Bot nameLogs.BotNameCXA AnticheatName of the webhook messages in Discord.
Avatar URLLogs.AvatarUrlbuilt-in imagePicture of the webhook messages.
Show IPsLogs.ShowIpfalseAdds the player's IP address to Discord logs. Privacy sensitive.
Show hardware tokensLogs.ShowTokensfalseAdds the player's first three hardware tokens to Discord logs.
Steam profileLogs.UseSteamProfiletrueShows the Steam name and avatar. Needs a Steam Web API key.
Webhook intervalLogs.QueueInterval1200 msPause between two Discord messages (250 to 10000).
Max queue sizeLogs.MaxQueueSize200Messages waiting for Discord. When full, the oldest are dropped. [PERF]
Detection cooldownLogs.DetectionCooldown10 sRepeated log and warn detections of the same player and detection within this time are skipped.

Under Embed colors you set the colour of the left bar of each Discord message, as a decimal colour number.

ColorKeyDefaultUsed for
BanLogs.Colors.Ban15158332 (red)Bans and banned join attempts
KickLogs.Colors.Kick15105570 (orange)Kicks, warnings, blocked connections, server health warnings
LogLogs.Colors.Log3447003 (blue)Log-only detections
InfoLogs.Colors.Info6749952 (green)Screenshots
AdminLogs.Colors.Admin10181046 (purple)Staff actions

What a Discord Log Contains

A player log shows the player's name and server ID, their character name when your framework provides one, the detection, the punishment, the ban ID and end date for bans, and the details of the detection. The Identifiers field lists license, license2, discord (as a mention), steam (with a link to the profile), fivem, xbl and live. The IP and hardware tokens are only added when you turn them on. Detections with Screenshot on attach the screenshot to the message.

Console Lines

Each detection prints one line with the player, the detection, the punishment and the details:

Output
[CXA] John (ID: 12) -> Blacklisted weapon [ban] weapon: WEAPON_RAILGUN

Keeping Webhooks Secret

  • Store webhooks in the panel or in sv_config.lua. Both stay on the server and are never sent to players.
  • Give the Webhooks & keys tab only to people who need it. Only owners and admins can open it, and every reveal is recorded in Activity.
  • Never share screenshots of the Webhooks & keys tab with a revealed field, or of sv_config.lua.
  • If a webhook URL leaks, delete the webhook in Discord, create a new one and save the new URL.

Recommendations

Recommended:

  • Start with one Default webhook, then split Bans, Connections and Admin into their own channels.
  • Keep the Admin channel visible to your management only. It shows every staff action.
  • Keep Show IPs off unless your staff really needs IPs in Discord.
  • Add a Steam Web API key so your logs show Steam names and avatars.

Avoid:

  • Pasting webhooks into config.lua or into public support channels.
  • Setting a very low Webhook interval. Discord then rejects messages and logs arrive late.
  • Using none while you are still testing a detection. You won't see anything it catches.

Screenshots

  • Detections with Screenshot on attach a picture to their Discord message. Screenshot commands post to the Screenshots channel.
  • See Screenshots.

Server Health

  • Health warnings are posted to the Admin channel when Discord warnings is on.
  • See Server Health.

Team Access

  • The owner and admins can see and edit webhooks. Every reveal and change is recorded in Activity.
  • See Team Access.

Detections & Punishments

Limitations

  • Only the NUI devtools detection lets you pick its log channel in the panel. The other detections use the channels listed above.
  • During a flood of detections, Discord messages above Max queue size are dropped and the panel can skip entries. The panel accepts up to 3000 detections per license per hour.
  • Detections are kept in the panel for 30 days. Discord keeps messages as long as you keep the channel.

Common Problems

Nothing Is Posted in Discord

What you see: Detections appear in the console but not in Discord.

How to fix it:

  • Make sure Configuration → Logs → Discord webhooks is on.
  • Fill in at least the Default channel in Webhooks & keys and save.
  • If you set webhooks in sv_config.lua and in the panel, check UsePanelSecrets and which value wins.
  • Restart the server after editing sv_config.lua.

Logs Go to the Wrong Channel

What you see: For example, explosion logs appear in Default.

How to fix it:

  • The Explosions channel is empty, so the messages fall back to Default. Fill in the channel.
  • Remember that bans always go to Bans, even for explosion or chat detections.

"Not a valid Discord webhook URL."

What you see: The panel does not save a webhook.

How to fix it:

  • Copy the full URL from Discord. It starts with https://discord.com/api/webhooks/.
  • Remove spaces and text before or after the URL.

Logs Arrive Late or Some Are Missing

What you see: Discord messages come minutes after the event, or a few never arrive.

How to fix it:

  • A busy server can fill the queue. Raise Detection cooldown for noisy log detections, or switch detections you don't need to none.
  • Split the logs over more channels.
  • Keep Webhook interval at the default 1200 ms.

The Detections Tab Says "No detections yet"

What you see: The tab stays empty although the server runs.

How to fix it:

  • Turn on Configuration → Logs → Panel logs.
  • Check that the server shows as online in Overview.
  • Wait a minute. Detections are sent to the panel in batches.

Steam Names and Avatars Don't Show

What you see: Discord logs show no Steam name or avatar.

How to fix it:

  • Add a Steam Web API key in Webhooks & keys (or SvConfig.SteamApiKey).
  • Turn on Configuration → Logs → Steam profile.
  • Check that the log lists a steam: identifier for the player. Without one, there is no Steam profile to look up.

© 2026 CodeXart Studios · CXA Anticheat