Message Logger

Message Logger tracks edited and deleted messages, preserves attachments for evidence, and includes purge-incident forensics for suspicious mass deletions.

What It Does

  • Logs message edits with before/after content
  • Logs message deletions and attempts moderator attribution from audit logs
  • Preserves deleted/edited attachments (up to Discord upload limit)
  • Supports excluded channels
  • Optional diff highlighting for edit logs
  • Tracks raw delete events for purge-incident detection
  • Provides incident review and forensic retrieval commands

Setup

Core settings are managed via config, not via /messagelog subcommands.

/config cog MessageLogger

Minimum setup:

  1. Set at least one of Edit Log Channel or Delete Log Channel.
  2. Enable Message Logger.
  3. Give the bot channel permissions, especially Send Messages and Manage Webhooks in log channels.

Key Config Options

Setting Purpose
Message Logger Enabled Master on/off switch
Edit Log Channel Channel for edit logs
Delete Log Channel Channel for delete logs
Excluded Channels Channels ignored by logger
Highlight Edited Differences Show edit diffs with markdown emphasis
Old Delete Detection Enables raw delete capture for purge detection
Message Purge Incident Alert Channel Where incident alerts are posted
Message Purge Incident Alert Ping Role Optional role ping for incident alerts
Message Logger Manager Roles Roles allowed to use manager data commands

Additional incident sensitivity and retention settings are also available in config.

Commands

All commands are under /messagelog.

Command Description Access
/messagelog help Show status and command overview Server members who can run app commands
/messagelog incidents [status] [limit] List purge incidents and confidence Administrator
/messagelog stored-message <message_id> Retrieve stored forensic snapshot Administrator
/messagelog info Show data counts and current logger config MessageLogger manager role or Administrator
/messagelog purge-messages Purge stored forensic messages (this server) MessageLogger manager role or Administrator
/messagelog purge-events Purge raw delete events (this server) MessageLogger manager role or Administrator
/messagelog purge-all Purge incidents, stored messages, and raw events (this server) Administrator only

Important Notes

  • Older setup commands such as /messagelog set_channel and /messagelog enabled are not currently active in this cog.
  • Configure channels, enable state, exclusions, and highlighting through /config cog MessageLogger.
  • If a log destination becomes invalid, the cog can disable that destination and notify command logs.

Troubleshooting

Not logging messages

  • Confirm Message Logger Enabled is true.
  • Verify at least one log channel is configured.
  • Check that the channel is not in Excluded Channels.
  • Confirm bot permissions in destination channels.

Incident alerts not appearing

  • Enable Old Delete Detection.
  • Configure Message Purge Incident Alert Channel (or ensure delete log channel exists for fallback).
  • Check threshold/window config values are not set too high.

Missing attachment mirror

  • Large files may exceed limits.
  • Attachments can expire if fetched too late.