purging & cleanup.

removing messages precisely instead of nuking a channel.

search first, delete second

every purge command requires manage messages. havoc reads a bounded slice of channel history, applies the chosen filter, and deletes matches. the default search is 100 messages for filtered variants and the maximum is 2,000. a search limit is how many messages havoc examines, not a promise that it will delete that many.

,purge 25
,purge @member 200
,purge links 500
,purge contains "spoiler text"
/purge bots search: 100

the plain command treats a number as a count of recent messages. a member followed by an optional search limit removes only that member’s matching messages. clear is the registered alias for purge; the named filters keep their purge paths.

dangerpurges are destructive

filters act on live history and have no undo. quote multi-word text, start with a small search window, and verify the channel before running a link-based range command. havoc reports deleted, failed, and scanned counts afterward.

the complete purge family

every purge variant
commandwhat it doesneeds
/purge [count | member search]delete a recent count, or messages from one member within an optional search windowmanage messages
/purge bots [search=100]delete messages authored by bots—
/purge humans [search=100]delete messages authored by non-bot accounts—
/purge contains <substring>delete messages whose content contains the exact substring—
/purge startswith <substring>delete messages whose content begins with the substring—
/purge endswith <substring>delete messages whose content ends with the substring—
/purge links [search=100]delete messages containing an http, https, or discord.gg link—
/purge images [search=100]delete image attachments and image or gif-style embeds—
/purge files [search=100]delete messages with any attachment—
/purge embeds [search=100]delete messages containing an embed—
/purge emoji [search=100]delete messages containing unicode emoji—
/purge emotes [search=100]delete messages containing custom discord emotes—
/purge stickers [search=100]delete messages containing stickers—
/purge mentions <member> [search]delete messages that mention one member—
/purge reactions [search=100]delete whole messages that currently have reactions—
/purge webhooks [search=100]delete messages sent by webhooks—
/purge activity [search=100]delete activity or non-default system-style messages—
/purge before <message link>search up to 2,000 messages before the linked message—
/purge after <message link>search up to 2,000 messages after the linked message—
/purge between <start id> <finish id>delete messages strictly between two message ids in the current channel—
/purge upto <message link>delete through the linked message by making it the inclusive lower boundary—

emoji and emotes are separate because unicode symbols and custom discord markup are different data. images is narrower than files, while embeds can also match rich previews that are not uploaded files.

choosing a precise filter

use member cleanup when one account caused the problem; it avoids removing the surrounding conversation. content filters are case-sensitive exact substring checks, so copy the relevant text exactly. startswith is useful for repeated command output, while endswith can target a repeated footer. all three text variants use the standard 100-message search window.

,purge @spammer 300
,purge startswith "limited offer"
,purge endswith "click here"
,purge mentions @moderator 500
notesearch and delete counts differ

,purge links 500 examines at most 500 messages and deletes only matches. if the confirmation says 500 scanned but the unwanted post is older, run another carefully bounded pass rather than assuming the filter failed.

cleaning around known messages

range commands are safer than a broad count when staff can identify a boundary. before, after, and upto accept a discord message link and can operate in the channel named by that link. havoc verifies that the moderator and bot have view channel, read message history, and manage messages there.

  1. 01

    copy the boundary

    use discord’s copy message link for before, after, or upto. between instead takes two numeric message ids from the current channel.

  2. 02

    check direction

    before removes older history; after removes newer history; upto includes the linked message and newer history.

  3. 03

    check the result

    read the scanned and failed counts. range searches stop at 2,000 messages.

,purge before https://discord.com/channels/123/456/789
,purge after https://discord.com/channels/123/456/789
,purge between 111111111111111111 222222222222222222
,purge upto https://discord.com/channels/123/456/789

discord’s fourteen-day boundary

discord’s bulk-delete endpoint does not accept messages older than fourteen days. havoc accounts for this: recent matches are deleted in batches of up to 100, while older matches are flushed and deleted one at a time. old cleanup is therefore slower and can produce individual failures, but it is not silently skipped.

warninglarge old purges take longer

do not repeat the command immediately because progress looks slow. discord requests can fail if a message disappears or permissions change during the run. wait for havoc’s final confirmation, then use its failed count to decide whether another pass is needed.

what logging records

a purge creates a havoc case and discord emits a bulk message-delete event. if message_delete is routed, the log records the bulk deletion count and channel. it does not duplicate every deleted message’s body into the log. member-targeted and mention purges also create a victim-targeted case with the channel and deleted count.

configure the destination before cleanup begins; logging is not retroactive. the logging guide explains routes, ignores, and a private message-log layout.

the short recovery window

havoc caches recent non-bot deleted messages, edits, and removed reactions per channel for one hour. the commands show the newest entry by default; pass an index to inspect an older cached entry. the viewer needs access to view the channel and read its message history.

snipe commands
commandwhat it doesneeds
/snipe [index]show a recent deleted-message cache entrychannel access
/editsnipe [index]show the before and after text of a recent editchannel access
/reactionsnipe [index]show a recent removed reactionchannel access
/clearsnipeclear all snipe caches for the current channelmanage messages
,snipe
,snipe 2
,editsnipe
,reactionsnipe 3
warninga cache is not a backup

entries expire after one hour, cached bulk deletions cover only messages discord supplied to the bot, and attachments are not restored. clearsnipe removes the current channel’s cached entries immediately.