discord-purge-bot
Operate 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 user/keyword/time window, run dry-run previews, execute guarded bulk deletion jobs, or recreate a channel for fast wipe. Do not use for self-bot cleanup or personal DM history wipe.
Why use this skill?
Safely automate Discord message cleanup with the Discord Purge Bot. Features safety-gated deletion, keyword filtering, and audit logging.
Install via CLI (Recommended)
clawhub install openclaw/skills/skills/ginhoor/discord-purge-botWhat This Skill Does
The discord-purge-bot is a robust, safety-conscious utility designed for OpenClaw AI agents to perform administrative cleanup tasks within Discord guild channels. It leverages the official Discord HTTP API to manage message history, allowing users to remove content based on specific filters such as message age, author identity, keyword matching, or regex patterns. By integrating audit-friendly JSON summaries and a mandatory two-step verification workflow, this skill ensures that destructive operations are executed with maximum transparency and minimal risk of accidental data loss.
Installation
To integrate this utility into your OpenClaw environment, execute the following command in your terminal:
clawhub install openclaw/skills/skills/ginhoor/discord-purge-bot
Ensure that you have provided a valid DISCORD_BOT_TOKEN to your agent configuration, as this skill strictly prohibits the use of user-account tokens or self-bot behavior to comply with Discord's Terms of Service.
Use Cases
This skill is ideal for community managers and server moderators who need to maintain channel hygiene. Common use cases include:
- Removing spam or bot-generated clutter from support channels.
- Scrubbing specific offensive or sensitive content using keyword or regex matching.
- Performing bulk maintenance on inactive channels to improve database performance.
- Nuking high-traffic feedback channels that have become obsolete, allowing for a fresh start by recreating the channel architecture.
Example Prompts
- "Hey OpenClaw, please scan channel 123456789 and show me a preview of how many messages from user 987654321 were posted after January 1st, 2026."
- "Run a purge in the #support-logs channel to remove all messages containing the word 'error' from the last month. Please provide a preview and confirmation code first."
- "I need to reset the #feedback-dump channel. Perform a nuke operation and create a new channel with the same permissions."
Tips & Limitations
To ensure operational safety, always utilize the preview script before attempting deletion. The tool includes a safety gate that requires an explicit confirmation code to prevent irreversible mistakes. Be aware of Discord's native limitations: messages older than 14 days cannot be deleted via the bulk-delete endpoint and will be handled by the runner using individual deletion requests, which takes more time. Always keep max-scan parameters bounded for large channels to prevent performance bottlenecks. Do not use this tool for personal DM history or unauthorized user-account activity, as it is strictly designed for guild-based moderation.
Metadata
Not sure this is the right skill?
Describe what you want to build — we'll match you to the best skill from 16,000+ options.
Find the right skillPaste this into your clawhub.json to enable this plugin.
{
"plugins": {
"official-ginhoor-discord-purge-bot": {
"enabled": true,
"auto_update": true
}
}
}Tags(AI)
Flags: network-access, file-write, file-read, external-api, code-execution