Remove some debugging println! macros and reorder InfoData

This commit is contained in:
Evie Viau 2022-02-19 20:33:10 -05:00
parent 12487b67b0
commit 1da12cab48
No known key found for this signature in database
GPG key ID: DBCFB51C41FF87FF
2 changed files with 3 additions and 4 deletions

View file

@ -80,6 +80,9 @@ pub struct VST_CREATE {
#[derive(Deserialize, Serialize, Debug)]
#[serde(untagged)]
pub enum InfoData {
/// Sent by the client to create a voice state.
VST_CREATE(VST_CREATE),
/// Request a channel to be created inside the voice server.
///
/// The Server MUST reply back with a CHANNEL_ASSIGN when resources are
@ -108,9 +111,6 @@ pub enum InfoData {
guild_id: Option<String>
},
/// Sent by the client to create a voice state.
VST_CREATE(VST_CREATE),
/// Sent by the server to indicate the success of a VST_CREATE.
VST_DONE {
/// User ID

View file

@ -220,7 +220,6 @@ async fn handle_conn(peer: SocketAddr, stream: TcpStream, redis_client: Client,
},
InfoType::CHANNEL_DESTROY => todo!(),
InfoType::VST_CREATE => {
println!("{:?} {:?}", &info.0, &info.1);
if let InfoData::VST_CREATE(dn) = info.1 {
let guild_id = dn.clone().guild_id.unwrap_or("dm".to_string());
println!("Creating voice state for {} in {}", &dn.channel_id, &guild_id);