Webhook 推广调度器:带防垃圾机制的 Discord 自动化 - Openclaw Skills
作者:互联网
2026-04-17
什么是 Webhook 推广调度器?
Webhook 推广调度器是一个轻量级工具,旨在通过 Webhook 促进 Discord 上的更新和推广内容广播。作为 Openclaw Skills 生态系统的一部分,它仅使用 Python 标准库,专注于可靠性和安全性。其核心价值在于通过严格的防垃圾账本防止频道垃圾信息,强制执行每个频道每天最多成功发布一次的规则。
该技能对于希望将自动化通知集成到工作流中,且不泄露 Webhook 密钥或骚扰受众的开发者特别有用。通过维护本地审计追踪,该工具确保每条发布都被记录,从而在多个 Discord 频道中实现透明且受控的沟通策略。
下载入口:https://github.com/openclaw/skills/tree/main/skills/marcia-assistant/webhook-promo-scheduler
安装与下载
1. ClawHub CLI
从源直接安装技能的最快方式。
npx clawhub@latest install webhook-promo-scheduler
2. 手动安装
将技能文件夹复制到以下位置之一
全局模式~/.openclaw/skills/
工作区
/skills/
优先级:工作区 > 本地 > 内置
3. 提示词安装
将此提示词复制到 OpenClaw 即可自动安装。
请帮我使用 Clawhub 安装 webhook-promo-scheduler。如果尚未安装 Clawhub,请先安装(npm i -g clawhub)。
Webhook 推广调度器 应用场景
- 自动化向社区 Discord 服务器发送每日项目状态更新。
- 轮换营销消息列表,保持公告频道的新鲜度。
- 利用内置的预览模式(dry-run)安全地测试 Webhook 集成逻辑。
- 针对自动化警报执行严格的每日一次发布频率。
- 用户发起发布或轮换命令,提供 Discord Webhook URL 和消息内容。
- 系统查询本地 JSONL 账本,检查特定频道今天是否已收到发布。
- 如果频道符合条件,脚本将验证消息内容或选择轮换序列中的下一条消息。
- 向 Discord API 发送带有消息负载的 POST 请求。
- 成功后,操作将记录在账本中,包含时间戳和频道 ID,以阻止随后 24 小时内的重复尝试。
Webhook 推广调度器 配置指南
此技能需要 Python 3.x 并利用标准库,这意味着不需要外部依赖。开始使用时,请进入技能目录并使用以下命令结构:
# 单次发布示例
python3 scripts/promo_scheduler.py post r
--webhook-url r
--channel announcement-updates r
--message "新更新已发布!"
要使用轮换功能,请创建一个 messages.txt 文件并运行:
# 轮换消息列表
python3 scripts/promo_scheduler.py rotate r
--webhook-url r
--channel dev-chat r
--messages-file messages.txt
Webhook 推广调度器 数据架构与分类体系
该技能通过 JSONL 账本管理其状态。默认情况下存储在 ~/.openclaw/webhook-promo-ledger.jsonl。账本中的每个条目遵循以下架构:
| 键 | 类型 | 描述 |
|---|---|---|
| date | 字符串 | 尝试的 ISO 8601 格式日期 |
| channel | 字符串 | 目标的用户定义标识符 |
| status | 字符串 | 请求结果(例如:success) |
| hash | 字符串 | 消息内容的唯一哈希值,用于追踪 |
name: webhook-promo-scheduler
description: Schedule and send promo/alert messages to a Discord webhook URL with an anti-spam ledger.
webhook-promo-scheduler
Schedule and send promo/alert messages to a Discord webhook URL with an anti-spam ledger.
What it does
- Posts to a Discord webhook (JSON payload with
content) - Maintains a JSONL ledger to enforce max 1 successful post per day per channel
- Provides a rotation mode that cycles through a message list
- Supports
--dry-runso you can validate cadence/ledger without sending anything
Positioning (best angle)
- Ship updates without becoming a spammer (or leaking a webhook): strict cadence + audit trail.
Files
scripts/post_webhook.py: Discord webhook POST helper (stdlib only)scripts/ledger.py: JSONL ledger helpers (stdlib only)scripts/promo_scheduler.py: CLI tool (stdlib only)
Ledger
- Default:
~/.openclaw/webhook-promo-ledger.jsonl - Override:
--ledger-path /path/to/ledger.jsonl - JSONL fields (per line):
date,channel,status,hash
Safety
- The CLI refuses to print the webhook URL.
- Logs redact any webhook URL if it would appear.
- Recommended: keep the webhook in a private channel, rotate it if leaked, and use
--dry-runbefore enabling live sends.
FAQ (security)
Q: This exposes a Discord webhook — is that dangerous? A: Treat it like a password. This tool won’t print it, supports secret injection, and has --dry-run + a ledger so you can validate behavior before turning on live posting. If you want zero direct exposure, put a relay (Cloudflare Worker / Supabase Edge Function) in front and keep the real webhook private.
Usage
One-shot post:
python3 {baseDir}/scripts/promo_scheduler.py post r
--webhook-url r
--channel openclaw-discord r
--message "Hello from OpenClaw!"
Draft rotation:
python3 {baseDir}/scripts/promo_scheduler.py rotate r
--webhook-url r
--channel openclaw-discord r
--messages-file messages.txt
messages.txt format:
- One message per non-empty line
- Lines starting with
#are ignored
相关推荐
专题
+ 收藏
+ 收藏
+ 收藏
+ 收藏
+ 收藏
+ 收藏
最新数据
相关文章
Amazon ASIN 查询:提取产品数据 - Openclaw Skills
播客创作器:自动化 AI 音频生成 - Openclaw 技能
OpenClaw 扩展包:AI 智能体企业级基础设施 - Openclaw 技能
Gmail 管理助手:自动化邮件工作流与分类 - Openclaw Skills
note-writer:Note.com 自动内容创作 - Openclaw Skills
tmux-terminal: 交互式 TUI 控制与工作流自动化 - Openclaw Skills
创建帽子集合:多智能体工作流生成器 - Openclaw Skills
TikTok 剪辑器:自动生成爆款短视频 - Openclaw Skills
ClawHub 发布:创建并部署 Openclaw 技能 - Openclaw Skills
DuckDuckGo 搜索:为 AI 提供即时网络访问 - Openclaw Skills
AI精选
