From 84eaf568106bbe2f4633618fd3edaec33c02558b Mon Sep 17 00:00:00 2001 From: trivernis Date: Sat, 15 Oct 2022 16:25:03 +0200 Subject: [PATCH] Update serenity additions --- Cargo.lock | 4 +++- Cargo.toml | 36 +++++++++++++++++------------------ src/providers/music/player.rs | 5 +++-- 3 files changed, 24 insertions(+), 21 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index d8296b0..441b8bc 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3026,7 +3026,9 @@ dependencies = [ [[package]] name = "serenity-additions" -version = "0.3.2" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "57a6c19ae7a6525fbe4fb79508779cf40b1da676a3f2f23085e387e7048e8234" dependencies = [ "dashmap", "futures", diff --git a/Cargo.toml b/Cargo.toml index c49643a..760ea3c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -3,7 +3,7 @@ members=["bot-coreutils", "bot-database", "bot-database/migration", "."] [package] name = "tobi-rs" -version = "0.10.4" +version = "0.11.0" authors = ["trivernis "] edition = "2018" @@ -15,23 +15,23 @@ panic = 'abort' [dependencies] bot-database = {path="./bot-database"} bot-coreutils = {path="./bot-coreutils"} -serenity = "0.11" +serenity = "0.11.5" dotenv = "0.15.0" -serde_derive = "1.0.137" -serde = "1.0.137" -thiserror = "1.0.31" +serde_derive = "1.0.145" +serde = "1.0.145" +thiserror = "1.0.37" minecraft-data-rs = "0.5.0" songbird = "0.3.0" -serde_json = "1.0.81" +serde_json = "1.0.86" rand = "0.8.5" -regex = "1.5.6" +regex = "1.6.0" aspotify = "0.7.1" lazy_static = "1.4.0" -futures = "0.3.21" -chrono = "0.4.19" +futures = "0.3.24" +chrono = "0.4.22" sysinfo = "0.26.4" -reqwest = "0.11.10" -chrono-tz = "0.6.1" +reqwest = "0.11.12" +chrono-tz = "0.6.3" sauce-api = "0.9.3" rustc_version_runtime = "0.2.1" trigram = "0.4.4" @@ -39,14 +39,14 @@ typemap_rev = "0.2.0" youtube-metadata = "0.2.0" xkcd-search = "0.1.2" animethemes-rs = "0.4.4" -build-time = "0.1.1" -tracing-subscriber = { version = "0.3.11", features = ["env-filter"] } -tracing = "0.1.34" -serenity-additions = "0.3.2" +build-time = "0.1.2" +tracing-subscriber = { version = "0.3.16", features = ["env-filter"] } +tracing = "0.1.37" +serenity-additions = "0.3.4" [dependencies.tokio] -version = "1.19.2" +version = "1.21.2" features = ["macros", "rt-multi-thread"] -[patch.crates-io] -serenity-additions = { path = "../serenity-additions" } +# [patch.crates-io] +# serenity-additions = { path = "../serenity-additions" } diff --git a/src/providers/music/player.rs b/src/providers/music/player.rs index dc3b8eb..d04a5ac 100644 --- a/src/providers/music/player.rs +++ b/src/providers/music/player.rs @@ -219,9 +219,9 @@ impl MusicPlayer { self.paused = !self.paused; if let Some(track) = self.current_track.as_ref() { if self.paused { - track.play()?; - } else { track.pause()?; + } else { + track.play()?; } } @@ -282,6 +282,7 @@ fn wait_for_disconnect( tracing::info!("Leaving voice channel"); if let Some(track) = player_lock.current_track.take() { + player_lock.queue().clear(); let _ = track.stop(); } if let Some(handler) = manager.get(guild_id) {