Skip to content

Discord Logging

The Discord Module provides comprehensive logging capabilities, automatically sending server events to designated Discord channels with rich, formatted messages.

The Discord Module can log various server events to different Discord channels, providing real-time visibility into server activities for staff members.

Channel: kick_log
Events: Player kicks from Discord and in-game

Channel: ban_log
Events: Player bans from Discord and in-game

Channel: unban_log
Events: Player unbans from Discord and in-game

Channel: mute_log
Events: Player mutes from Discord and in-game

Channel: unmute_log
Events: Player unmutes from Discord and in-game

Channel: warn_log
Events: Player warnings from Discord and in-game

modules/discord/channels.yml
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"
  1. Enable Developer Mode in Discord
  2. Right-click on the channel
  3. Select “Copy ID”
  4. Paste the ID into your configuration
modules/discord/channels.yml
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

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
ActionColorDescription
Kick🟡 YellowWarning-level action
Ban🔴 RedSevere punishment
Unban🟢 GreenPositive action
Mute🟠 OrangeTemporary restriction
Unmute🟢 GreenPositive action
Warn🟡 YellowWarning-level action
{
"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"
}
{
"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"
}

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

The embed appearance can be customized in the configuration:

modules/discord/channels.yml
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

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

Check server console for error messages when logging issues occur. Look for Discord-related errors or connection problems.

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
  • Separate channels for different log types
  • Use descriptive channel names
  • Set appropriate permissions
  • Pin important messages
  • Monitor log channels for important events
  • Set up role mentions for specific staff
  • Use Discord notifications for critical events
  • Monitor log channel activity
  • Check for missing logs
  • Verify embed formatting
  • 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!