From openhands-skills
Builds Discord integrations for bots, incoming webhooks, slash commands, and REST API workflows using curl and bot tokens. Useful for notifications, moderation, and channel management.
npx claudepluginhub openhands/extensionsThis skill uses the workspace's default tool permissions.
Use this skill when implementing or automating Discord integrations.
Sends messages, embeds, and marketing content to Discord channels via webhooks or bot API. Guides credential setup for community engagement, announcements, and automated posting.
Builds production-ready Discord bots using Discord.js (JavaScript) and Pycord (Python). Covers gateway intents, slash commands, interactive components, rate limiting, and sharding. Activates on discord, bots, slash-commands mentions.
Interact with Discord servers using bot tokens: send/read messages, list channels/servers, manage auth/reactions. For AI agents, CI/CD, server-side integrations.
Share bugs, ideas, or general feedback.
Use this skill when implementing or automating Discord integrations.
Incoming webhooks (best for one-way posting)
Bot token + REST API (two-way / richer automation)
https://discord.com/api/v10Authorization: Bot <token>.Interactions / slash commands (user-invoked commands)
DISCORD_WEBHOOK_URL for incoming webhooksDISCORD_BOT_TOKEN for bot REST API callsallowed_mentions to something strict (these examples use {"parse": []}) to avoid accidentally pinging @everyone / roles.retry_after/Retry-After, and don’t retry forever.Discord requires at least one of content, embeds, components, file, or poll.
curl -sS -X POST \
-H 'Content-Type: application/json' \
-d '{"content":"Hello from OpenHands","allowed_mentions":{"parse":[]}}' \
"$DISCORD_WEBHOOK_URL"
Endpoint: POST /channels/{channel_id}/messages (Create Message)
CHANNEL_ID="..."
curl -sS -X POST "https://discord.com/api/v10/channels/${CHANNEL_ID}/messages" \
-H "Authorization: Bot $DISCORD_BOT_TOKEN" \
-H 'Content-Type: application/json' \
-d '{"content":"Hello from my bot","allowed_mentions":{"parse":[]}}'
Docs: https://discord.com/developers/docs/resources/channel#create-message
These scripts are self-contained and only use the Python standard library.
Post to a webhook:
python3 -m skills.discord.scripts.post_webhook --content "Build finished" --wait
Post to a channel using a bot token:
python3 -m skills.discord.scripts.send_message --channel-id "$CHANNEL_ID" --content "Hello"
Retry-After / retry_after and rate-limit headers when present.Docs: https://discord.com/developers/docs/topics/rate-limits
Docs: https://discord.com/developers/docs/interactions/application-commands
For more details (OAuth2 flows, command registration endpoints, troubleshooting), see: