Skip to main content

Tool to mass delete your Discord messages and reactions with filters and retention controls.

Project description

Delete Me Discord

PyPI Latest Release Pepy Total Downloads GitHub License

Delete Me Discord is a command-line tool to delete your own Discord messages (and reactions) with filters and retention controls.

⚠️ Using automated tools on Discord may violate Discord’s Terms of Service. Use at your own risk.

TL;DR

  • Deletes your messages/reactions in bulk.
  • Filters by time/count and include/exclude (channels, categories/parents*, guilds).
  • Dry-run + discovery helpers (--list-guilds, --list-channels) to target safely.
  • GitHub Actions example: see the workflow.

*Discord’s API uses parent_id for categories; we use “category” and “parent” interchangeably.

Installation

Install options:

  • pipx (recommended for CLI isolation): pipx install delete-me-discord
  • pip: pip install delete-me-discord
  • Prebuilt binaries: download the asset for your OS from the latest release, extract, and run from a terminal.

Usage

Quick Start

  • Export your token first (See this guide to obtain your token):
    export DISCORD_TOKEN=<your_token>

  • Find IDs first (safe):
    delete-me-discord --list-guilds and delete-me-discord --list-channels

  • Full channel wipe (preview first):
    delete-me-discord --include-ids <channel_id> --delete-reactions --preserve-n 0 --preserve-last "seconds=0" --dry-run
    Drop --dry-run to execute.

Rolling retention (keep recent, expire older)

  • Initial purge (once): run without --fetch-max-age to process the whole history and establish your preserve settings.
  • Daily/recurring: fetch only the recent slice to speed things up.
  • Time-only (no cache needed):
    • Initial/full: delete-me-discord --preserve-n 0 --preserve-last "weeks=2" --dry-run
    • Daily: delete-me-discord --preserve-n 0 --preserve-last "weeks=2" --fetch-max-age "weeks=2,days=1" --dry-run
      Drop --dry-run to keep the last 2 weeks; everything older is deletable.
  • Time and/or count (cache recommended):
    • Initial/full: delete-me-discord --preserve-last "weeks=2" --preserve-n 20 --preserve-cache --dry-run
    • Daily: delete-me-discord --preserve-last "weeks=2" --preserve-n 20 --fetch-max-age "weeks=2,days=1" --preserve-cache --dry-run
      Drop --dry-run to keep the last 2 weeks and last 20 messages; cache avoids “forgotten” preserves when using fetch-max-age.
  • Daily guidance: set --fetch-max-age to your preserve window + 1 day (e.g., --preserve-last "weeks=2" + --fetch-max-age "weeks=2,days=1"), so you only fetch the recent slice while keeping your preservation buffer. With --preserve-cache + --preserve-n, you can also use a smaller window (e.g., --fetch-max-age 1d) because at least the last 2 weeks of preserved messages from the previous run are cached; if you skip days, widen fetch-max-age to cover the gap.

Command-Line Options

  • -g, --list-guilds: List guild IDs/names, then exit.
  • -c, --list-channels: List channels (grouped by guild/category/parent + DMs), then exit.
  • -d, --dry-run: Simulate deletions; no changes made.
  • -R, --delete-reactions: Remove your reactions on messages encountered once the deletion window is reached (older than the cutoff and past the preserve-n threshold).
  • -i, --include-ids: Channel/guild/parent IDs to include. If omitted, all IDs are eligible except those in --exclude-ids. Channel/category (parent) includes punch through higher-level excludes (category/guild). Example: --include-ids 123 456
  • -x, --exclude-ids: Channel/guild/parent IDs to exclude. Example: --exclude-ids 789
  • -p, --preserve-last: Keep messages/reactions newer than this delta (default weeks=2, e.g., weeks=1,days=3 or 1w3d).
  • -n, --preserve-n: Always keep the last N messages (default 12).
  • --preserve-n-mode: How to count the last N messages to keep: mine (only your deletable messages; default) or all (the last N messages in the channel, any author).
  • --preserve-cache: Enable cache to refetch preserved messages between runs (useful with --preserve-n + --fetch-max-age).
  • --wipe-preserve-cache: Delete the preserve cache file and exit.
  • --preserve-cache-path: Override preserve cache path (default ~/.config/delete-me-discord/preserve_cache.json).
  • -a, --fetch-max-age: Only fetch newer than this delta (e.g., weeks=1,days=3 or 10d). Default: no max age.
  • -m, --max-messages: Max messages to fetch per channel (default: no limit).
  • -r, --max-retries: Retry count for API requests (default 5).
  • -b, --retry-time-buffer: Extra wait after rate limits (default 25 35 seconds; one number = fixed, two = random range).
  • -f, --fetch-sleep-time: Sleep between fetch requests (default 0.2 0.4 seconds; one number = fixed, two = random range).
  • -s, --delete-sleep-time: Sleep between deletions (default 1.5 2 seconds; one number = fixed, two = random range).
  • -l, --log-level: DEBUG|INFO|WARNING|ERROR|CRITICAL (default INFO).
  • -v, --version: Show the version number and exit.

Time delta formats

  • Legacy key/value: weeks=2,days=3,hours=1 (units must be unique; no negatives).
  • Compact suffix: 2w3d4h5m6s (units: w/d/h/m/s; unique; no negatives).
  • A plain 0 or 0.0 is treated as zero duration.

Preserve cache (what is stored)

  • When enabled, the cache records the IDs of deletable messages preserved in a run by preserve-n or preserve-last. If --delete-reactions is set, IDs of preserved messages that contain your reactions are also recorded.
  • On subsequent runs, cached IDs are refetched and merged into the stream so preserved items remain visible even if they fall outside fetch-max-age (which can happen when --preserve-n is enabled).

Contributing

Contributions are welcome. Open an issue or pull request with improvements or bug fixes.

License

This project is licensed under the MIT License. You are free to use, modify, and distribute this software as per the terms of the license.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

delete_me_discord-1.5.3.tar.gz (25.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

delete_me_discord-1.5.3-py3-none-any.whl (28.4 kB view details)

Uploaded Python 3

File details

Details for the file delete_me_discord-1.5.3.tar.gz.

File metadata

  • Download URL: delete_me_discord-1.5.3.tar.gz
  • Upload date:
  • Size: 25.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.8

File hashes

Hashes for delete_me_discord-1.5.3.tar.gz
Algorithm Hash digest
SHA256 99e2bd02468ed346d5dbe3a32f3a3f25647bc82a85b9ba6643a7d9f99b6cb7c9
MD5 63fdb2352bf40edbbf72f589a05bfe47
BLAKE2b-256 6e62a550f561b64baa9f51c10b6eee05ccaae603835a07f09af70013e2ce4d00

See more details on using hashes here.

File details

Details for the file delete_me_discord-1.5.3-py3-none-any.whl.

File metadata

File hashes

Hashes for delete_me_discord-1.5.3-py3-none-any.whl
Algorithm Hash digest
SHA256 1bcf2ed77d40a6f15aa3a30662b74e3b8dcdddea0206543bdaf13e12dfed227e
MD5 62230e49e434a44455b45194793bd374
BLAKE2b-256 b291a8d69579315c1f72c91feda59d1c392f2dcae7e7b3a40b7788e9bd7fd455

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page