- Skill ID
- openclaudia/openclaudia-skills/discord-bot
- Publisher
- openclaudia
- Repository
- openclaudia-skills
- Installs
- 0
- Files
- 1
- Synced
- Sep 23, 2026
Open any RiverX project, open the Skills panel in the chat, and search for this identifier. The files are fetched from the source repository at install time.
openclaudia/openclaudia-skills/discord-botInstalls these files- SKILL.md
What this skill tells the agent
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."
fiWebhook vs. Bot API
| Feature | Webhook | Bot API |
|---|---|---|
| Setup difficulty | Easy (2 minutes) | Moderate (5 minutes) |
| Send messages | Yes | Yes |
| Send embeds | Yes | Yes |
| Send to multiple channels | One webhook per channel | Any channel the bot can see |
| Edit/delete own messages | Yes (with message ID) | Yes |
| Read messages | No | Yes |
| React to messages | No | Yes |
| Manage roles/members | No | Yes |
| Rate limits | 30 requests/minute per webhook | 50 requests/second globally |
| Custom username/avatar per message | Yes | No (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:
- Open Discord and go to the server where you want to post.
- Click the channel name, then Edit Channel (gear icon).
- Go to Integrations > Webhooks.
- Click New Webhook.
- Set a name (e.g., "OpenClaudia Marketing") and optionally upload an avatar.
- Click Copy Webhook URL.
- 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' >> .envThe 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:
- Go to https://discord.com/developers/applications
- Click New Application, give it a name, and click Create.
- Go to the Bot tab and click Add Bot.
- Under Token, click Copy to get your bot token.
- Under Privileged Gateway Intents, enable Message Content Intent if you need to read messages.
- Go to OAuth2 > URL Generator.
- Select scopes:
bot,applications.commands. - Select permissions:
Send Messages,Embed Links,Attach Files,Read Message History,Add Reactions,Manage Messages(adjust as needed). - Copy the generated URL and open it in a browser to invite the bot to your server.
- Save the token:
echo 'DISCORD_BOT_TOKEN=your_bot_token_here' >> .envGathering Requirements
Before posting to Discord, collect these inputs:
- Channel - Which channel or webhook URL to post to?
- Content type - Plain message, embed, announcement, or scheduled post?
- Message content - What is the message about?
- Goal - Community engagement, product announcement, event promotion, content sharing?
- Tone - Professional, casual, hype, community-friendly?
- Visuals - Any images, thumbnails, or icons to include?
- 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="🎉"More from openclaudia
Use this skill in a project
Open any RiverX project, search the Skills panel for openclaudia/openclaudia-skills/discord-bot, and install it in one click.
