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
|
credentials.json
|
||||||
/audio
|
/audio
|
||||||
*.mp3
|
*.mp3
|
||||||
|
*.swp
|
||||||
|
@ -18,7 +18,7 @@ impl Database {
|
|||||||
&mut self,
|
&mut self,
|
||||||
user_id: u64,
|
user_id: u64,
|
||||||
) -> redis::RedisResult<Option<UserConfig>> {
|
) -> 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
|
let config: String = connection
|
||||||
.get(format!("discord_user:{}", user_id))
|
.get(format!("discord_user:{}", user_id))
|
||||||
.unwrap_or_default();
|
.unwrap_or_default();
|
||||||
|
@ -18,7 +18,7 @@ pub async fn voice_state_update(
|
|||||||
old: Option<VoiceState>,
|
old: Option<VoiceState>,
|
||||||
new: VoiceState,
|
new: VoiceState,
|
||||||
) {
|
) {
|
||||||
if new.member.unwrap().user.bot {
|
if new.member.clone().unwrap().user.bot {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
let guild_id = guild_id.unwrap();
|
let guild_id = guild_id.unwrap();
|
||||||
|
Reference in New Issue
Block a user