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
- A detection triggers, or a staff member bans, kicks or unbans someone.
- If Console is on, a line is printed in the server console.
- If Panel logs is on, detections and bans are sent to the panel's Detections tab.
- If Discord webhooks is on, a message is queued for the matching Discord channel. The channel depends on the punishment:
bangoes to Bans,kickto Kicks,warnto Warns andlogto the detection's log channel, usually Detections. - 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
| Channel | What is posted there |
|---|---|
| Default | Fallback for every channel you leave empty. |
| Bans | Every new ban: automatic bans from detections, manual bans and bans from your scripts. |
| Kicks | Automatic kicks from detections. |
| Warns | Detections with the warn punishment (the player sees a warning and stays). |
| Detections | Detections with the log punishment that have no channel of their own, and flags from the FlagPlayer export. |
| Explosions | Explosion detections with the log punishment. |
| Entities | Entity blacklist and entity spam detections with the log punishment. |
| Connections | Blocked player names, banned players trying to join, duplicate accounts, VPN blocks, global ban and account trust results, and join rules from the Rule Engine. |
| DevTools | NUI devtools detections with the log punishment. |
| Chat | Chat filter detections with the log punishment. |
| Admin | Staff actions: manual bans from commands, unbans, manual kicks, in-game panel actions, Event Guard inject and removal, and server health warnings. |
| Screenshots | Screenshots 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
- Open your license and go to Webhooks & keys.
- Paste each URL into its channel under Discord webhooks. The help text next to each channel says what it receives.
- 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 insv_config.lua. Channels you left empty in the panel keep theirsv_config.luavalue. Then empty channels fall back to Default.UsePanelSecrets = false: the panel's webhooks and keys are ignored and onlysv_config.luais 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.
| Field | Key in sv_config.lua | What it does |
|---|---|---|
| Ban log mention | SvConfig.BanMention | Text added to the Bans channel message of automatic bans from detections, for example <@&ROLE_ID> or @here. Up to 64 characters. |
| Steam Web API key | SvConfig.SteamApiKey | Shows 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 key | SvConfig.Fivemanage.ApiKey | Used when screenshots are stored on Fivemanage. See Storing Screenshots on Fivemanage. |
| VPN provider and VPN API key | SvConfig.Vpn | Used by the VPN check in Join Screening. |
Log Settings
Change these in the panel under Configuration → Logs.
| Option | Key | Default | What it does |
|---|---|---|---|
| Discord webhooks | Logs.Discord | true | Sends logs to Discord. |
| Panel logs | Logs.Panel | true | Sends detections to the Detections tab. |
| Console | Logs.Console | true | Prints detections in the server console. |
| Bot name | Logs.BotName | CXA Anticheat | Name of the webhook messages in Discord. |
| Avatar URL | Logs.AvatarUrl | built-in image | Picture of the webhook messages. |
| Show IPs | Logs.ShowIp | false | Adds the player's IP address to Discord logs. Privacy sensitive. |
| Show hardware tokens | Logs.ShowTokens | false | Adds the player's first three hardware tokens to Discord logs. |
| Steam profile | Logs.UseSteamProfile | true | Shows the Steam name and avatar. Needs a Steam Web API key. |
| Webhook interval | Logs.QueueInterval | 1200 ms | Pause between two Discord messages (250 to 10000). |
| Max queue size | Logs.MaxQueueSize | 200 | Messages waiting for Discord. When full, the oldest are dropped. [PERF] |
| Detection cooldown | Logs.DetectionCooldown | 10 s | Repeated 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.
| Color | Key | Default | Used for |
|---|---|---|---|
| Ban | Logs.Colors.Ban | 15158332 (red) | Bans and banned join attempts |
| Kick | Logs.Colors.Kick | 15105570 (orange) | Kicks, warnings, blocked connections, server health warnings |
| Log | Logs.Colors.Log | 3447003 (blue) | Log-only detections |
| Info | Logs.Colors.Info | 6749952 (green) | Screenshots |
| Admin | Logs.Colors.Admin | 10181046 (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:
[CXA] John (ID: 12) -> Blacklisted weapon [ban] weapon: WEAPON_RAILGUNKeeping 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.luaor into public support channels. - Setting a very low Webhook interval. Discord then rejects messages and logs arrive late.
- Using
nonewhile you are still testing a detection. You won't see anything it catches.
Related Features
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
- The punishment of a detection decides which channel gets the log.
- See 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.luaand in the panel, checkUsePanelSecretsand 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
logdetections, or switch detections you don't need tonone. - Split the logs over more channels.
- Keep Webhook interval at the default
1200ms.
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