chore: improve checks

This commit is contained in:
Miguel da Mota 2024-03-10 17:46:35 +01:00
parent fc32017a10
commit 29392dc72d
7 changed files with 20 additions and 29 deletions

View file

@ -224,9 +224,7 @@ pub async fn stop(ctx: &Context, guild_id: &GuildId) -> Result<bool, JoinError>
.expect("Cannot get Songbird")
.clone();
let has_handler = manager.get(*guild_id).is_some();
if has_handler {
if manager.get(*guild_id).is_some() {
manager.remove(*guild_id).await?;
return Ok(true); // Handler removed
}