Prerequisites
- A phone with WhatsApp installed
- OrcBot installed and configured
- Node.js 18+ installed
- Stable internet connection
How It Works
OrcBot uses the Baileys library to connect to WhatsApp as a linked device (similar to WhatsApp Web).Initial Setup
1
Configure Session Path
Set where WhatsApp auth data is stored:
2
Start OrcBot
3
Scan QR Code
When you see “WhatsApp: New QR Code generated. Scan to link.” in the logs:
- Open WhatsApp on your phone
- Go to Settings → Linked Devices
- Tap “Link a Device”
- Scan the QR code displayed in your terminal
4
Connection Established
You’ll see:OrcBot is now connected!
Configuration Options
Basic Settings
Auto-Reply Behavior
- Enabled
- Disabled
- Self-Chat Mode
Media Handling
Receiving Media
OrcBot automatically downloads and analyzes media:Sending Media
Use thesend_file skill:
- Images:
.jpg,.png,.webp - Audio:
.ogg,.mp3,.m4a - Video:
.mp4,.mkv - Documents:
.pdf,.doc,.xlsx, etc.
Voice Messages
Send text-to-speech voice notes:Contact Management
Auto-Sync Contacts
OrcBot automatically syncs your WhatsApp contacts:Search Contacts
Use the contact search API:Get Recent Contacts
Reply Context & Threads
OrcBot preserves conversation threads:Group Chat Support
Auto-Reply in Groups
Group Message Detection
WhatsApp Status Updates
Enable Status Replies
- OrcBot sees status updates from contacts
- Can auto-react or reply to status
- Status media is downloaded and analyzed
Status Detection
Session Persistence
How Sessions Work
Baileys stores auth credentials in multi-file format:Backup Session
Restore Session
If you lose your session files, you’ll need to re-scan the QR code.
Reconnection Handling
OrcBot automatically reconnects on disconnection:loggedOut- You logged out from phone (requires re-pairing)connectionReplaced- Another device connected- Network issues - Auto-reconnects
Advanced Features
Context Profiling
When enabled, OrcBot analyzes message patterns:- Understand conversation context better
- Provide more relevant responses
- Track user preferences over time
Auto-Reactions
Enable emoji reactions to messages:- ✅ for completed tasks
- 🔍 for searches in progress
- ❌ for errors
- 🤔 for clarification requests
Self-Chat Prefix
When messaging yourself, OrcBot adds a prefix to its messages:Channel Detection
OrcBot uses 3-tier channel detection for sending messages:- WhatsApp individual:
1234567890@s.whatsapp.net - WhatsApp group:
1234567890-1234567890@g.us - Discord:
987654321098765432(snowflake) - Telegram:
123456789(numeric)
Troubleshooting
QR Code Not Showing
1
Check Logs
2
Verify Config
3
Clear Session
4
Check Terminal
Make sure your terminal supports QR code rendering. If not, check logs for the QR code event.
Connection Keeps Dropping
Possible causes:-
Network instability
-
Multiple devices
- Check linked devices on your phone
- Unlink old sessions
-
WhatsApp updates
- Update Baileys:
npm update @whiskeysockets/baileys - Restart OrcBot
- Update Baileys:
Messages Not Being Received
- Bot is muted on your phone
- Message processing disabled:
whatsappAutoReplyEnabled: false - Group admin restrictions
Media Download Failures
- Directory exists and is writable
- Sufficient disk space
- Network connection is stable
”Logged Out” Error
If you seeDisconnectReason.loggedOut:
- You manually logged out from phone
- WhatsApp detected suspicious activity
- Session expired (typically after 14 days of inactivity)
Best Practices
Reliability
- Keep your phone connected to internet
- Don’t log out of linked devices
- Back up session files regularly
- Monitor connection status in logs
Privacy
- Don’t share session files (contain auth credentials)
- Set restrictive permissions:
chmod 700 ~/.orcbot/whatsapp-session - Disable status replies unless needed
- Be cautious with auto-profiling in sensitive conversations
Performance
- Limit media auto-downloads in busy groups
- Set reasonable message processing limits
- Use
whatsappAutoReplyEnabled: falsein high-traffic groups - Clean up old downloads periodically
Compliance
- Follow WhatsApp Terms of Service
- Don’t spam or send unsolicited messages
- Respect user privacy and consent
- Use business accounts for commercial purposes