Token导航 LogoToken导航TokenDH.com
研究检索敏感数据clawhub未标认证来源可访问clear审计提醒

discord-openapi-skillDiscord OpenAPI 技能

Agent Skill

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

总安装

16,965

周安装

693

GitHub Stars

公开资料未说明

下载量

5,489
OpenClaw

安装说明

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

GitHub

来源数

2

许可证

MIT-0

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

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

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

命令行安装

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

ClawHubOpenClaw
openclaw skills install discord-openapi-skill

简介

通过 Discord OpenAPI 操作服务器、频道、消息和机器人交互。

  • 适合查询社区对话、整理频道内容或发布通知等协作场景。
  • 使用机器人令牌调用 API,支持消息管理与服务器基础操作。
  • 需确认 bot 权限与频道可见范围,避免越权访问私密内容。
  • 涉及删除或批量操作时,应获得明确授权并控制影响范围。

SKILL.md

name
discord-openapi-skill
description
Operate Discord HTTP API through UXC with Discord OpenAPI schema. Bot token recommended for full API access including messages and server management. OAuth2 user authentication available for limited profile operations only.

Discord API Skill

Use this skill to run Discord REST operations through uxc + OpenAPI.

Reuse the uxc skill for shared execution, auth, and error-handling guidance.

Prerequisites

  • uxc is installed and available in PATH.
  • Network access to https://discord.com/api/v10.
  • Access to Discord OpenAPI spec URL:

- https://raw.githubusercontent.com/discord/discord-api-spec/main/specs/openapi.json

  • Discord bot token (recommended) or OAuth2 user authentication (limited functionality).

Authentication

Option 1: Bot Token (Recommended)

Bot token provides full access to Discord API including reading messages, managing servers, sending messages, and all administrative operations. This is the recommended method for most use cases.

  1. Create a bot application at https://discord.com/developers/applications
  2. Generate a bot token from the Bot section
  3. Configure bot credential:
uxc auth credential set discord-bot \
  --auth-type api_key \
  --header "Authorization=Bot {{secret}}" \
  --secret "YOUR_BOT_TOKEN_HERE"
  1. Bind credential to Discord API endpoint:
uxc auth binding add \
  --id discord-bot \
  --host discord.com \
  --path-prefix /api/v10 \
  --scheme https \
  --credential discord-bot \
  --priority 100

Option 2: OAuth2 User Authentication (Limited Use Cases)

Important: User OAuth2 has significant limitations and is not recommended for most operations:

  • ❌ Cannot read channel messages via HTTP API (local RPC only)
  • ❌ Cannot send messages or manage servers
  • ✅ Can read user profile, email, connections
  • ✅ Can list user's servers

Only use OAuth2 if you specifically need to access user profile information as the user. For all other operations, use Bot Token.

If you still need OAuth2 for user profile operations:

Configuration:

  • Client ID: 1479302369723285736
  • Redirect URI: http://127.0.0.1:11111/callback

OAuth2 Scopes:

Discord user OAuth2 supports read-only operations. It cannot send messages or manage servers as a user (use Bot Token for those operations).

Recommended Scopes (Full Functionality):

--scope "identify email connections guilds guilds.members.read messages.read openid"

Minimal Read-Only Scopes:

--scope "identify email connections guilds guilds.members.read"

Scope Reference:

