Bulk delete your Discord messages via search API. Rate limit handling and cursor pagination included.
- Open Discord Canary in browser
- Press F12 → Network tab
- Reload page or click on any channel
- Find a request to
@meorprofile? - Look at Request Headers → copy
Authorizationtoken - Go to Application tab → Cookies →
https://canary.discord.com - Copy:
__dcfduid,__sdcfduid,__stripe_mid,cf_clearance
python -m pip install -r requirements.txt
cp .env.example .env
# Edit .env with your credentials
python main.py| Variable | Required | Description |
|---|---|---|
DISCORD_TOKEN |
Yes | Your Discord token |
DISCORD_USER_ID |
Yes | Your Discord user ID (enable Dev Mode → right-click profile) |
COOKIE_DCFduid |
Yes | Cookie from DevTools |
COOKIE_SDCFduid |
Yes | Cookie from DevTools |
COOKIE_STRIPE_MID |
No | Cookie from DevTools |
COOKIE_CF_CLEARANCE |
No | Cookie from DevTools (Cloudflare) |
Excluded_channels |
No | Array of channel/DM IDs to keep, e.g., ['123456789'] |
LOG_LEVEL |
No | DEBUG, INFO, WARNING, ERROR, CRITICAL (default: INFO) |
- Uses Discord canary search API; respects rate limits with retries.
- Filter by author so only your messages are deleted.
- Tokens and cookies stored in
.env(already in .gitignore). - Run with
LOG_LEVEL=DEBUGto see full API responses.