mirror of
https://github.com/mii443/ncb-tts-r2.git
synced 2025-08-22 16:15:29 +00:00
fix database, borrow
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@ -4,3 +4,4 @@ config.toml
|
||||
credentials.json
|
||||
/audio
|
||||
*.mp3
|
||||
*.swp
|
||||
|
@ -18,7 +18,7 @@ impl Database {
|
||||
&mut self,
|
||||
user_id: u64,
|
||||
) -> redis::RedisResult<Option<UserConfig>> {
|
||||
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();
|
||||
|
@ -18,7 +18,7 @@ pub async fn voice_state_update(
|
||||
old: Option<VoiceState>,
|
||||
new: VoiceState,
|
||||
) {
|
||||
if new.member.unwrap().user.bot {
|
||||
if new.member.clone().unwrap().user.bot {
|
||||
return;
|
||||
}
|
||||
let guild_id = guild_id.unwrap();
|
||||
|
Reference in New Issue
Block a user