diff --git a/.gitignore b/.gitignore index 0935315..f38627d 100644 --- a/.gitignore +++ b/.gitignore @@ -3,4 +3,5 @@ Cargo.lock config.toml credentials.json /audio -*.mp3 \ No newline at end of file +*.mp3 +*.swp diff --git a/src/database/database.rs b/src/database/database.rs index 3720426..4e08763 100644 --- a/src/database/database.rs +++ b/src/database/database.rs @@ -18,7 +18,7 @@ impl Database { &mut self, user_id: u64, ) -> redis::RedisResult> { - if let Ok(connection) = self.client.get_connection() { + if let Ok(mut connection) = self.client.get_connection() { let config: String = connection .get(format!("discord_user:{}", user_id)) .unwrap_or_default(); diff --git a/src/events/voice_state_update.rs b/src/events/voice_state_update.rs index 53e128f..e6015b7 100644 --- a/src/events/voice_state_update.rs +++ b/src/events/voice_state_update.rs @@ -18,7 +18,7 @@ pub async fn voice_state_update( old: Option, new: VoiceState, ) { - if new.member.unwrap().user.bot { + if new.member.clone().unwrap().user.bot { return; } let guild_id = guild_id.unwrap();