clawdbot-workspace/research-discord-api.sh
2026-01-28 23:00:58 -05:00

40 lines
995 B
Bash
Executable File

#!/bin/bash
# Research Discord API for creating applications/bots programmatically
echo "=== Discord API: Create Application ==="
echo "Endpoint: POST https://discord.com/api/v10/applications"
echo ""
echo "Required headers:"
echo " Authorization: <user_token>"
echo " Content-Type: application/json"
echo " User-Agent: <custom>"
echo ""
echo "Request body example:"
cat << 'EOF'
{
"name": "My Bot Name",
"description": "Bot description",
"icon": "base64_icon_data"
}
EOF
echo ""
echo "=== Discord API: Add Bot to Application ==="
echo "Endpoint: POST https://discord.com/api/v10/applications/{application_id}/bot"
echo ""
echo "Request body:"
cat << 'EOF'
{
"username": "BotUsername",
"avatar": "base64_avatar_data"
}
EOF
echo ""
echo "=== Getting User Token ==="
echo "Option 1: From Discord login (use browser automation or manual copy)"
echo "Option 2: Use Discord OAuth to get an access token"
echo ""
echo "Note: Discord requires 2FA on the account for developer actions"