π¦ ClawHub
delete discord message in bulk
by @ghjbku
Use when user requests deleting multiple Discord messages or channel cleanup. Triggers on phrases like: - "delete [X] messages" - "purge [X] messages" - "cle...
π‘ Examples
1. Configure Bot Token
Create token.json in the workspace directory:
{
"token": "tokenhere"
}
OR set environment variable:
$env:DISCORD_TOKEN = "YOUR_BOT_TOKEN_HERE"
2. ask for confirmation
- run python scripts/discord-purge-tool.py purge to call dry-run mode
- ask from the user if they really want to delete x amount of messages in the current channel
3. Run the Tool
From this skill's directory:
# Delete last 5 messages
python scripts/discord-purge-tool.py --delete --channel-id
OR
python scripts/discord-purge-tool.py -d --channel-id Delete custom count
python scripts/discord-purge-tool.py purge 25 --delete --channel-id
OR
python scripts/discord-purge-tool.py purge 25 -d --channel-id Larger purge (handles batches automatically)
python scripts/discord-purge-tool.py purge 200 --delete --channel-id
OR
python scripts/discord-purge-tool.py purge 200 -d --channel-id
βοΈ Configuration
token.json
{
"token": "YOUR_BOT_TOKEN_HERE"
}
Or environment variable:
$env:DISCORD_TOKEN = "YOUR_BOT_TOKEN_HERE"
π Tips & Best Practices
scripts/discord-purge-tool.pyTERMINAL
clawhub install discord-bulk-message-delete