Voice chat channel

This commit is contained in:
2026-08-26 01:45:39 +02:00
parent e433c1061f
commit 756018020e
2 changed files with 26 additions and 11 deletions
+24 -10
View File
@@ -19,18 +19,32 @@ impl Config {
name: "New Server".to_string(), name: "New Server".to_string(),
description: String::new(), description: String::new(),
channels: vec![Channel { channels: vec![
id: "text-channels".to_string(), Channel {
name: "Text Channels".to_string(), id: "text-channels".to_string(),
name: "Text Channels".to_string(),
data: ChannelKind::Category { data: ChannelKind::Category {
channels: vec![Channel { channels: vec![Channel {
id: "general".to_string(), id: "general".to_string(),
name: "General".to_string(), name: "General".to_string(),
data: ChannelKind::Text, 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, port: 3415,
+2 -1
View File
@@ -19,8 +19,9 @@ pub struct ServerMeta {
#[serde(tag = "kind")] #[serde(tag = "kind")]
#[serde(rename_all = "camelCase")] #[serde(rename_all = "camelCase")]
pub enum ChannelKind { pub enum ChannelKind {
Text,
Category { channels: Vec<Channel> }, Category { channels: Vec<Channel> },
Voice { max_users: u8 },
Text,
} }
#[derive(Debug, Clone, Serialize, Deserialize)] #[derive(Debug, Clone, Serialize, Deserialize)]