mirror of
https://github.com/mii443/ncb-tts-r2.git
synced 2025-08-22 16:15:29 +00:00
fix getting guild id
This commit is contained in:
@ -17,9 +17,11 @@ pub async fn voice_state_update(ctx: Context, old: Option<VoiceState>, new: Voic
|
||||
return;
|
||||
}
|
||||
|
||||
let guild_id = new
|
||||
.guild_id
|
||||
.unwrap_or(old.clone().unwrap().guild_id.unwrap());
|
||||
let guild_id = if let Some(guild_id) = new.guild_id {
|
||||
guild_id
|
||||
} else {
|
||||
old.clone().unwrap().guild_id.unwrap()
|
||||
};
|
||||
|
||||
let storage_lock = {
|
||||
let data_read = ctx.data.read().await;
|
||||
|
Reference in New Issue
Block a user