Install
openclaw skills install discord-purge-botOperate a Discord message cleanup workflow with an official bot token and Discord HTTP API. Use when asked to purge guild channel history, delete messages by...
openclaw skills install discord-purge-botRun controlled cleanup in Discord guild channels with safety gates and audit-friendly outputs.
DISCORD_BOT_TOKEN or --token).purge-preview.mjs first for every destructive request.channel-id, optional author-id, contains, regex, after, before.references/discord-limits.md before deletion runs.node scripts/purge-preview.mjs \
--channel-id 123456789012345678 \
--author-id 987654321098765432 \
--contains "error" \
--after "2026-03-01T00:00:00Z" \
--max-scan 5000 \
--out ./tmp/purge-preview.json
node scripts/purge-runner.mjs \
--channel-id 123456789012345678 \
--author-id 987654321098765432 \
--contains "error" \
--after "2026-03-01T00:00:00Z" \
--confirm "PURGE-XXXXXXXX" \
--state-file ./tmp/purge-state.json \
--out ./tmp/purge-result.json
node scripts/purge-runner.mjs --channel-id 123456789012345678 --confirm "PURGE-XXXXXXXX" --dry-run
node scripts/purge-nuke.mjs --channel-id 123456789012345678 --confirm "NUKE-XXXXXXXX" --out ./tmp/nuke.json
node scripts/purge-nuke.mjs --channel-id 123456789012345678 --confirm "NUKE-XXXXXXXX" --delete-old --out ./tmp/nuke.json
scripts/purge-preview.mjs: scan channel messages, apply filters, return counts and confirm code.scripts/purge-runner.mjs: execute deletion with 2-week split (bulk-delete + single delete fallback).scripts/purge-nuke.mjs: create replacement channel; optionally delete original channel.scripts/scan-filter.mjs: reusable scan and filtering logic.scripts/discord-api.mjs: Discord API wrapper with rate-limit retries.scripts/job-code.mjs: deterministic confirm code helpers.max-scan bounded for broad channels.--state-file on long jobs.--include-pinned is set.READ_MESSAGE_HISTORY.bulk-delete failures: expect messages older than 14 days, runner falls back to single deletes.HTTP_PROXY/HTTPS_PROXY (uppercase recommended) and run with NODE_USE_ENV_PROXY=1, or use a recent Node that supports setGlobalProxyFromEnv().HTTP_PROXY/HTTPS_PROXY at the HTTP port; ALL_PROXY=socks5://... alone is not enough for this skill.export HTTP_PROXY=http://127.0.0.1:7890
export HTTPS_PROXY=http://127.0.0.1:7890
export NODE_USE_ENV_PROXY=1
node scripts/purge-preview.mjs --channel-id 123456789012345678 --max-scan 200