abridged/src/bridge_discord/config.rs

18 lines
378 B
Rust

use std::{collections::HashMap, sync::Arc};
use serde::Deserialize;
use serenity::model::prelude::{WebhookId, ChannelId};
fn default_suffix() -> Arc<str> {
"[d]".into()
}
#[derive(Debug, Deserialize)]
pub struct DiscordConfig {
pub token: String,
#[serde(default)]
pub webhooks: HashMap<ChannelId, WebhookId>,
#[serde(default="default_suffix")]
pub suffix: Arc<str>,
}