aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/bot/music.rs12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/bot/music.rs b/src/bot/music.rs
index 427338e..0aa369d 100644
--- a/src/bot/music.rs
+++ b/src/bot/music.rs
@@ -386,19 +386,23 @@ impl MusicBot {
self.start_playing_audio(request);
} else {
- self.set_nickname(&format!("🎵 {} ({}%)", self.name, self.volume().round()));
+ self.update_name(state);
self.set_description("");
}
}
State::Stopped => {
- self.update_name(state);
- self.set_description("");
+ if *current_state != State::EndOfStream {
+ self.update_name(state);
+ self.set_description("");
+ }
}
_ => self.update_name(state),
}
}
- *current_state = state;
+ if !(*current_state == State::EndOfStream && state == State::Stopped) {
+ *current_state = state;
+ }
Ok(())
}