Discord Bot API via curl. Use this skill to interact with channels, guilds, users, and messages using a bot token.
/plugin marketplace add vm0-ai/api0/plugin install api0@api0This skill inherits all available tools. When active, it can use any tool Claude has access to.
Use the Discord Bot API via direct curl calls to manage channels, guilds, messages, and users.
Official docs:
https://discord.com/developers/docs
Use this skill when you need to:
For simple message posting, use discord-webhook skill instead.
export DISCORD_BOT_TOKEN="MTIzNDU2Nzg5MDEyMzQ1Njc4OQ.ABcDeF.xxxxx..."
In Bot section, enable:
bot, applications.commandsEnable Developer Mode: User Settings → Advanced → Developer Mode Right-click any channel/user/server → Copy ID
Important: When using
$VARin a command that pipes to another command, wrap the command containing$VARinbash -c '...'. Due to a Claude Code bug, environment variables are silently cleared when pipes are used directly.bash -c 'curl -s "https://api.example.com" -H "Authorization: Bearer $API_KEY"' | jq .
Base URL: https://discord.com/api/v10
Authorization header: Authorization: Bot YOUR_TOKEN
bash -c 'curl -s "https://discord.com/api/v10/users/@me" -H "Authorization: Bot ${DISCORD_BOT_TOKEN}"' | jq '{id, username, discriminator}'
bash -c '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\": \"Hello from bot!\"}"' | jq '{id, content}'
bash -c '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\": \"Bot Message\", \"description\": \"This is from the bot API\", \"color\": 5793266}]}"' | jq '{id}'
bash -c 'curl -s "https://discord.com/api/v10/channels/${CHANNEL_ID}" -H "Authorization: Bot ${DISCORD_BOT_TOKEN}"' | jq '{id, name, type, guild_id}'
bash -c 'curl -s "https://discord.com/api/v10/channels/${CHANNEL_ID}/messages?limit=10" -H "Authorization: Bot ${DISCORD_BOT_TOKEN}"' | jq '.[] | {id, author: .author.username, content}'
bash -c 'curl -s "https://discord.com/api/v10/channels/${CHANNEL_ID}/messages/${MESSAGE_ID}" -H "Authorization: Bot ${DISCORD_BOT_TOKEN}"' | jq '{id, content, author: .author.username}'
curl -s -X DELETE "https://discord.com/api/v10/channels/${CHANNEL_ID}/messages/${MESSAGE_ID}" -H "Authorization: Bot ${DISCORD_BOT_TOKEN}"
curl -s -X PUT "https://discord.com/api/v10/channels/${CHANNEL_ID}/messages/${MESSAGE_ID}/reactions/%F0%9F%91%8D/@me" -H "Authorization: Bot ${DISCORD_BOT_TOKEN}" -H "Content-Length: 0"
Note: Emoji must be URL encoded (👍 = %F0%9F%91%8D)
bash -c 'curl -s "https://discord.com/api/v10/guilds/${GUILD_ID}" -H "Authorization: Bot ${DISCORD_BOT_TOKEN}"' | jq '{id, name, member_count, owner_id}'
bash -c 'curl -s "https://discord.com/api/v10/guilds/${GUILD_ID}/channels" -H "Authorization: Bot ${DISCORD_BOT_TOKEN}"' | jq '.[] | {id, name, type}'
bash -c 'curl -s "https://discord.com/api/v10/guilds/${GUILD_ID}/members?limit=10" -H "Authorization: Bot ${DISCORD_BOT_TOKEN}"' | jq '.[] | {user: .user.username, nick, joined_at}'
bash -c 'curl -s "https://discord.com/api/v10/guilds/${GUILD_ID}/roles" -H "Authorization: Bot ${DISCORD_BOT_TOKEN}"' | jq '.[] | {id, name, color, position}'
bash -c '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\": \"My Webhook\"}"' | jq '{id, token, url: "https://discord.com/api/webhooks/\(.id)/\(.token)"}'
bash -c 'curl -s "https://discord.com/api/v10/channels/${CHANNEL_ID}/webhooks" -H "Authorization: Bot ${DISCORD_BOT_TOKEN}"' | jq '.[] | {id, name, token}'
bash -c 'curl -s -X POST "https://discord.com/api/v10/guilds/${GUILD_ID}/channels" -H "Authorization: Bot ${DISCORD_BOT_TOKEN}" -H "Content-Type: application/json" -d "{\"name\": \"new-channel\", \"type\": 0}"' | jq '{id, name}'
| Type | Description |
|---|---|
| 0 | Text channel |
| 2 | Voice channel |
| 4 | Category |
| 5 | Announcement |
| 13 | Stage |
| 15 | Forum |
X-RateLimit-* headers; implement backoff/v10 for latest stable API