From 646190eaf82ca665537692ef7613f3570a858840 Mon Sep 17 00:00:00 2001 From: Kyle Simpson Date: Sun, 20 Nov 2022 17:46:11 +0000 Subject: [PATCH] Deps: Update Twilight -> v0.14 --- Cargo.toml | 4 ++-- examples/serenity/voice/src/main.rs | 3 +-- .../serenity/voice_cached_audio/src/main.rs | 3 +-- .../serenity/voice_events_queue/src/main.rs | 3 +-- examples/serenity/voice_receive/src/main.rs | 3 +-- examples/twilight/Cargo.toml | 8 ++++---- examples/twilight/src/main.rs | 18 +++--------------- 7 files changed, 13 insertions(+), 29 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index a908243..1737cec 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -41,8 +41,8 @@ tokio-tungstenite = { optional = true, version = "0.17" } tokio-util = { features = ["io"], optional = true, version = "0.7" } tracing = { version = "0.1", features = ["log"] } tracing-futures = "0.2" -twilight-gateway = { default-features = false, optional = true, version = "0.13.0" } -twilight-model = { default-features = false, optional = true, version = "0.13.0" } +twilight-gateway = { default-features = false, optional = true, version = "0.14.0" } +twilight-model = { default-features = false, optional = true, version = "0.14.0" } typemap_rev = { optional = true, version = "0.1" } url = { optional = true, version = "2" } uuid = { features = ["v4"], optional = true, version = "1" } diff --git a/examples/serenity/voice/src/main.rs b/examples/serenity/voice/src/main.rs index 7157cf0..256f7ab 100644 --- a/examples/serenity/voice/src/main.rs +++ b/examples/serenity/voice/src/main.rs @@ -67,8 +67,7 @@ async fn main() { // Configure the client with your Discord bot token in the environment. let token = env::var("DISCORD_TOKEN").expect("Expected a token in the environment"); - let framework = StandardFramework::new() - .group(&GENERAL_GROUP); + let framework = StandardFramework::new().group(&GENERAL_GROUP); framework.configure(|c| c.prefix("~")); let intents = GatewayIntents::non_privileged() | GatewayIntents::MESSAGE_CONTENT; diff --git a/examples/serenity/voice_cached_audio/src/main.rs b/examples/serenity/voice_cached_audio/src/main.rs index a7b3a82..2b4e217 100644 --- a/examples/serenity/voice_cached_audio/src/main.rs +++ b/examples/serenity/voice_cached_audio/src/main.rs @@ -94,8 +94,7 @@ async fn main() { // Configure the client with your Discord bot token in the environment. let token = env::var("DISCORD_TOKEN").expect("Expected a token in the environment"); - let framework = StandardFramework::new() - .group(&GENERAL_GROUP); + let framework = StandardFramework::new().group(&GENERAL_GROUP); framework.configure(|c| c.prefix("~")); let intents = GatewayIntents::non_privileged() | GatewayIntents::MESSAGE_CONTENT; diff --git a/examples/serenity/voice_events_queue/src/main.rs b/examples/serenity/voice_events_queue/src/main.rs index 0300d5e..076fdb0 100644 --- a/examples/serenity/voice_events_queue/src/main.rs +++ b/examples/serenity/voice_events_queue/src/main.rs @@ -74,8 +74,7 @@ async fn main() { // Configure the client with your Discord bot token in the environment. let token = env::var("DISCORD_TOKEN").expect("Expected a token in the environment"); - let framework = StandardFramework::new() - .group(&GENERAL_GROUP); + let framework = StandardFramework::new().group(&GENERAL_GROUP); framework.configure(|c| c.prefix("~")); let intents = GatewayIntents::non_privileged() | GatewayIntents::MESSAGE_CONTENT; diff --git a/examples/serenity/voice_receive/src/main.rs b/examples/serenity/voice_receive/src/main.rs index 0d4d907..288647a 100644 --- a/examples/serenity/voice_receive/src/main.rs +++ b/examples/serenity/voice_receive/src/main.rs @@ -144,8 +144,7 @@ async fn main() { // Configure the client with your Discord bot token in the environment. let token = env::var("DISCORD_TOKEN").expect("Expected a token in the environment"); - let framework = StandardFramework::new() - .group(&GENERAL_GROUP); + let framework = StandardFramework::new().group(&GENERAL_GROUP); framework.configure(|c| c.prefix("~")); let intents = GatewayIntents::non_privileged() | GatewayIntents::MESSAGE_CONTENT; diff --git a/examples/twilight/Cargo.toml b/examples/twilight/Cargo.toml index 139238e..eac77dc 100644 --- a/examples/twilight/Cargo.toml +++ b/examples/twilight/Cargo.toml @@ -10,10 +10,10 @@ reqwest = "0.11" tracing = "0.1" tracing-subscriber = "0.2" tokio = { features = ["macros", "rt-multi-thread", "sync"], version = "1" } -twilight-gateway = "0.13" -twilight-http = "0.13" -twilight-model = "0.13" -twilight-standby = "0.13" +twilight-gateway = "0.14" +twilight-http = "0.14" +twilight-model = "0.14" +twilight-standby = "0.14" [dependencies.songbird] default-features = false diff --git a/examples/twilight/src/main.rs b/examples/twilight/src/main.rs index d50ea2e..308932c 100644 --- a/examples/twilight/src/main.rs +++ b/examples/twilight/src/main.rs @@ -66,9 +66,10 @@ async fn main() -> Result<(), Box> { let token = env::var("DISCORD_TOKEN")?; let http = HttpClient::new(token.clone()); - let user_id = http.current_user().exec().await?.model().await?.id; + let user_id = http.current_user().await?.model().await?.id; - let intents = Intents::GUILD_MESSAGES | Intents::MESSAGE_CONTENT | Intents::GUILD_VOICE_STATES; + let intents = + Intents::GUILD_MESSAGES | Intents::MESSAGE_CONTENT | Intents::GUILD_VOICE_STATES; let (cluster, events) = Cluster::new(token, intents).await?; cluster.up().await; @@ -115,7 +116,6 @@ async fn join(msg: Message, state: State) -> Result<(), Box Result<(), Box Result<(), Box Result<(), Box Result<(), Box Result<(), Box Result<(), Box Result<(), Box Result<(), Box Result<(), Box Result<(), Box Result<(), Box Result<(), Box