ScopeDescriptionWrite Operation
identifyBasic user info (username, avatar, etc.)❌ Read
emailUser's email address❌ Read
connectionsLinked third-party accounts (Twitch, YouTube, etc.)❌ Read
guildsUser's server list❌ Read
guilds.joinJoin user to servers (requires the same application's bot to already be in that guild)Write
guilds.members.readUser's member info in servers❌ Read
messages.readRead messages (local RPC only, not HTTP API)❌ Read
openidOpenID Connect support❌ Read

Note: User OAuth2 cannot send messages or manage servers as the user. Use Bot Token for write operations. guilds.join is a special user OAuth write capability that depends on the same application's bot already being in the target guild, so it is not part of the default read-only flow. See Discord OAuth2 documentation for complete scope list.

Two-Stage OAuth Flow (Agent-Friendly):

  1. Start OAuth flow with desired scopes:
uxc auth oauth start discord-user \
  --endpoint https://discord.com/api/oauth2/token \
  --client-id 1479302369723285736 \
  --redirect-uri http://127.0.0.1:11111/callback \
  --scope "identify email connections guilds guilds.members.read messages.read openid"
  1. Open the displayed authorization URL in browser, complete authorization, then copy the callback URL from browser address bar.
  1. Complete OAuth flow:
uxc auth oauth complete discord-user \
  --session-id <session_id_from_step_1> \
  --authorization-response "<callback_url_from_browser>"
  1. Bind credential:
uxc auth binding add \
  --id discord-user \
  --host discord.com \
  --path-prefix /api/v10 \
  --scheme https \
  --credential discord-user \
  --priority 100

Interactive Alternative (Local Terminal Only):

uxc auth oauth login discord-user \
  --endpoint https://discord.com/api/oauth2/token \
  --flow authorization_code \
  --client-id 1479302369723285736 \
  --redirect-uri http://127.0.0.1:11111/callback \
  --scope "identify email connections guilds guilds.members.read messages.read openid"

Then paste the callback URL when prompted.

Core Workflow

  1. Use fixed link command by default:

- command -v discord-openapi-cli - If missing, create it: uxc link discord-openapi-cli https://discord.com/api/v10 --schema-url https://raw.githubusercontent.com/discord/discord-api-spec/main/specs/openapi.json - discord-openapi-cli -h

  1. Discover operations with schema mapping:

- discord-openapi-cli -h

  1. Inspect operation schema first:

- discord-openapi-cli get:/users/@me -h - discord-openapi-cli post:/channels/{channel_id}/messages -h

  1. Execute operation:

- connectivity check (no auth): discord-openapi-cli get:/gateway - key/value: discord-openapi-cli get:/guilds/{guild_id}/channels guild_id=GUILD_ID - positional JSON: discord-openapi-cli post:/channels/{channel_id}/messages '{"channel_id":"CHANNEL_ID","content":"Hello from uxc"}' - binding check when auth looks wrong: uxc auth binding match https://discord.com/api/v10

Authentication Methods Comparison

FeatureBot TokenUser OAuth2
Read channel messages✅ Full access❌ Not via HTTP API
Send messages✅ As the bot❌ Not supported
Manage channels/roles✅ Bot permissions❌ Not supported
Moderation actions✅ Bot permissions❌ Not supported
List servers✅ Servers bot is in✅ User's servers
Read user info❌ Not available✅ As the user
Message appearanceBot badge "BOT"N/A

Key Recommendation: Use Bot Token for almost all operations. User OAuth2 is only useful if you need to read user profile information as that specific user. For reading channel messages, managing servers, or sending messages, Bot Token is required.

Subscribe / Gateway Status

Discord inbound events flow through the Gateway WebSocket, not through this REST/OpenAPI surface.

Current uxc subscribe status:

  • the built-in discord-gateway transport now bootstraps through GET /gateway/bot
  • live Gateway sessions reached READY and delivered GUILD_CREATE
  • a real posted channel message produced a MESSAGE_CREATE event in the subscribe sink
  • heartbeat scheduling, IDENTIFY, sequence tracking, and reconnect handling are implemented

Recommended invocation:

uxc subscribe start https://discord.com/api/v10 \
  '{"intents":4609,"device":"uxc-discord"}' \
  --transport discord-gateway \
  --auth discord-bot \
  --sink file:$HOME/.uxc/subscriptions/discord-gateway.ndjson

Intent notes:

  • 4609 = GUILDS | GUILD_MESSAGES | DIRECT_MESSAGES
  • add 32768 (MESSAGE_CONTENT) only when the bot has that privileged intent enabled in the Discord developer portal

Use discord-openapi-cli for REST calls and uxc subscribe start ... --transport discord-gateway ... for inbound Gateway events.

Guardrails

  • OAuth2 Scope Limitation: User OAuth2 tokens cannot read channel messages via HTTP API, send messages, or manage servers. These operations require Bot Token authentication.
  • Discord OpenAPI spec is persisted in the generated link via uxc link --schema-url ...; pass --schema-url <other-url> only when you need to override it temporarily.
  • Keep automation on JSON output envelope; do not use --text.
  • Parse stable fields first: ok, kind, protocol, data, error.
  • Prefer positional JSON for non-string objects instead of --input-json.
  • discord-openapi-cli <operation> ... is equivalent to uxc https://discord.com/api/v10 --schema-url <discord_openapi_spec> <operation> ....
  • Treat post:/channels/{channel_id}/messages, delete/update endpoints, and moderation endpoints as write/high-risk operations; require explicit user confirmation before execution.

References

  • Usage patterns: references/usage-patterns.md
  • Discord API docs: https://discord.com/developers/docs
  • Discord API OpenAPI spec: https://github.com/discord/discord-api-spec

适合场景

01

OpenClaw 用户查找和安装 Skill 时

02

用户想查找某类 Agent Skill 时

03

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

04

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

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

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

能力 4

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

能力 5

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

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

平台分布

OpenClaw

82.12%
按下载量换算4,508

安全审计

VirusTotal

通过

ClawScan

可疑

Static analysis

通过

权限和风险

敏感数据

该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

安装前确认

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

来源信息

继续浏览同类 Skills