How to log edited and deleted Discord messages
Give moderators a place to review message changes without filling a public chat with logs. This guide configures the Logging module for message edits and single-message deletions, then checks each event with a harmless test message.
Start freeStart free. Pro is $9.99/month.
Before you start
- Use an existing Build Discord Bots bot that is invited to your server and online. You need access to its module settings.
- Prepare a text channel for logs. Restrict member access as appropriate, while allowing the bot to view the channel, send messages and embed links. Use the English dashboard labels for these steps.
Open the Logging module
Open your bot from the dashboard and choose Modules. Find Logging and turn its toggle on if needed. Wait for any restart caused by enabling the module to finish.
If the setup wizard appears, choose Skip for now. Click the Logging card's gear button titled Settings to open Module Settings, headed Configure Logging. Choose your server in the Server selector.
Choose the Audit Log Channel
Select your moderation log channel in Audit Log Channel. The option None (logging output disabled until selected) does not provide a destination, even if event switches are enabled.
If the channel list cannot load, paste the channel ID into the field. Check the channel permissions in Discord: a private channel must still be accessible to the bot.
Enable the two message events
For a new configuration, use Disable all under Quick Presets to begin with no events selected. If you are editing an existing configuration, keep any other events your moderators still need instead of resetting them.
In Messages, turn on Message Edits and Message Deletions. Bulk Deletions is a separate event; it is not needed for this single-message test. To identify moderator deletions where Discord can record them, turn on Show who deleted messages and grant the bot the server-wide View Audit Log permission. To log bans, unbans, confirmed kicks, timeouts, member role and nickname changes, and channel creation or deletion with the moderator, turn on Moderator actions; its channel starts as the Audit Log Channel and it also needs View Audit Log. When Discord has no matching audit entry, the log says Moderator unknown. Review the enabled-event count before saving.
Save the server configuration
Confirm the Server selector still points to the intended server, then click Save Settings. Wait for Saved ✓. If the dashboard reports that live sync failed, use Restart on the bot page and wait for it to be online before testing.
Reopen Settings if you need to check the saved Audit Log Channel or event switches. Settings are saved for the selected server, so repeat the configuration separately for another server.
Check an edit and a deletion in Discord
While the bot is online, send a harmless message from a human account in a channel the bot can see. Edit its text, then check the Audit Log Channel for a message-edit entry. Delete that single message and check for a deletion entry. A moderator deletion may identify that moderator; Discord does not audit self-deletes, so a self-delete correctly says the deleter is the author or unknown. If you turned on Moderator actions, its entries name the moderator only when Discord records a recent matching audit entry, and a member leave is called a kick only when Discord records a matching kick.
If entries are missing, check the destination permissions, the Server selection and both event switches. Also check that the Discord application's Message Content intent is enabled if message text is missing. Test with a fresh message after correcting the configuration.
Frequently asked questions
Why are switches enabled but no logs appear?
Select an Audit Log Channel as well as event types, save for the correct Server, and make sure the bot is online and can send embeds in that channel. Test with a new message from a human account.
Does Message Deletions include a bulk purge?
Bulk Deletions is a separate switch in Messages. This guide tests a single-message deletion; configure the bulk event separately if you need it.
Will logs always contain the original message text?
No. The module uses a limited in-memory cache. If the content was not available or cached, including after a restart, the original text may be missing. Logging is not a complete message backup.
Why does the deleter say author or unknown?
Discord records moderator message deletions in its audit log, but does not record self-deletes. The module only names a deleter when it finds a recent matching audit entry for the channel and message author; it never guesses. Check that Show who deleted messages is on and the bot has View Audit Log.
