Skip to content

feat: Add Discord integration with multi-channel support and improved configuration#12

Merged
jlia0 merged 9 commits intomainfrom
sasha-computer-feat/discord-integration
Feb 9, 2026
Merged

feat: Add Discord integration with multi-channel support and improved configuration#12
jlia0 merged 9 commits intomainfrom
sasha-computer-feat/discord-integration

Conversation

@jlia0
Copy link
Copy Markdown
Collaborator

@jlia0 jlia0 commented Feb 9, 2026

Summary

Merges Discord integration from @sasha-computer with significant improvements to configuration management and CLI commands.

Key Features

🎮 Discord Integration

  • Full Discord bot support alongside WhatsApp
  • Multi-channel setup wizard (Discord/WhatsApp/Both)
  • Dynamic tmux layouts based on enabled channels
  • Queue-based message processing for both channels

⚙️ Configuration Management

  • Centralized settings.json for all configuration
  • Interactive setup wizard with terminal-based token input
  • No manual .env file editing required
  • Reduced tinyclaw.sh from 677 to 556 lines

🎛️ New CLI Commands

# Switch Claude model instantly
./tinyclaw.sh model sonnet|opus

# Reset channel authentication
./tinyclaw.sh channels reset whatsapp|discord

# Configure heartbeat interval in setup wizard

📝 Settings Structure

{
  "channel": "both",
  "model": "sonnet",
  "discord_bot_token": "YOUR_TOKEN",
  "heartbeat_interval": 500
}

Changes

Added

  • Discord client with DM and mention support
  • Multi-channel setup wizard (setup-wizard.sh)
  • Model switching command
  • Channel reset command
  • Heartbeat interval configuration
  • Comprehensive README updates

Improved

  • WhatsApp QR code display using file-based approach
  • Configuration management (single settings.json)
  • Code organization (extracted setup logic)
  • Dynamic heartbeat interval from settings

Removed

  • Separate channel/model config files
  • Unnecessary .env.example
  • Hardcoded heartbeat interval
  • TMux layout ASCII art (reduced LoC)

Credits

Original Discord integration by @sasha-computer
Configuration improvements and additional features by Claude Code

Test Plan

  • Fresh install with Discord only
  • Fresh install with WhatsApp only
  • Fresh install with both channels
  • Model switching between sonnet and opus
  • Channel reset for WhatsApp
  • Heartbeat interval configuration
  • Settings persistence across restarts

🤖 Generated with Claude Code

claude and others added 9 commits February 9, 2026 11:17
Move whatsapp-client.js and queue-processor.js into src/ as TypeScript
files with proper type annotations, interfaces, and strict mode. Set up
tsconfig.json to compile to dist/, add build scripts, and update
tinyclaw.sh to reference compiled output and auto-build when source
changes.

https://claude.ai/code/session_01R6CxWY1dX5VRJWGAJmKohu
Add a full Discord bot client (discord-client.ts) that receives DMs,
queues them through the shared queue-processor, and sends responses
back — mirroring the existing WhatsApp flow. The queue processor now
supports configurable model selection (Sonnet/Opus) via a persisted
config file.

The main daemon (tinyclaw.sh) is overhauled with:
- Interactive first-run setup wizard (channel + model selection)
- Support for Discord-only, WhatsApp-only, or both simultaneously
- Dynamic tmux layouts that adapt to the active channels
- Discord bot token validation from .env
- A `setup` command to reconfigure channel/model at any time
- Status and logs commands that reflect all active channels

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Resolved conflict in tinyclaw.sh by combining:
- TypeScript dist/ paths from this branch
- Enhanced WhatsApp ready flag checking from main

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This merge combines:
- Discord bot support alongside WhatsApp
- Multi-channel setup wizard (Discord/WhatsApp/Both)
- Improved WhatsApp QR code display using file-based approach
- Dynamic tmux layouts based on enabled channels
- Better ready state tracking for WhatsApp

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Major improvements:
- Replace separate channel/model files with unified .tinyclaw/settings.json
- Store Discord bot token in settings.json (written to .env for Node.js client)
- Extract setup wizard into separate setup-wizard.sh script
- Setup wizard now prompts for Discord bot token in terminal
- Remove tmux layout ASCII art display to reduce LoC
- Reduce tinyclaw.sh from 677 to 480 lines (29% reduction)

Breaking changes:
- Old .tinyclaw/channel and .tinyclaw/model files are deprecated
- Users will be prompted to run setup wizard on first start

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
The setup wizard handles Discord token collection and automatically
writes to .env, so users never need to manually create/edit .env.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Major documentation updates:
- Add Discord support throughout
- Document interactive setup wizard
- Show all three tmux layouts (WhatsApp/Discord/Both)
- Update architecture diagram with Discord client
- Add Discord setup instructions
- Document .tinyclaw/settings.json configuration
- Update component list with TypeScript files
- Add Discord to message flow examples

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
New commands:
- `./tinyclaw.sh model` - Show current model
- `./tinyclaw.sh model sonnet|opus` - Switch Claude model instantly
- `./tinyclaw.sh channels reset whatsapp|discord` - Reset channel auth

Setup wizard improvements:
- Prompt for heartbeat interval (default: 500s)
- Store in settings.json as heartbeat_interval

Heartbeat improvements:
- Read interval from settings.json dynamically
- No need to edit heartbeat-cron.sh manually

Other changes:
- Minor formatting fixes in queue-processor.ts
- Updated model ID from full version to short name

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Resolved conflicts:
- tinyclaw.sh: Keep Discord multi-channel support
- package.json: Include Discord dependencies
- package-lock.json: Use our version with Discord packages

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
@jlia0 jlia0 merged commit f033e97 into main Feb 9, 2026
AgenticCurve pushed a commit to AgenticCurve/tinyclaw that referenced this pull request Feb 11, 2026
@jlia0 jlia0 deleted the sasha-computer-feat/discord-integration branch February 13, 2026 20:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants