diff --git a/src/data/config.rs b/src/data/config.rs index ea4141b..5a8693e 100644 --- a/src/data/config.rs +++ b/src/data/config.rs @@ -19,18 +19,32 @@ impl Config { name: "New Server".to_string(), description: String::new(), - channels: vec![Channel { - id: "text-channels".to_string(), - name: "Text Channels".to_string(), + channels: vec![ + Channel { + id: "text-channels".to_string(), + name: "Text Channels".to_string(), - data: ChannelKind::Category { - channels: vec![Channel { - id: "general".to_string(), - name: "General".to_string(), - data: ChannelKind::Text, - }], + data: ChannelKind::Category { + channels: vec![Channel { + id: "general".to_string(), + name: "General".to_string(), + data: ChannelKind::Text, + }], + }, }, - }], + Channel { + id: "voice-channels".to_string(), + name: "Voice Channels".to_string(), + + data: ChannelKind::Category { + channels: vec![Channel { + id: "vc-1".to_string(), + name: "VC 1".to_string(), + data: ChannelKind::Voice { max_users: 255 }, + }], + }, + }, + ], }, port: 3415, diff --git a/src/types.rs b/src/types.rs index 9a0ef5a..f35f431 100644 --- a/src/types.rs +++ b/src/types.rs @@ -19,8 +19,9 @@ pub struct ServerMeta { #[serde(tag = "kind")] #[serde(rename_all = "camelCase")] pub enum ChannelKind { - Text, Category { channels: Vec }, + Voice { max_users: u8 }, + Text, } #[derive(Debug, Clone, Serialize, Deserialize)]