0.2.0 player update

This commit is contained in:
2024-02-07 23:36:46 +01:00
parent 4cf290c840
commit 70c249787c
16 changed files with 112 additions and 122 deletions

View File

@@ -26,8 +26,16 @@ async fn mute(ctx: &Context, msg: &Message) -> CommandResult {
let mut handler = handler_lock.lock().await;
if handler.is_mute() {
check_msg(msg.channel_id.say(&ctx.http, "Already muted").await);
if handler.is_mute() {
if let Err(e) = handler.mute(false).await {
check_msg(
msg.channel_id
.say(&ctx.http, format!("failed: {:?}", e))
.await,
);
}
check_msg(msg.channel_id.say(&ctx.http, "Unmuted").await);
} else {
if let Err(err) = handler.mute(true).await {
check_msg(