πŸ“–logs

Configure Discord webhook logging in editable/logs.lua.


Configuration

Enable/Disable Logging

LogsConfig = {}

LogsConfig.Enabled = true  -- Master toggle for all logs

Screenshot Webhook

Separate webhook for screenshot uploads:

LogsConfig.ScreenshotWebhook = 'https://discord.com/api/webhooks/...'

Command Webhooks

Configure individual command logging:

editable/logs.lua
LogsConfig.Commands = {
    -- Ban System
    ban = { 
        enabled = true, 
        webhook = 'https://discord.com/api/webhooks/...', 
        color = 0xFF0000,  -- Red
        title = 'Player Banned' 
    },
    unban = { 
        enabled = true, 
        webhook = '', 
        color = 0x00FF00,  -- Green
        title = 'Player Unbanned' 
    },
    bans = { 
        enabled = true, 
        webhook = '', 
        color = 0x7289DA,  -- Discord Blue
        title = 'Ban List' 
    },
    
    -- Warning System
    warn = { enabled = true, webhook = '', color = 0xFFFF00, title = 'Player Warned' },
    unwarn = { enabled = true, webhook = '', color = 0x00FF00, title = 'Warning Removed' },
    clearwarns = { enabled = true, webhook = '', color = 0x00FF00, title = 'Warnings Cleared' },
    warnings = { enabled = true, webhook = '', color = 0xFFFF00, title = 'Warnings List' },
    
    -- Player Management
    kick = { enabled = true, webhook = '', color = 0xFFA500, title = 'Player Kicked' },
    players = { enabled = true, webhook = '', color = 0x7289DA, title = 'Player List' },
    player = { enabled = true, webhook = '', color = 0x3498DB, title = 'Player Info' },
    
    -- Health & Status
    heal = { enabled = true, webhook = '', color = 0x2ECC71, title = 'Player Healed' },
    revive = { enabled = true, webhook = '', color = 0x2ECC71, title = 'Player Revived' },
    freeze = { enabled = true, webhook = '', color = 0x3498DB, title = 'Player Frozen' },
    unfreeze = { enabled = true, webhook = '', color = 0x3498DB, title = 'Player Unfrozen' },
    crashplayer = { enabled = true, webhook = '', color = 0xFF0000, title = 'Player Crashed' },
    
    -- Economy
    givemoney = { enabled = true, webhook = '', color = 0xFFD700, title = 'Money Given' },
    giveitem = { enabled = true, webhook = '', color = 0x9B59B6, title = 'Item Given' },
    givecar = { enabled = true, webhook = '', color = 0xE67E22, title = 'Vehicle Spawned' },
    
    -- Jobs & Permissions
    setjob = { enabled = true, webhook = '', color = 0x3498DB, title = 'Job Changed' },
    setgroup = { enabled = true, webhook = '', color = 0xE74C3C, title = 'Group Changed' },
    
    -- Teleport
    bring = { enabled = true, webhook = '', color = 0x9B59B6, title = 'Player Brought' },
    teleport = { enabled = true, webhook = '', color = 0x9B59B6, title = 'Player Teleported' },
    
    -- Utilities
    announce = { enabled = true, webhook = '', color = 0xFFD700, title = 'Announcement' },
    blackout = { enabled = true, webhook = '', color = 0x2C3E50, title = 'Blackout Toggled' },
    ss = { enabled = true, webhook = '', color = 0x3498DB, title = 'Screenshot Requested' },
    ping = { enabled = true, webhook = '', color = 0x7289DA, title = 'Ping' },
    serverinfo = { enabled = true, webhook = '', color = 0x7289DA, title = 'Server Info' },
    
    -- Server Control
    restartserver = { enabled = true, webhook = '', color = 0xFF0000, title = 'Server Restart' },
    stopserver = { enabled = true, webhook = '', color = 0xFF0000, title = 'Server Stop' },
    kickall = { enabled = true, webhook = '', color = 0xFFA500, title = 'All Players Kicked' },
    txannounce = { enabled = true, webhook = '', color = 0xFFD700, title = 'txAdmin Announcement' },
}

Color Reference

Color
Hex
Decimal
Usage

πŸ”΄ Red

#FF0000

0xFF0000

Bans, crashes, server stop

🟒 Green

#00FF00

0x00FF00

Unbans, positive actions

🟑 Yellow

#FFFF00

0xFFFF00

Warnings

🟠 Orange

#FFA500

0xFFA500

Kicks

πŸ”΅ Blue

#3498DB

0x3498DB

Info, freeze

🟣 Purple

#9B59B6

0x9B59B6

Teleport, items

🟀 Gold

#FFD700

0xFFD700

Money, announcements

⚫ Discord

#7289DA

0x7289DA

Lists, general


Log Format

Each log includes:

Field
Description

Command

Command used (e.g., !ban)

Admin

Discord user who executed

Time

Timestamp (YYYY-MM-DD HH:MM:SS)

Result

Command result/details


Example Log Embed


Webhook Tips

circle-info

Use separate webhooks and channels to keep logs organized, and disable specific logs you don't need.

Separate Webhooks

Use different webhooks for different log types:

Disable Specific Logs


Using SendLog in Custom Commands

Use the SendLog function in your custom commands:

Don't forget to add the command to LogsConfig.Commands: