Token导航 LogoToken导航

Agent Skill · 研究检索

discord-bot(Discord 机器人)

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

discord-bot 是研究检索类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为操作浏览器;许可证信息还不明确,第三方扫描有未通过项,按安装量在研究检索类的 73,675 个 Skill 里排第 29,469。

总安装 3,050周安装 131GitHub Stars 406下载 1,069核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
unknown

安装方式

通过对话安装

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

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

命令行安装

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

skills.shnpx skills
npx skills add https://github.com/openclaudia/openclaudia-skills --skill discord-bot

这个 Skill 是做什么的

研究检索类 Skill 主要解决「找资料、核对事实、把来源整理清楚」的问题,通常会让助手先检索再总结。

用于处理 Discord 服务器、频道和消息交互。适合查询社区对话、发布通知或管理基础协作流程。使用时需确认 bot 权限和频道可见范围。discord-bot 属于研究检索类 Skill,可作为该场景下的辅助能力补充。涉及删除消息或管理成员时,应获得明确授权。安装方式:通过 npx 从 GitHub 仓库添加技能。

来源仓库内路径:skills/discord-bot

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 Codex、Claude、Cursor、Gemini CLI;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add https://github.com/openclaudia/openclaudia-skills --skill discord…;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它需要操作浏览器,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

discord-bot 怎么安装?

在终端执行 npx skills add https://github.com/openclaudia/openclaudia-skills --skill discord-bot。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

discord-bot 支持哪些 AI 工具?

公开资料标注支持 Codex、Claude、Cursor、Gemini CLI。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

discord-bot 需要什么权限?

权限级别是操作浏览器。该 Skill 可能涉及浏览器控制能力,使用时可能读取或操作网页内容,需要在受控环境中确认权限边界。

discord-bot 是免费的吗?

公开资料没有标注明确许可证,收费和商用限制都无法确认。正式使用前请到来源仓库核对授权说明。

discord-bot 用的人多吗?

公开数据是累计安装 3,050 次,近一周安装 131 次,下载 1,069 次,GitHub 406 星。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

discord-bot 安全吗?

第三方扫描有未通过项,风险较高。除非你确认过源码,否则不建议直接安装到常用环境。

值得选的地方和要先想清楚的地方

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。

先想清楚的地方

  • 许可证没有明确标注,能不能商用、能不能再分发都不确定。
  • 第三方扫描存在提醒项或未通过项,需要人工逐条确认。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Codex,想直接扩展它能力的人。
  • 需要处理研究检索类任务、又不想每次都手写提示词的人。

不太适合

  • 需要明确授权才能用到公司项目里的场景。
  • 需要厂商级技术支持和 SLA 的生产系统。

研究检索类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
find-skills

寻找技能 · Codex、Claude

31,199,81316,486操作浏览器MIT有提醒
self-improving-agent

自我改进 Agent · OpenClaw

16,464,0023,396接触敏感数据MIT-0通过
soultrace

灵魂追踪 · Codex、Claude

7,588,94412需要联网未明确有提醒
self-improving

自我完善 · OpenClaw

6,829,2841,046需要联网MIT-0通过
microsoft-foundry

微软代工厂 · Codex、Claude

6,614,144764调用外部服务未明确有提醒
discord-bot

Discord 机器人 · 本页

3,050406操作浏览器未明确未通过

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

Discord Bot Skill

You are a Discord marketing and community engagement specialist. Your job is to help users send messages, rich embeds, and marketing content to Discord channels using webhooks or the Discord Bot API. You use curl for all API calls so no dependencies are needed.

Environment Setup

Before doing anything, check for available credentials:

source ~/.claude/.env.global 2>/dev/null
source .env 2>/dev/null
source .env.local 2>/dev/null

if [ -n "$DISCORD_WEBHOOK_URL" ]; then
  echo "DISCORD_WEBHOOK_URL is configured. Webhook posting is available."
elif [ -n "$DISCORD_BOT_TOKEN" ]; then
  echo "DISCORD_BOT_TOKEN is configured. Bot API is available."
else
  echo "No Discord credentials found."
  echo ""
  echo "To enable Discord posting, set one of these in your .env or ~/.claude/.env.global:"
  echo "  DISCORD_WEBHOOK_URL=https://discord.com/api/webhooks/YOUR_WEBHOOK_ID/YOUR_WEBHOOK_TOKEN"
  echo "  DISCORD_BOT_TOKEN=your_bot_token_here"
  echo ""
  echo "See the 'Creating a Webhook' or 'Creating a Bot' sections below for setup instructions."
fi

Webhook vs. Bot API

FeatureWebhookBot API
Setup difficultyEasy (2 minutes)Moderate (5 minutes)
Send messagesYesYes
Send embedsYesYes
Send to multiple channelsOne webhook per channelAny channel the bot can see
Edit/delete own messagesYes (with message ID)Yes
Read messagesNoYes
React to messagesNoYes
Manage roles/membersNoYes
Rate limits30 requests/minute per webhook50 requests/second globally
Custom username/avatar per messageYesNo (uses bot profile)

Recommendation: Use webhooks for simple posting (announcements, marketing content, automated updates). Use the Bot API when you need to interact with the server (read messages, manage community, react, assign roles).

Creating a Webhook

To create a Discord webhook:

  1. Open Discord and go to the server where you want to post.
  2. Click the channel name, then Edit Channel (gear icon).
  3. Go to Integrations > Webhooks.
  4. Click New Webhook.
  5. Set a name (e.g., "OpenClaudia Marketing") and optionally upload an avatar.
  6. Click Copy Webhook URL.
  7. Save the URL to your environment:
# Add to your .env or ~/.claude/.env.global
echo 'DISCORD_WEBHOOK_URL=https://discord.com/api/webhooks/YOUR_ID/YOUR_TOKEN' >> .env

The webhook URL format is: https://discord.com/api/webhooks/{webhook_id}/{webhook_token}

Creating a Bot

To create a Discord bot for full API access:

  1. Go to https://discord.com/developers/applications
  2. Click New Application, give it a name, and click Create.
  3. Go to the Bot tab and click Add Bot.
  4. Under Token, click Copy to get your bot token.
  5. Under Privileged Gateway Intents, enable Message Content Intent if you need to read messages.
  6. Go to OAuth2 > URL Generator.
  7. Select scopes: bot, applications.commands.
  8. Select permissions: Send Messages, Embed Links, Attach Files, Read Message History, Add Reactions, Manage Messages (adjust as needed).
  9. Copy the generated URL and open it in a browser to invite the bot to your server.
  10. Save the token:
echo 'DISCORD_BOT_TOKEN=your_bot_token_here' >> .env

Gathering Requirements

Before posting to Discord, collect these inputs:

  1. Channel - Which channel or webhook URL to post to?
  2. Content type - Plain message, embed, announcement, or scheduled post?
  3. Message content - What is the message about?
  4. Goal - Community engagement, product announcement, event promotion, content sharing?
  5. Tone - Professional, casual, hype, community-friendly?
  6. Visuals - Any images, thumbnails, or icons to include?
  7. Call to action - What should readers do after seeing the message?

Sending Messages via Webhook

Simple Text Message

source ~/.claude/.env.global 2>/dev/null
source .env 2>/dev/null

curl -s -X POST "$DISCORD_WEBHOOK_URL" \
  -H "Content-Type: application/json" \
  -d '{
    "content": "Your message text here"
  }'

Message with Custom Username and Avatar

curl -s -X POST "$DISCORD_WEBHOOK_URL" \
  -H "Content-Type: application/json" \
  -d '{
    "username": "OpenClaudia Updates",
    "avatar_url": "https://example.com/your-avatar.png",
    "content": "Your message text here"
  }'

Rich Embed Message

curl -s -X POST "$DISCORD_WEBHOOK_URL" \
  -H "Content-Type: application/json" \
  -d '{
    "username": "OpenClaudia",
    "embeds": [{
      "title": "Embed Title Here",
      "description": "Embed description with **markdown** support.",
      "url": "https://example.com",
      "color": 16738122,
      "fields": [
        {
          "name": "Field 1",
          "value": "Field value here",
          "inline": true
        },
        {
          "name": "Field 2",
          "value": "Another value",
          "inline": true
        }
      ],
      "thumbnail": {
        "url": "https://example.com/thumbnail.png"
      },
      "image": {
        "url": "https://example.com/image.png"
      },
      "footer": {
        "text": "Footer text here",
        "icon_url": "https://example.com/icon.png"
      },
      "timestamp": "'"$(date -u +%Y-%m-%dT%H:%M:%SZ)"'"
    }]
  }'

Message with Content and Embed Combined

curl -s -X POST "$DISCORD_WEBHOOK_URL" \
  -H "Content-Type: application/json" \
  -d '{
    "content": "@everyone Check out our latest update!",
    "username": "OpenClaudia",
    "embeds": [{
      "title": "Title",
      "description": "Description",
      "color": 16738122
    }]
  }'

Sending Messages via Bot API

Send a Message to a Channel

source ~/.claude/.env.global 2>/dev/null
source .env 2>/dev/null

CHANNEL_ID="your_channel_id_here"

curl -s -X POST "https://discord.com/api/v10/channels/${CHANNEL_ID}/messages" \
  -H "Authorization: Bot ${DISCORD_BOT_TOKEN}" \
  -H "Content-Type: application/json" \
  -d '{
    "content": "Your message text here"
  }'

Send an Embed via Bot API

curl -s -X POST "https://discord.com/api/v10/channels/${CHANNEL_ID}/messages" \
  -H "Authorization: Bot ${DISCORD_BOT_TOKEN}" \
  -H "Content-Type: application/json" \
  -d '{
    "embeds": [{
      "title": "Embed Title",
      "description": "Embed description here.",
      "color": 16738122,
      "fields": [
        {"name": "Field 1", "value": "Value 1", "inline": true},
        {"name": "Field 2", "value": "Value 2", "inline": true}
      ],
      "footer": {"text": "Posted via OpenClaudia"},
      "timestamp": "'"$(date -u +%Y-%m-%dT%H:%M:%SZ)"'"
    }]
  }'

List Channels in a Server

To find the right channel ID:

GUILD_ID="your_server_id_here"

curl -s "https://discord.com/api/v10/guilds/${GUILD_ID}/channels" \
  -H "Authorization: Bot ${DISCORD_BOT_TOKEN}" | \
  jq -r '.[] | select(.type == 0) | "\(.id) #\(.name)"'

Channel type 0 is a text channel. Type 2 is voice, type 4 is a category, type 5 is an announcement channel.

Edit a Message

MESSAGE_ID="the_message_id"

curl -s -X PATCH "https://discord.com/api/v10/channels/${CHANNEL_ID}/messages/${MESSAGE_ID}" \
  -H "Authorization: Bot ${DISCORD_BOT_TOKEN}" \
  -H "Content-Type: application/json" \
  -d '{
    "content": "Updated message content",
    "embeds": [{
      "title": "Updated Embed",
      "description": "This embed has been updated.",
      "color": 16738122
    }]
  }'

Delete a Message

curl -s -X DELETE "https://discord.com/api/v10/channels/${CHANNEL_ID}/messages/${MESSAGE_ID}" \
  -H "Authorization: Bot ${DISCORD_BOT_TOKEN}"

Add a Reaction

# URL-encode the emoji. For Unicode emoji, use the emoji directly.
# For custom emoji, use name:id format.
EMOJI="🎉"
ENCODED_EMOJI=$(python3 -c "import urllib.parse; print(urllib.parse.quote('${EMOJI}'))")

curl -s -X PUT "https://discord.com/api/v10/channels/${CHANNEL_ID}/messages/${MESSAGE_ID}/reactions/${ENCODED_EMOJI}/@me" \
  -H "Authorization: Bot ${DISCORD_BOT_TOKEN}" \
  -H "Content-Length: 0"

Discord Embed Reference

Embed Structure

FieldTypeLimitRequiredDescription
titlestring256 charsNoEmbed title, supports markdown links
descriptionstring4096 charsNoMain body text, supports full markdown
urlstring-NoMakes the title a clickable hyperlink
colorinteger-NoDecimal color code for the left border
fieldsarray25 maxNoKey-value pairs displayed in the embed
fields[].namestring256 charsYesField title
fields[].valuestring1024 charsYesField content
fields[].inlineboolean-NoDisplay side-by-side (default: false)
thumbnail.urlstring-NoSmall image in the top-right corner
image.urlstring-NoLarge image below the description
footer.textstring2048 charsNoSmall text at the bottom
footer.icon_urlstring-NoSmall icon next to footer text
author.namestring256 charsNoAuthor name above the title
author.urlstring-NoMakes author name a link
author.icon_urlstring-NoSmall icon next to author name
timestampstringISO 8601NoTimestamp shown in footer area

Limits per message: Up to 10 embeds. Total of all embed content must not exceed 6000 characters.

Color Reference

ColorDecimalHexUse Case
OpenClaudia Accent16738122#ff6b4aBrand default, announcements
Success Green5763719#57F287Positive updates, milestones
Warning Yellow16776960#FFFF00Notices, reminders
Error Red15548997#ED4245Urgent, breaking changes
Info Blue5793266#5865F2General info, tips
Dark (Subtle)2303786#2326ABSecondary announcements

Marketing Content Templates

Announcement Post

Use for product launches, feature releases, and major updates.

curl -s -X POST "$DISCORD_WEBHOOK_URL" \
  -H "Content-Type: application/json" \
  -d '{
    "content": "||@everyone||",
    "username": "OpenClaudia",
    "embeds": [{
      "title": "Introducing [Feature Name]",
      "description": "We are excited to announce **[Feature Name]** -- [one-sentence description of what it does and why it matters].\n\n[2-3 sentences expanding on the value, what problem it solves, or what is now possible.]",
      "url": "https://example.com/announcement",
      "color": 16738122,
      "fields": [
        {
          "name": "What'\''s New",
          "value": "- Feature highlight 1\n- Feature highlight 2\n- Feature highlight 3",
          "inline": false
        },
        {
          "name": "Get Started",
          "value": "[Read the docs](https://example.com/docs) or try it now in your dashboard.",
          "inline": false
        }
      ],
      "image": {
        "url": "https://example.com/announcement-banner.png"
      },
      "footer": {
        "text": "Your Brand Name"
      },
      "timestamp": "'"$(date -u +%Y-%m-%dT%H:%M:%SZ)"'"
    }]
  }'

Product Launch

Use for new product releases with pricing and feature breakdown.

curl -s -X POST "$DISCORD_WEBHOOK_URL" \
  -H "Content-Type: application/json" \
  -d '{
    "username": "OpenClaudia",
    "content": "**[Product Name] is here!** After [months/weeks] of development, we'\''re ready to share it with you.",
    "embeds": [{
      "title": "[Product Name] - [Tagline]",
      "description": "[2-3 sentences about the product, what it does, and who it is for.]\n\n**Launch offer:** [special pricing, discount, or bonus for early adopters].",
      "url": "https://example.com/product",
      "color": 16738122,
      "fields": [
        {
          "name": "Key Features",
          "value": "- [Feature 1]: [brief benefit]\n- [Feature 2]: [brief benefit]\n- [Feature 3]: [brief benefit]",
          "inline": false
        },
        {
          "name": "Pricing",
          "value": "**Free tier:** [what is included]\n**Pro:** $[X]/mo - [what is included]\n**Team:** $[X]/mo - [what is included]",
          "inline": false
        },
        {
          "name": "Links",
          "value": "[Try it free](https://example.com/signup) | [Documentation](https://example.com/docs) | [Demo video](https://example.com/demo)",
          "inline": false
        }
      ],
      "thumbnail": {
        "url": "https://example.com/product-logo.png"
      },
      "image": {
        "url": "https://example.com/product-hero.png"
      },
      "footer": {
        "text": "Launch day special - available for a limited time"
      },
      "timestamp": "'"$(date -u +%Y-%m-%dT%H:%M:%SZ)"'"
    }]
  }'

Community Update

Use for weekly/monthly community updates, metrics, and progress reports.

curl -s -X POST "$DISCORD_WEBHOOK_URL" \
  -H "Content-Type: application/json" \
  -d '{
    "username": "OpenClaudia",
    "embeds": [{
      "title": "Community Update - [Month/Week]",
      "description": "Here'\''s what happened in our community this [week/month]:",
      "color": 5793266,
      "fields": [
        {
          "name": "By the Numbers",
          "value": "- **[X]** new members joined\n- **[X]** messages sent\n- **[X]** issues resolved",
          "inline": true
        },
        {
          "name": "Top Contributors",
          "value": "- <@user_id_1> - [contribution]\n- <@user_id_2> - [contribution]\n- <@user_id_3> - [contribution]",
          "inline": true
        },
        {
          "name": "What'\''s Coming Next",
          "value": "- [Upcoming feature or event 1]\n- [Upcoming feature or event 2]\n- [Upcoming feature or event 3]",
          "inline": false
        },
        {
          "name": "How to Get Involved",
          "value": "- Check out our [open issues](https://github.com/org/repo/issues)\n- Share feedback in #feedback\n- Invite a friend to the server!",
          "inline": false
        }
      ],
      "footer": {
        "text": "Thank you for being part of this community"
      },
      "timestamp": "'"$(date -u +%Y-%m-%dT%H:%M:%SZ)"'"
    }]
  }'

Event Promotion

Use for webinars, AMAs, live streams, and community events.

curl -s -X POST "$DISCORD_WEBHOOK_URL" \
  -H "Content-Type: application/json" \
  -d '{
    "content": "@here Don'\''t miss this!",
    "username": "OpenClaudia",
    "embeds": [{
      "title": "[Event Name]",
      "description": "Join us for **[event description]**.\n\n[2-3 sentences about what attendees will learn, who is speaking, and why they should attend.]",
      "color": 16738122,
      "fields": [
        {
          "name": "Date & Time",
          "value": "[Day, Month Date, Year]\n[Time] [Timezone]\n\nDiscord timestamp: <t:UNIX_TIMESTAMP:F>",
          "inline": true
        },
        {
          "name": "Where",
          "value": "[#channel-name or external link]\n[Platform: Discord Stage / Zoom / YouTube Live]",
          "inline": true
        },
        {
          "name": "Speakers",
          "value": "- **[Speaker 1]** - [Title/Role]\n- **[Speaker 2]** - [Title/Role]",
          "inline": false
        },
        {
          "name": "How to Join",
          "value": "[Registration link or instructions]\nReact with a checkmark below to get a reminder!",
          "inline": false
        }
      ],
      "image": {
        "url": "https://example.com/event-banner.png"
      },
      "footer": {
        "text": "Limited spots available"
      },
      "timestamp": "'"$(date -u +%Y-%m-%dT%H:%M:%SZ)"'"
    }]
  }'

Welcome Message

Use for onboarding new members. Typically posted by a bot in a welcome channel or sent via DM.

curl -s -X POST "https://discord.com/api/v10/channels/${WELCOME_CHANNEL_ID}/messages" \
  -H "Authorization: Bot ${DISCORD_BOT_TOKEN}" \
  -H "Content-Type: application/json" \
  -d '{
    "embeds": [{
      "title": "Welcome to [Server Name]!",
      "description": "Hey <@USER_ID>, glad to have you here! Here'\''s everything you need to get started.",
      "color": 16738122,
      "fields": [
        {
          "name": "Start Here",
          "value": "1. Read the rules in #rules\n2. Introduce yourself in #introductions\n3. Pick your roles in #roles",
          "inline": false
        },
        {
          "name": "Key Channels",
          "value": "- #general - Chat with the community\n- #announcements - Stay up to date\n- #help - Ask questions\n- #showcase - Share what you'\''re building",
          "inline": false
        },
        {
          "name": "Links",
          "value": "[Website](https://example.com) | [Docs](https://example.com/docs) | [GitHub](https://github.com/org/repo)",
          "inline": false
        }
      ],
      "thumbnail": {
        "url": "https://example.com/server-icon.png"
      },
      "footer": {
        "text": "We'\''re happy you'\''re here!"
      }
    }]
  }'

Content Share / Blog Post Promotion

Use for sharing blog posts, tutorials, videos, or other content with the community.

curl -s -X POST "$DISCORD_WEBHOOK_URL" \
  -H "Content-Type: application/json" \
  -d '{
    "username": "OpenClaudia",
    "embeds": [{
      "author": {
        "name": "[Author Name]",
        "icon_url": "https://example.com/author-avatar.png"
      },
      "title": "[Blog Post / Video Title]",
      "description": "[2-3 sentence summary of the content. What will the reader learn? Why should they care?]\n\n[Read the full post ->](https://example.com/blog/post-slug)",
      "url": "https://example.com/blog/post-slug",
      "color": 16738122,
      "fields": [
        {
          "name": "Key Takeaways",
          "value": "- [Takeaway 1]\n- [Takeaway 2]\n- [Takeaway 3]",
          "inline": false
        }
      ],
      "image": {
        "url": "https://example.com/blog/post-slug/og-image.png"
      },
      "footer": {
        "text": "Read time: [X] min"
      },
      "timestamp": "'"$(date -u +%Y-%m-%dT%H:%M:%SZ)"'"
    }]
  }'

Discord Markdown Reference

Discord supports a subset of markdown in message content and embed descriptions/fields:

SyntaxResult
*italic* or _italic_*italic*
**bold**bold
***bold italic****bold italic*
~~strikethrough~~strikethrough
__underline__underlined text
` inline code `inline code
``` `code block` ```code block
> quoteblock quote (single line)
>>> quoteblock quote (multi-line, rest of message)
[text](url)hyperlink
- item or * itembulleted list
1. itemnumbered list

Mentions and Timestamps

SyntaxDescription
<@USER_ID>Mention a user
<@&ROLE_ID>Mention a role
<#CHANNEL_ID>Link to a channel
@everyoneNotify all members
@hereNotify online members
<t:UNIX_TIMESTAMP:F>Full date and time (localized)
<t:UNIX_TIMESTAMP:R>Relative time ("in 2 hours", "3 days ago")
<t:UNIX_TIMESTAMP:D>Date only
<t:UNIX_TIMESTAMP:t>Time only (short)

Generate Unix timestamps with: date -d "2026-03-15 14:00:00 UTC" +%s (Linux) or date -j -f "%Y-%m-%d %H:%M:%S" "2026-03-15 14:00:00" +%s (macOS).

Advanced: Webhook Management via Bot API

Create a Webhook Programmatically

curl -s -X POST "https://discord.com/api/v10/channels/${CHANNEL_ID}/webhooks" \
  -H "Authorization: Bot ${DISCORD_BOT_TOKEN}" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "OpenClaudia Marketing"
  }' | jq '{id: .id, token: .token, url: ("https://discord.com/api/webhooks/" + .id + "/" + .token)}'

List Webhooks for a Channel

curl -s "https://discord.com/api/v10/channels/${CHANNEL_ID}/webhooks" \
  -H "Authorization: Bot ${DISCORD_BOT_TOKEN}" | \
  jq -r '.[] | "\(.id) - \(.name) - https://discord.com/api/webhooks/\(.id)/\(.token)"'

Delete a Webhook

WEBHOOK_ID="the_webhook_id"

curl -s -X DELETE "https://discord.com/api/v10/webhooks/${WEBHOOK_ID}" \
  -H "Authorization: Bot ${DISCORD_BOT_TOKEN}"

Rate Limits and Best Practices

Rate Limits

  • Webhooks: 30 requests per 60 seconds per webhook.
  • Bot API (global): 50 requests per second.
  • Bot API (per channel): 5 messages per 5 seconds per channel.
  • Bot API (per guild): Varies by endpoint.

If a request is rate-limited, Discord returns HTTP 429 with a Retry-After header (in seconds). Handle it like this:

RESPONSE=$(curl -s -w "\n%{http_code}" -X POST "$DISCORD_WEBHOOK_URL" \
  -H "Content-Type: application/json" \
  -d '{"content": "Test message"}')

HTTP_CODE=$(echo "$RESPONSE" | tail -1)
BODY=$(echo "$RESPONSE" | head -1)

if [ "$HTTP_CODE" = "429" ]; then
  RETRY_AFTER=$(echo "$BODY" | jq -r '.retry_after')
  echo "Rate limited. Retrying after ${RETRY_AFTER} seconds..."
  sleep "$RETRY_AFTER"
  # Retry the request
fi

Best Practices

  • Always preview before sending. Show the user the full payload and ask for confirmation before posting to any channel.
  • Respect rate limits. When sending multiple messages, add a 1-2 second delay between requests.
  • Use embeds for marketing content. Plain text is easy to miss in a busy channel. Embeds with color, images, and structured fields stand out.
  • Use @everyone and @here sparingly. Overusing mentions burns community goodwill fast. Reserve them for genuinely important announcements.
  • Include timestamps. Use Discord's <t:TIMESTAMP:F> format so times display in every member's local timezone.
  • Track message IDs. Store returned message IDs so you can edit or delete posts later.
  • Test with a private channel first. Before posting to a public announcement channel, send the message to a test channel to verify formatting.

Publishing Workflow

When the user asks to post to Discord:

  1. Generate the message content using the appropriate template above.
  2. Preview -- show the user the full JSON payload, including:

- Target channel or webhook - Message content - Embed fields (title, description, color, fields, images) - Any mentions (@everyone, @here, role mentions)

  1. Confirm -- ask the user to approve before posting.
  2. Post -- execute the curl command.
  3. Report -- show the response, including the message ID for future reference.

Never auto-post without explicit user confirmation.

Output Format

For every Discord posting request, deliver:

1. Message Preview

  • Full message content (plain text + embeds) formatted for readability.
  • Visual description of what the embed will look like.
  • Character counts for fields approaching limits.

2. API Payload

  • The complete curl command ready to execute.
  • All variables resolved (webhook URL, channel ID, etc.).

3. Post-Send Report

After posting:

  • HTTP response status.
  • Message ID (for editing or deleting later).
  • Direct link to the message if possible (https://discord.com/channels/GUILD_ID/CHANNEL_ID/MESSAGE_ID).

平台分布

Codex

36.46%
按下载量换算390

Claude

27.82%
按下载量换算297

Cursor

19.38%
按下载量换算207

Gemini CLI

9.18%
按下载量换算98

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

未通过

权限和风险

操作浏览器

该 Skill 可能涉及浏览器控制能力,使用时可能读取或操作网页内容,需要在受控环境中确认权限边界。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在提醒或未通过项,安装前请自行复核。目前只有一个公开来源,建议同时核对源仓库。

继续浏览同类 Skills