walrus_channel/config.rs
1//! Channel configuration types.
2
3use serde::{Deserialize, Serialize};
4
5/// Top-level channel configuration.
6#[derive(Debug, Clone, Serialize, Deserialize, Default)]
7pub struct ChannelConfig {
8 /// Telegram bot configuration.
9 pub telegram: Option<TelegramConfig>,
10 /// Discord bot configuration.
11 pub discord: Option<DiscordConfig>,
12}
13
14/// Configuration for the Telegram bot.
15#[derive(Debug, Clone, Serialize, Deserialize)]
16pub struct TelegramConfig {
17 /// Bot API token.
18 pub bot: String,
19 /// Agent to route messages to. Falls back to `default_agent` if absent.
20 pub agent: Option<String>,
21}
22
23/// Configuration for the Discord bot.
24#[derive(Debug, Clone, Serialize, Deserialize)]
25pub struct DiscordConfig {
26 /// Bot token.
27 pub token: String,
28 /// Agent to route messages to. Falls back to `default_agent` if absent.
29 pub agent: Option<String>,
30}