Token导航 LogoToken导航TokenDH.com
开发需要联网clawhub未标认证来源可访问clear审计提醒

discord-purge-botDiscord purge 机器人

Agent Skill

用于处理 Discord 服务器、频道、消息、成员和机器人交互。它适合让 Agent 辅助查询社区对话、整理频道内容、发布通知或管理基础协作流程。使用时需要确认 bot 权限、频道可见范围和服务器规则;涉及删除消息、管理成员、批量通知或读取私密频道时,应先获得明确授权并控制操作范围。

总安装

13,744

周安装

567

GitHub Stars

公开资料未说明

下载量

4,491
OpenClaw

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

MIT-0

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:discord-purge-bot(Discord purge 机器人)
来源仓库:https://github.com/ginhoor/discord-purge-bot
安装命令:
openclaw skills install discord-purge-bot
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 OpenClaw 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

ClawHubOpenClaw
openclaw skills install discord-purge-bot

简介

使用官方 API 清理 Discord 频道中的历史消息和指定消息。

  • 适用于清除过时内容、维护频道整洁或合规性清理需求。
  • 通过机器人令牌执行批量删除,支持按时间或数量筛选。
  • 必须拥有对应频道的管理员权限方可操作。discord-purge-bot 属于开发类 Skill,可作为该场景下的辅助能力补充。
  • 建议限制单次操作规模,防止触发速率限制或服务异常。

SKILL.md

name
discord-purge-bot
description
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.

Discord Purge Bot

Run controlled cleanup in Discord guild channels with safety gates and audit-friendly outputs.

Safety Contract

  • Use only a bot token (DISCORD_BOT_TOKEN or --token).
  • Refuse user-account token flows and self-bot behavior.
  • Run purge-preview.mjs first for every destructive request.
  • Require explicit confirmation code before running deletion.
  • Abort if channel is not a guild channel.
  • Keep logs and JSON summaries for each run.

Workflow

  1. Collect scope: channel-id, optional author-id, contains, regex, after, before.
  2. Read references/discord-limits.md before deletion runs.
  3. Run preview to estimate impact and get confirm code.
  4. Run deletion with confirm code.
  5. Share summary: scanned, matched, deleted, failed, old-vs-recent split.

Commands

Preview

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

Run Purge

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

Dry Run

node scripts/purge-runner.mjs --channel-id 123456789012345678 --confirm "PURGE-XXXXXXXX" --dry-run

Clone or Nuke Channel

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

Script Roles

  • 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.

Operator Rules

  • Keep max-scan bounded for broad channels.
  • Use --state-file on long jobs.
  • Prefer content/user/time filters over whole-channel wipes.
  • Use nuke mode only when preserving channel history is unnecessary.
  • Treat pinned messages as protected unless --include-pinned is set.

Troubleshooting

  • 401/403: verify bot token and channel permissions.
  • Empty preview with expected history: check READ_MESSAGE_HISTORY.
  • Heavy 429: reduce parallelism and keep retry handling enabled.
  • bulk-delete failures: expect messages older than 14 days, runner falls back to single deletes.
  • Cannot reach Discord behind a proxy: export HTTP_PROXY/HTTPS_PROXY (uppercase recommended) and run with NODE_USE_ENV_PROXY=1, or use a recent Node that supports setGlobalProxyFromEnv().
  • If your proxy tool exposes both HTTP and SOCKS ports, point HTTP_PROXY/HTTPS_PROXY at the HTTP port; ALL_PROXY=socks5://... alone is not enough for this skill.

Proxy Example

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

适合场景

01

OpenClaw 用户查找和安装 Skill 时

02

用户想查找某类 Agent Skill 时

03

需要根据任务场景推荐可安装能力包时

04

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

补充不同宿主或平台的使用分布数据

能力 5

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

OpenClaw

77.1%
按下载量换算3,463

安全审计

VirusTotal

通过

ClawScan

可疑

Static analysis

未展示

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在 warning/failed 结果,不能写成本站确认安全。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills