garudust-platforms 0.2.3

Chat platform adapters for Garudust agents: Telegram, Discord, Slack, Matrix, LINE, Webhook
Documentation

Chat platform adapters for Garudust agents.

Each adapter implements [garudust_core::platform::PlatformAdapter] and connects the agent to an external messaging platform. Enable only the platforms you need via Cargo features.

Feature flags

Feature Platform Adapter
telegram (default) Telegram Bot API [telegram::TelegramAdapter]
webhook (default) HTTP Webhook [webhook::WebhookAdapter]
discord Discord Gateway [discord::DiscordAdapter]
slack Slack RTM/Events [slack::SlackAdapter]
matrix Matrix (Element) [matrix::MatrixAdapter]
line LINE Messaging API [line::LineAdapter]
all All of the above

Example — running Telegram and a webhook simultaneously

use std::sync::Arc;
use garudust_platforms::{telegram::TelegramAdapter, webhook::WebhookAdapter};
use garudust_core::platform::{MessageHandler, PlatformAdapter};

async fn start(handler: Arc<dyn MessageHandler>) -> anyhow::Result<()> {
    let tg = TelegramAdapter::new(std::env::var("TELEGRAM_TOKEN")?);
    let wh = WebhookAdapter::new(3001);
    tg.start(handler.clone()).await?;
    wh.start(handler).await?;
    Ok(())
}