Deps: Update twilight to 0.13 (#147)

* update twilight to 0.13

* Update src/manager.rs

Co-authored-by: Kyle Simpson <kyleandrew.simpson@gmail.com>

Co-authored-by: Kyle Simpson <kyleandrew.simpson@gmail.com>
This commit is contained in:
Erk
2022-08-20 15:01:06 +00:00
committed by Kyle Simpson
parent 48db45ffd8
commit 372156e638
3 changed files with 8 additions and 7 deletions

View File

@@ -41,8 +41,8 @@ tokio-tungstenite = { optional = true, version = "0.17" }
tokio-util = { features = ["io"], optional = true, version = "0.7" } tokio-util = { features = ["io"], optional = true, version = "0.7" }
tracing = { version = "0.1", features = ["log"] } tracing = { version = "0.1", features = ["log"] }
tracing-futures = "0.2" tracing-futures = "0.2"
twilight-gateway = { default-features = false, optional = true, version = "0.12.0" } twilight-gateway = { default-features = false, optional = true, version = "0.13.0" }
twilight-model = { default-features = false, optional = true, version = "0.12.0" } twilight-model = { default-features = false, optional = true, version = "0.13.0" }
typemap_rev = { optional = true, version = "0.1" } typemap_rev = { optional = true, version = "0.1" }
url = { optional = true, version = "2" } url = { optional = true, version = "2" }
uuid = { features = ["v4"], optional = true, version = "1" } uuid = { features = ["v4"], optional = true, version = "1" }

View File

@@ -10,10 +10,10 @@ reqwest = "0.11"
tracing = "0.1" tracing = "0.1"
tracing-subscriber = "0.2" tracing-subscriber = "0.2"
tokio = { features = ["macros", "rt-multi-thread", "sync"], version = "1" } tokio = { features = ["macros", "rt-multi-thread", "sync"], version = "1" }
twilight-gateway = "0.12" twilight-gateway = "0.13"
twilight-http = "0.12" twilight-http = "0.13"
twilight-model = "0.12" twilight-model = "0.13"
twilight-standby = "0.12" twilight-standby = "0.13"
[dependencies.songbird] [dependencies.songbird]
default-features = false default-features = false

View File

@@ -359,7 +359,8 @@ impl Songbird {
pub async fn process(&self, event: &TwilightEvent) { pub async fn process(&self, event: &TwilightEvent) {
match event { match event {
TwilightEvent::VoiceServerUpdate(v) => { TwilightEvent::VoiceServerUpdate(v) => {
let call = v.guild_id.map(GuildId::from).and_then(|id| self.get(id)); let id = GuildId::from(v.guild_id);
let call = self.get(id);
if let Some(call) = call { if let Some(call) = call {
let mut handler = call.lock().await; let mut handler = call.lock().await;