kclient is a CLI for deleting your own Discord messages from a DM, a single channel, or every text channel in a server. It supports stored accounts, checkpointed runs, proxy rotation, rate-limit visibility, and plain command-line workflows without a web UI or .env file.
- CLI-only workflow
- Stored account add and remove commands
- One-off runs with
--token - Server-wide discovery with checkpointing
- Timeframe filtering with values like
30m,24h, and7d - Delete by message type with
--type(message,links,media,files,videos) - Proxy rotation with
proxy.txt --debugand multi-level--verboselogging for troubleshooting and operational transparency- Local logs for each run
- Event-driven watchdogs for delayed deletion of your own messages or uploads
If you are new to command-line tools, copy one command exactly and replace only the obvious placeholders like TOKEN_HERE, SERVER_ID, or CHANNEL_ID.
Store an account first:
kclient --add-account --token TOKEN_HEREIf you do not know how to get your token:
- Go to Discord on the web
- Press
Ctrl+Shift+I - Open
Application - Open
Local Storage - Filter for
token - Copy the value
If you do not know how to get a user ID or server ID:
- Open Discord
- Click the gear icon for
User Settings - Open
Advanced - Turn on
Developer Mode - Right-click the user you want for a DM and click
Copy User ID - Right-click the server icon and click
Copy Server ID
Then delete the last 24 hours from a server:
kclient --account myuser --delete --server SERVER_ID --tf 24hRun once without storing the token:
kclient --token TOKEN_HERE --delete --channel CHANNEL_ID --tf 24hDelete only uploaded media from a server channel within a timeframe:
kclient --account myuser --delete --server SERVER_ID --tf 72h --type mediaDelete only messages containing links:
kclient --account myuser --delete --channel CHANNEL_ID --tf 24h --type linksIncrease output detail, and enable debug logs when needed:
kclient --account myuser --delete --channel CHANNEL_ID --tf 24h --verbose --verbose
kclient --account myuser --delete --channel CHANNEL_ID --tf 24h --debug- Windows is the primary verified platform in this workspace.
- Linux and macOS code paths are present for data directories and uninstall scripts.
- Only the Windows Rust target was installed in this environment, so Linux and macOS were reviewed for cfg correctness but not cross-compiled here.
cargo build --release --bin kclientThe release binary is written to target/release/kclient.exe on Windows and target/release/kclient on Linux and macOS.
--somethingis a long option. Example:--token TOKEN_HERE-hand-Vare short options- Most options take a value after them. Example:
--server 123456789012345678 - Flags without values are switches. Example:
--delete,--all,--reload --verbosecan be repeated (-v -v) for progressively more output.- Do not type angle brackets. Replace placeholders directly. Use
TOKEN_HERE,SERVER_ID, andCHANNEL_IDas examples only.
If Discord does not show copy-ID options yet, enable Developer Mode first:
- Open Discord
- Click the gear icon for
User Settings - Open
Advanced - Turn on
Developer Mode
Then copy the ID you need:
- For a DM target, right-click the user and click
Copy User ID - For a server target, right-click the server icon and click
Copy Server ID - For a channel target, right-click the channel and click
Copy Channel ID
Store an account:
kclient --add-account --token TOKEN_HERERemove an account:
kclient --remove-account --account myuserRun once without storing the token:
kclient --token TOKEN_HERE --delete --channel 123456789012345678 --tf 24hDelete the last 24 hours from one channel:
kclient --account myuser --delete --channel 680459914828972076 --tf 24hDelete everything from one DM:
kclient --account myuser --delete --dm 123456789012345678 --allDelete everything you authored across a server:
kclient --account myuser --delete --server 123456789012345678 --allStart fresh and ignore old checkpoints:
kclient --account myuser --delete --server 123456789012345678 --tf 24h --reloadUse proxies from proxy.txt:
kclient --account myuser --delete --server 123456789012345678 --all --dproxyFilter deletions by message type while cleaning multiple channels:
kclient --account myuser --delete --server SERVER_ID --all --type filesWatchdogs run in the background and receive new-message events over one shared Gateway connection per stored account. They do not poll channel history while idle: the worker sleeps until Discord sends an event, a heartbeat is due, a configuration check is due, or the next deletion deadline is reached.
Save a global media watchdog. This deletes your own uploads one hour after sending, except when the message text includes .:
kclient --set-watchdog --save-watchdog media-expiry \
--account myuser --type media --tf 1h --off-flag "." --default on
kclient --start-watchdog media-expirySave a word-list watchdog scoped to one server:
kclient --set-watchdog --save-watchdog cleanup-words \
--account myuser --server SERVER_ID --type message --tf 5m \
--off-flag "dnd" --word-list examples/watchdog-wordlist.txt --default on
kclient --start-watchdog cleanup-wordsStop a watchdog and discard its queued, not-yet-deleted messages:
kclient --stop-watchdog cleanup-wordsScopes are optional. Without --server, --channel, or --dm, a watchdog is global for the selected account. A server scope covers messages in that server; a channel scope covers just that channel; and a DM scope resolves and stores the DM channel for the selected user.
Watchdog --type supports media and message in current configuration paths. Use media to target uploads/attachments and message for content-based matching (including word-list mode).
--default on deletes matching messages unless --off-flag is present. --default off reverses marker semantics: matching messages are deleted only when the marker is present. For --type message, a word-list match is always required in either default mode. Matching is case-insensitive literal substring matching. --word-list may be repeated and supports .txt, .json, .toml, .yaml, and .yml; structured formats accept either a string array or { "words": ["..."] }.
Media means a message with at least one uploaded attachment. Before deleting a due message, KCLIENT retrieves it again and re-evaluates its marker and filter, so adding an opt-out marker before expiry prevents deletion.
proxy.txt expects one proxy per line:
ip:port:username:password
Empty lines and lines starting with # are ignored.
Application data is stored under the kcordclient app directory.
- Windows:
%APPDATA%\kcordclient - Linux:
$XDG_DATA_HOME/kcordclientor~/.local/share/kcordclient - macOS:
~/Library/Application Support/kcordclient
Run logs are written to the logs subdirectory inside that app directory.
--tfand--allare mutually exclusive.--server,--channel, and--dmare mutually exclusive.- If you do not pass
--token,kclientuses a stored account. - If multiple accounts are stored, pass
--account. --reloadclears saved checkpoints before starting a run.- If you are unsure, start with
kclient --add-account --token TOKEN_HERE - Then use
kclient --account myuser --delete --server SERVER_ID --tf 24h
Windows:
./scripts/uninstall.ps1Linux or macOS:
./scripts/uninstall.sh