forked from DiscordBots/Rustendo
chore: improve checks
This commit is contained in:
parent
fc32017a10
commit
29392dc72d
7 changed files with 20 additions and 29 deletions
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue