From 75e2ce0d82e264491f1c4231920b808dba23be60 Mon Sep 17 00:00:00 2001 From: Jokler Date: Mon, 6 Jan 2020 05:48:19 +0100 Subject: Change the volume range back to 0..100 Numbers with a decimal point are a lot more annoying to type. This is probably because the '0.' prefix required by almost all values does not convey any meaningful information to the bot. --- src/main.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/main.rs b/src/main.rs index 7b674b9..07cf681 100644 --- a/src/main.rs +++ b/src/main.rs @@ -175,7 +175,7 @@ fn handle_event<'a>(state: &State, conn: &ConnectionLock<'a>, event: &Event) { } Some("volume") => { if let Ok(volume) = f64::from_str(tokens[1]) { - state.volume(volume); + state.volume(volume / 100.0); } } Some("play") => { -- cgit v1.2.3-70-g09d2