discord-doctorQuick diagnosis and repair for Discord bot, Gateway, OAuth token, and legacy config issues. Checks connectivity, token expiration, and cleans up old Clawdis artifacts.
Install via ClawdBot CLI:
clawdbot install jhillock/discord-doctorRequires:
Quick diagnosis and repair for Discord/Gateway availability issues, OAuth token problems, and legacy Clawdis configuration conflicts.
# Check status (diagnostic only)
discord-doctor
# Check and auto-fix issues
discord-doctor --fix
clawdbot health)When run with --fix, it can:
com.clawdis.gateway.plist)~/.clawdis to ~/.clawdis-backup)| Issue | Auto-Fix Action |
|-------|-----------------|
| Gateway not running | Starts gateway on port 18789 |
| Missing npm packages | Runs npm install + installs specific package |
| Discord disconnected | Restarts gateway to reconnect |
| OAuth token expired | Shows instructions to re-authenticate |
| Legacy launchd service | Removes old com.clawdis.gateway.plist |
| Legacy ~/.clawdis config | Moves to ~/.clawdis-backup |
If you see "Access token EXPIRED", run:
cd ~/Clawdis && npx clawdbot configure
Then select "Anthropic OAuth (Claude Pro/Max)" to re-authenticate.
If you upgraded from Clawdis to Clawdbot, you may have legacy artifacts causing OAuth token conflicts:
~/Library/LaunchAgents/com.clawdis.gateway.plist~/.clawdis/Run discord-doctor --fix to clean these up automatically.
Discord Doctor
Checking Discord and Gateway health...
1. Discord App
Running (6 processes)
2. Gateway Process
Running (PID: 66156, uptime: 07:45)
3. Gateway HTTP
Responding on port 18789
4. Discord Connection
Discord: ok (@Clawdis) (321ms)
5. Anthropic OAuth
Valid (expires in 0h 45m)
6. Legacy Clawdis
No legacy launchd service
No legacy config directory
7. Recent Discord Activity
- discord:group:123456789012345678 (21h ago)
Summary
All checks passed! Discord is healthy.
Generated Mar 1, 2026
Developers building or maintaining Discord bots can use Discord Doctor to diagnose connectivity issues, verify OAuth token validity, and automatically fix common problems like missing dependencies or gateway failures. This ensures bots remain operational with minimal downtime, especially after updates or server changes.
Community managers running Discord servers with integrated bots can utilize Discord Doctor to quickly check bot health and resolve issues like disconnections or token expirations. This helps maintain seamless interactions, automated moderation, and user engagement without requiring deep technical expertise.
Organizations migrating from older systems like Clawdis to newer platforms such as Clawdbot can use Discord Doctor to detect and clean up legacy artifacts that cause conflicts. It automates the removal of old services and configs, ensuring a smooth transition and preventing OAuth token issues.
Educators teaching Discord bot development in coding bootcamps or workshops can integrate Discord Doctor as a troubleshooting tool. Students learn to diagnose and fix common deployment issues, such as gateway failures or dependency problems, enhancing hands-on learning and project success rates.
Offer Discord Doctor as a free diagnostic tool with basic checks, while charging for advanced features like automated fixes, detailed analytics, or priority support. This model attracts a broad user base and monetizes power users who need reliable bot maintenance.
Provide Discord Doctor as part of a larger enterprise package for companies running multiple Discord bots. Include custom integrations, dedicated support, and enhanced security features, targeting businesses that rely on Discord for customer service or internal communication.
Release Discord Doctor as open-source software to foster community contributions and adoption. Generate revenue through sponsorships from companies benefiting from the tool, donations, and paid consulting for custom modifications or training sessions.
💬 Integration Tip
Integrate Discord Doctor into CI/CD pipelines to automatically check bot health before deployments, reducing manual oversight and catching issues early.
iMessage/SMS CLI for listing chats, history, watch, and sending.
Use when you need to control Discord from Clawdbot via the discord tool: send messages, react, post or upload stickers, upload emojis, run polls, manage threads/pins/search, fetch permissions or member/role/channel info, or handle moderation actions in Discord DMs or channels.
Use when you need to control Slack from Clawdbot via the slack tool, including reacting to messages or pinning/unpinning items in Slack channels or DMs.
Send WhatsApp messages to other people or search/sync WhatsApp history via the wacli CLI (not for normal user chats).
Build or update the BlueBubbles external channel plugin for Clawdbot (extension package, REST send/probe, webhook inbound).
OpenClaw skill for designing Telegram Bot API workflows and command-driven conversations using direct HTTPS requests (no SDKs).