← 返回
沟通协作 Key 中文

Discord Digest

Generate formatted digests from Discord servers using a user token. Reads messages from selected channels/threads and creates concise summaries with links. U...
利用用户令牌从Discord服务器生成格式化摘要。读取选定频道或主题的消息,并生成附带链接的简明总结。
nikolaybohdanov
沟通协作 clawhub v1.1.0 1 版本 99908.6 Key: 需要
★ 0
Stars
📥 1,093
下载
💾 22
安装
1
版本
#latest

概述

Discord Digest

Generate formatted digests from Discord servers. Reads channels via user token (no bot required).

Setup

1. Set Discord User Token

Get token from browser: Discord (web) → F12 → Network → any API request → Headers → Authorization value.

python3 scripts/config_manager.py set-token "YOUR_TOKEN"

2. Scan & Select Servers

List all servers the user belongs to:

python3 scripts/discord_api.py "TOKEN" guilds

3. Scan & Select Channels

List channels for a specific server:

python3 scripts/discord_api.py "TOKEN" channels SERVER_ID

4. Add Server to Config

python3 scripts/config_manager.py add-server '{"id":"SERVER_ID","name":"Server Name","channels":[{"id":"CH_ID","name":"channel-name","type":"text"}]}'

Usage

Generate Digest

python3 scripts/run_digest.py [--hours 24] [--server SERVER_ID]

Validate Token

python3 scripts/discord_api.py "TOKEN" validate

Token Expiry Handling

Before each digest run, the token is validated via GET /users/@me. If it returns 401:

  1. Notify user: "⚠️ Discord token expired, send new token"
  2. Wait for new token
  3. Update config: python3 scripts/config_manager.py set-token "NEW_TOKEN"
  4. Retry digest

Output Format

**#SERVER_NAME DD.MM.YY**

[→post](message_url) | 📝 channel-name
**Post Title**
Details: Brief 1-sentence summary of the post content
Links: [source 1](url) | [source 2](url)

Config File

Located at ~/.openclaw/workspace/config/discord-digest.json:

{
  "discord_token": "...",
  "servers": [
    {
      "id": "829331298878750771",
      "name": "DOUBLETOP SQUAD",
      "channels": [
        {"id": "1238663837515911198", "name": "drops-alerts", "type": "text"}
      ]
    }
  ],
  "digest_period_hours": 24
}

Scripts

ScriptPurpose
-----------------
discord_api.pyDiscord HTTP API client (user token auth)
digest_formatter.pyFormat messages into digest
config_manager.pyManage token, servers, channels config
run_digest.pyMain entry: validate → read → format

Rate Limits

Discord API rate limits: ~1 req/sec with automatic retry on 429. The scripts include built-in rate limit handling with exponential backoff.

Important Notes

  • User tokens may violate Discord ToS — use at your own risk for personal use only
  • Token can expire; the skill includes validation and notification flow
  • No external dependencies — uses only Python 3 stdlib (urllib, json)

版本历史

共 1 个版本

  • v1.1.0 当前
    2026-03-29 07:56 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

communication-collaboration

imap-smtp-email

gzlicanyi
使用IMAP/SMTP读取和发送邮件;检查新/未读邮件、获取内容、搜索邮箱、标记已读/未读、发送带附件的邮件。支持...
★ 114 📥 52,436
communication-collaboration

Himalaya

lamelas
{"answer":"通过IMAP/SMTP管理邮件的CLI。可在终端使用 `himalaya` 收发、回复、转发、搜索及整理邮件。支持多账户与MML(MIME元语言)编写邮件。"}
★ 68 📥 45,592
communication-collaboration

Slack

steipete
当需要通过 slack 工具从 Clawdbot 控制 Slack 时使用,包括在频道或私信中回复消息或置顶/取消置顶项目。
★ 157 📥 47,685