Discord Logging
Discord Logging
Section titled “Discord Logging”The Discord Module provides comprehensive logging capabilities, automatically sending server events to designated Discord channels with rich, formatted messages.
📊 Logging Overview
Section titled “📊 Logging Overview”The Discord Module can log various server events to different Discord channels, providing real-time visibility into server activities for staff members.
📢 Log Channel Types
Section titled “📢 Log Channel Types”Kick Logs
Section titled “Kick Logs”Channel: kick_log
Events: Player kicks from Discord and in-game
Ban Logs
Section titled “Ban Logs”Channel: ban_log
Events: Player bans from Discord and in-game
Unban Logs
Section titled “Unban Logs”Channel: unban_log
Events: Player unbans from Discord and in-game
Mute Logs
Section titled “Mute Logs”Channel: mute_log
Events: Player mutes from Discord and in-game
Unmute Logs
Section titled “Unmute Logs”Channel: unmute_log
Events: Player unmutes from Discord and in-game
Warn Logs
Section titled “Warn Logs”Channel: warn_log
Events: Player warnings from Discord and in-game
⚙️ Logging Configuration
Section titled “⚙️ Logging Configuration”Basic Channel Setup
Section titled “Basic Channel Setup”enabled: true
channels: kick_log: "CHANNEL_ID" ban_log: "CHANNEL_ID" unban_log: "CHANNEL_ID" mute_log: "CHANNEL_ID" unmute_log: "CHANNEL_ID" warn_log: "CHANNEL_ID"Getting Channel IDs
Section titled “Getting Channel IDs”- Enable Developer Mode in Discord
- Right-click on the channel
- Select “Copy ID”
- Paste the ID into your configuration
Embed Configuration
Section titled “Embed Configuration”embed: # Show Discord-specific information in embeds show_discord_info: true
# Show staff avatar in footer for Discord commands show_discord_staff_avatar: true
# Show target player avatar as thumbnail show_target_avatar: true🎨 Log Message Format
Section titled “🎨 Log Message Format”Rich Embeds
Section titled “Rich Embeds”All log messages use Discord’s rich embed format with:
- Color coding based on action type
- Player avatars as thumbnails
- Staff information in footer
- Timestamps for when actions occurred
- Case IDs for tracking
Color Scheme
Section titled “Color Scheme”| Action | Color | Description |
|---|---|---|
| Kick | 🟡 Yellow | Warning-level action |
| Ban | 🔴 Red | Severe punishment |
| Unban | 🟢 Green | Positive action |
| Mute | 🟠 Orange | Temporary restriction |
| Unmute | 🟢 Green | Positive action |
| Warn | 🟡 Yellow | Warning-level action |
📋 Log Message Examples
Section titled “📋 Log Message Examples”Kick Log Example
Section titled “Kick Log Example”{ "title": "Player Kicked", "color": 16776960, "thumbnail": { "url": "https://crafatar.com/avatars/player-uuid" }, "fields": [ { "name": "Player", "value": "Player123", "inline": true }, { "name": "Staff", "value": "AdminUser", "inline": true }, { "name": "Reason", "value": "Spam in chat", "inline": false }, { "name": "Case ID", "value": "KICK-12345", "inline": true } ], "footer": { "text": "Zenith-Mod Discord Bot", "icon_url": "https://example.com/bot-avatar.png" }, "timestamp": "2025-01-14T10:30:00.000Z"}Ban Log Example
Section titled “Ban Log Example”{ "title": "Player Banned", "color": 16711680, "thumbnail": { "url": "https://crafatar.com/avatars/player-uuid" }, "fields": [ { "name": "Player", "value": "Player123", "inline": true }, { "name": "Staff", "value": "AdminUser", "inline": true }, { "name": "Duration", "value": "7 days", "inline": true }, { "name": "Reason", "value": "Cheating detected", "inline": false }, { "name": "Case ID", "value": "BAN-12345", "inline": true } ], "footer": { "text": "Zenith-Mod Discord Bot", "icon_url": "https://example.com/bot-avatar.png" }, "timestamp": "2025-01-14T10:30:00.000Z"}🔧 Logging Features
Section titled “🔧 Logging Features”Rich Embed Format
Section titled “Rich Embed Format”All log messages use Discord’s rich embed format with:
- Color coding based on action type
- Player avatars as thumbnails
- Staff information in footer
- Timestamps for when actions occurred
- Case IDs for tracking
Embed Customization
Section titled “Embed Customization”The embed appearance can be customized in the configuration:
embed: # Show Discord-specific information in embeds show_discord_info: true
# Show staff avatar in footer for Discord commands show_discord_staff_avatar: true
# Show target player avatar as thumbnail show_target_avatar: true🛠️ Logging Troubleshooting
Section titled “🛠️ Logging Troubleshooting”Common Issues
Section titled “Common Issues”Issue: Logs not appearing
- Check if channel IDs are correct
- Verify bot has permission to send messages
- Check if logging is enabled
Issue: Missing information in logs
- Check embed configuration
- Verify player data is available
- Check staff information
Issue: Logs appearing in wrong channel
- Verify channel ID configuration
- Check channel permissions
- Restart bot after configuration changes
Debug Logging
Section titled “Debug Logging”Check server console for error messages when logging issues occur. Look for Discord-related errors or connection problems.
Log Verification
Section titled “Log Verification”Check if logs are working by:
- Performing a test action (kick, ban, etc.)
- Checking if log appears in the configured channel
- Verifying embed formatting is correct
📈 Logging Best Practices
Section titled “📈 Logging Best Practices”Channel Organization
Section titled “Channel Organization”- Separate channels for different log types
- Use descriptive channel names
- Set appropriate permissions
- Pin important messages
Staff Coordination
Section titled “Staff Coordination”- Monitor log channels for important events
- Set up role mentions for specific staff
- Use Discord notifications for critical events
Log Management
Section titled “Log Management”- Monitor log channel activity
- Check for missing logs
- Verify embed formatting
🔒 Log Security
Section titled “🔒 Log Security”Sensitive Information
Section titled “Sensitive Information”- Avoid logging sensitive player data
- Use case IDs instead of detailed information
- Limit log access to trusted staff
Next Steps: Learn about Discord Troubleshooting to resolve any issues!