Loading...
Loading...
List channels, read recent messages, and send messages on Discord using the user's own bot, via the Discord REST API. Use when the user wants their Discord BOT to post a message, read a channel, or list servers/channels — anything that acts in a server the bot was invited to.
npx skill4agent add acedatacloud/skills discordbotcurl + jq$DISCORDBOT_TOKENAuthorization: Bot $DISCORDBOT_TOKENBot Bearerhttps://discord.com/api/v10403 Forbidden{"code": <n>, "message": "<reason>"}401auth.acedata.cloud/user/connections429retry_aftercurl -sS -H "Authorization: Bot $DISCORDBOT_TOKEN" \
"https://discord.com/api/v10/users/@me" \
| jq '{id, username, bot}'curl -sS -H "Authorization: Bot $DISCORDBOT_TOKEN" \
"https://discord.com/api/v10/users/@me/guilds" \
| jq 'map({id, name})'typeGUILD_ID="123456789012345678"
curl -sS -H "Authorization: Bot $DISCORDBOT_TOKEN" \
"https://discord.com/api/v10/guilds/$GUILD_ID/channels" \
| jq 'map(select(.type==0 or .type==5) | {id, name, type})'contentCHANNEL_ID="123456789012345678"
curl -sS -H "Authorization: Bot $DISCORDBOT_TOKEN" \
"https://discord.com/api/v10/channels/$CHANNEL_ID/messages?limit=20" \
| jq 'map({author: .author.username, ts: .timestamp, content})'CHANNEL_ID="123456789012345678"
curl -sS -X POST \
-H "Authorization: Bot $DISCORDBOT_TOKEN" \
-H "Content-Type: application/json" \
"https://discord.com/api/v10/channels/$CHANNEL_ID/messages" \
-d "$(jq -nc --arg c "Hello from the bot." '{content: $c}')"CHANNEL_ID="123456789012345678"; MESSAGE_ID="987654321098765432"
curl -sS -X POST \
-H "Authorization: Bot $DISCORDBOT_TOKEN" \
-H "Content-Type: application/json" \
"https://discord.com/api/v10/channels/$CHANNEL_ID/messages" \
-d "$(jq -nc --arg c "On it!" --arg m "$MESSAGE_ID" \
'{content: $c, message_reference: {message_id: $m}}')"bot<@USER_ID><#CHANNEL_ID>