clawdesk-channels
Concrete implementations of the Channel trait for each supported messaging platform. Each module implements Layer 0 (core) and relevant Layer 1 (capability) traits defined in clawdesk-channel.
Dependencies
Internal: clawdesk-types, clawdesk-channel
External: reqwest, tokio, serde, tracing, async-trait
Modules
| Module | Description | Layer 1 Traits |
|---|---|---|
telegram | Telegram Bot API integration | Threaded, Reactions, GroupManagement |
discord | Discord bot via gateway + REST | Threaded, Reactions, GroupManagement, Streaming |
slack | Slack app via Web API + Events | Threaded, Reactions, GroupManagement, Directory |
whatsapp | WhatsApp Business API | Reactions |
matrix | Matrix protocol (Element) | Threaded, Reactions, GroupManagement, Directory |
cli | Local CLI channel (stdin/stdout) | Streaming |
desktop | Desktop app channel (Tauri IPC) | Streaming |
webhook | Generic incoming/outgoing webhooks | — |
Key Types
/// Telegram channel implementation
pub struct TelegramChannel {
bot_token: String,
client: reqwest::Client,
channel_id: ChannelId,
}
/// Discord channel implementation
pub struct DiscordChannel {
bot_token: String,
client: reqwest::Client,
gateway_url: String,
channel_id: ChannelId,
}
/// Slack channel implementation
pub struct SlackChannel {
bot_token: String,
client: reqwest::Client,
channel_id: ChannelId,
}
Channel Capability Matrix
| Channel | Send | Receive | Threads | Reactions | Groups | Streaming | Directory |
|---|---|---|---|---|---|---|---|
| Telegram | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | ❌ |
| Discord | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ |
| Slack | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | ✅ |
| ✅ | ✅ | ❌ | ✅ | ❌ | ❌ | ❌ | |
| Matrix | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | ✅ |
| CLI | ✅ | ✅ | ❌ | ❌ | ❌ | ✅ | ❌ |
| Desktop | ✅ | ✅ | ❌ | ❌ | ❌ | ✅ | ❌ |
Configuration
[[channels]]
type = "telegram"
bot_token = "${TELEGRAM_BOT_TOKEN}"
[[channels]]
type = "discord"
bot_token = "${DISCORD_BOT_TOKEN}"
[[channels]]
type = "slack"
bot_token = "${SLACK_BOT_TOKEN}"
app_token = "${SLACK_APP_TOKEN}"
Example Usage
use clawdesk_channels::TelegramChannel;
use clawdesk_channel::Channel;
let telegram = TelegramChannel::new(TelegramConfig {
bot_token: std::env::var("TELEGRAM_BOT_TOKEN")?,
..Default::default()
});
// Register in the channel registry
registry.register(Box::new(telegram));
info
Each channel module handles platform-specific authentication, webhooks, and message format translation internally. The Channel trait provides a unified interface.