From a31368654ed9d5b9f7189a0b39451c8efa12b674 Mon Sep 17 00:00:00 2001 From: GnomedDev Date: Thu, 11 Jan 2024 01:31:17 +0000 Subject: [PATCH] Update deps --- Cargo.lock | 82 ++++++++++++++++++++-------------------- Cargo.toml | 2 +- src/commands/other.rs | 2 +- src/commands/owner.rs | 2 +- src/commands/settings.rs | 4 +- src/events/message.rs | 8 +++- src/main.rs | 2 +- 7 files changed, 52 insertions(+), 50 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 048322b..12ec226 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -164,9 +164,9 @@ checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8" [[package]] name = "base64" -version = "0.21.5" +version = "0.21.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "35636a1494ede3b646cc98f74f8e62c773a38a659ebc777a2cf26b9b74171df9" +checksum = "c79fed4cdb43e993fcdadc7e58a09fd0e3e649c4436fa11da71c9f1f3ee7feb9" [[package]] name = "bitflags" @@ -381,54 +381,46 @@ dependencies = [ [[package]] name = "crossbeam-channel" -version = "0.5.10" +version = "0.5.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "82a9b73a36529d9c47029b9fb3a6f0ea3cc916a261195352ba19e770fc1748b2" +checksum = "176dc175b78f56c0f321911d9c8eb2b77a78a4860b9c19db83835fea1a46649b" dependencies = [ - "cfg-if", "crossbeam-utils", ] [[package]] name = "crossbeam-deque" -version = "0.8.4" +version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fca89a0e215bab21874660c67903c5f143333cab1da83d041c7ded6053774751" +checksum = "613f8cc01fe9cf1a3eb3d7f488fd2fa8388403e97039e2f73692932e291a770d" dependencies = [ - "cfg-if", "crossbeam-epoch", "crossbeam-utils", ] [[package]] name = "crossbeam-epoch" -version = "0.9.17" +version = "0.9.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0e3681d554572a651dda4186cd47240627c3d0114d45a95f6ad27f2f22e7548d" +checksum = "5b82ac4a3c2ca9c3460964f020e1402edd5753411d7737aa39c3714ad1b5420e" dependencies = [ - "autocfg", - "cfg-if", "crossbeam-utils", ] [[package]] name = "crossbeam-queue" -version = "0.3.10" +version = "0.3.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "adc6598521bb5a83d491e8c1fe51db7296019d2ca3cb93cc6c2a20369a4d78a2" +checksum = "df0346b5d5e76ac2fe4e327c5fd1118d6be7c51dfb18f9b7922923f287471e35" dependencies = [ - "cfg-if", "crossbeam-utils", ] [[package]] name = "crossbeam-utils" -version = "0.8.18" +version = "0.8.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3a430a770ebd84726f584a90ee7f020d28db52c6d02138900f22341f866d39c" -dependencies = [ - "cfg-if", -] +checksum = "248e3bacc7dc6baa3b21e405ee045c3047101a49145e7e9eca583ab4c2ca5345" [[package]] name = "crypto-common" @@ -476,7 +468,7 @@ dependencies = [ "ident_case", "proc-macro2", "quote", - "strsim", + "strsim 0.10.0", "syn 2.0.48", ] @@ -569,7 +561,7 @@ dependencies = [ "sha2", "songbird", "sqlx", - "strsim", + "strsim 0.11.0", "strum_macros", "symphonia", "sysinfo", @@ -903,9 +895,9 @@ dependencies = [ [[package]] name = "getrandom" -version = "0.2.11" +version = "0.2.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fe9006bed769170c11f845cf00c7c1e9092aeb3f268e007c3e760ac68008070f" +checksum = "190092ea657667030ac6a35e305e62fc4dd69fd98ac98631e5d3a2b1575a12b5" dependencies = [ "cfg-if", "js-sys", @@ -938,9 +930,9 @@ checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b" [[package]] name = "h2" -version = "0.3.22" +version = "0.3.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d6250322ef6e60f93f9a2162799302cd6f68f79f6e5d85c8c16f14d1d958178" +checksum = "b553656127a00601c8ae5590fcfdc118e4083a7924b6cf4ffc1ea4b99dc429d7" dependencies = [ "bytes", "fnv", @@ -1209,9 +1201,9 @@ checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" [[package]] name = "libc" -version = "0.2.151" +version = "0.2.152" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "302d7ab3130588088d277783b1e2d2e10c9e9e4a16dd9050e6ec93fb3e7048f4" +checksum = "13e3bf6590cbc649f4d1a3eefc9d5d6eb746f5200ffb04e5e142700b8faa56e7" [[package]] name = "linkify" @@ -1302,9 +1294,9 @@ dependencies = [ [[package]] name = "mini-moka" -version = "0.10.2" +version = "0.10.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23e0b72e7c9042467008b10279fc732326bd605459ae03bda88825909dd19b56" +checksum = "c325dfab65f261f386debee8b0969da215b3fa0037e74c8a1234db7ba986d803" dependencies = [ "crossbeam-channel", "crossbeam-utils", @@ -1607,7 +1599,7 @@ dependencies = [ [[package]] name = "poise" version = "0.6.0-rc1" -source = "git+https://github.com/serenity-rs/poise?branch=serenity-next#dad39fe651c60ac426121908fd114332f96b9c18" +source = "git+https://github.com/serenity-rs/poise?branch=serenity-next#042072ca35f3724ef7c8a8e3fc4d6dad86d2e8b5" dependencies = [ "async-trait", "derivative", @@ -1623,7 +1615,7 @@ dependencies = [ [[package]] name = "poise_macros" version = "0.6.0-rc1" -source = "git+https://github.com/serenity-rs/poise?branch=serenity-next#dad39fe651c60ac426121908fd114332f96b9c18" +source = "git+https://github.com/serenity-rs/poise?branch=serenity-next#042072ca35f3724ef7c8a8e3fc4d6dad86d2e8b5" dependencies = [ "darling", "proc-macro2", @@ -1810,7 +1802,7 @@ version = "0.11.23" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "37b1ae8d9ac08420c66222fb9096fc5de435c3c48542bc5336c51892cffafb41" dependencies = [ - "base64 0.21.5", + "base64 0.21.6", "bytes", "encoding_rs", "futures-core", @@ -1973,7 +1965,7 @@ version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1c74cae0a4cf6ccbbf5f359f08efdf8ee7e1dc532573bf0db71968cb56b1448c" dependencies = [ - "base64 0.21.5", + "base64 0.21.6", ] [[package]] @@ -2189,11 +2181,11 @@ dependencies = [ [[package]] name = "serenity" version = "0.12.0" -source = "git+https://github.com/serenity-rs/serenity?branch=next#590cc89e9ed5fde7e8992efc47f6f342dfdcba1a" +source = "git+https://github.com/serenity-rs/serenity?branch=next#4df87e16c513d1b94dccd0be5786744df5889dc5" dependencies = [ "arrayvec", "async-trait", - "base64 0.21.5", + "base64 0.21.6", "bitflags 2.4.1", "bool_to_bitflags", "bytes", @@ -2299,9 +2291,9 @@ dependencies = [ [[package]] name = "small-fixed-array" -version = "0.1.1" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06d9ffc21173849a13fec2307fbd84d529ebf0b3952dcc76f5c81cfa549d22c1" +checksum = "fe8b47b4046c1a383f46cb1d783b8afaabf36cea0833d739ac1c6c4a94f57d15" dependencies = [ "serde", "tracing", @@ -2327,7 +2319,7 @@ dependencies = [ [[package]] name = "songbird" version = "0.4.0" -source = "git+https://github.com/serenity-rs/songbird?branch=serenity-next#c440043dceb5ff82f8bd341be4b424b271da59a2" +source = "git+https://github.com/serenity-rs/songbird?branch=serenity-next#201c4c215b3b3089b7065861446a1cfc56bb762e" dependencies = [ "async-trait", "audiopus", @@ -2491,7 +2483,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d6ac0ac3b7ccd10cc96c7ab29791a7dd236bd94021f31eec7ba3d46a74aa1c24" dependencies = [ "atoi", - "base64 0.21.5", + "base64 0.21.6", "bitflags 2.4.1", "byteorder", "crc", @@ -2557,6 +2549,12 @@ version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" +[[package]] +name = "strsim" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5ee073c9e4cd00e28217186dbe12796d692868f432bf2e97ee73bed0c56dfa01" + [[package]] name = "strum_macros" version = "0.25.3" @@ -3630,9 +3628,9 @@ checksum = "dff9641d1cd4be8d1a070daf9e3773c5f67e78b4d9d42263020c057706765c04" [[package]] name = "winnow" -version = "0.5.32" +version = "0.5.34" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8434aeec7b290e8da5c3f0d628cb0eac6cabcb31d14bb74f779a08109a5914d6" +checksum = "b7cf47b659b318dccbd69cc4797a39ae128f533dce7902a1096044d1967b9c16" dependencies = [ "memchr", ] diff --git a/Cargo.toml b/Cargo.toml index c5c8e4b..2596df3 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -20,7 +20,7 @@ indexmap = "2" tracing = "0.1" gettext = "0.4" linkify = "0.10" -strsim = "0.10" +strsim = "0.11" sysinfo = "0.30" num-format = "0.4" itertools = "0.12" diff --git a/src/commands/other.rs b/src/commands/other.rs index c088d4b..a54d214 100644 --- a/src/commands/other.rs +++ b/src/commands/other.rs @@ -212,7 +212,7 @@ pub async fn botstats(ctx: Context<'_>) -> CommandResult { let guild_ids = cache.guilds(); let (total_guild_count, total_voice_clients, total_members) = { - let guilds: Vec<_> = guild_ids.iter().filter_map(|id| cache.guild(id)).collect(); + let guilds: Vec<_> = guild_ids.iter().filter_map(|id| cache.guild(*id)).collect(); ( guilds.len(), diff --git a/src/commands/owner.rs b/src/commands/owner.rs index 778e38e..ea24d62 100644 --- a/src/commands/owner.rs +++ b/src/commands/owner.rs @@ -198,7 +198,7 @@ pub async fn refresh_ofs(ctx: Context<'_>) -> CommandResult { let all_guild_owners = cache .guilds() .iter() - .filter_map(|id| cache.guild(id).map(|g| g.owner_id)) + .filter_map(|id| cache.guild(*id).map(|g| g.owner_id)) .collect::>(); let current_ofs_members = support_guild_members diff --git a/src/commands/settings.rs b/src/commands/settings.rs index c2093c1..9604213 100644 --- a/src/commands/settings.rs +++ b/src/commands/settings.rs @@ -1190,7 +1190,7 @@ pub async fn nick( if author.id != user.id && !guild_id - .member(ctx, author) + .member(ctx, author.id) .await? .permissions(ctx)? .administrator() @@ -1283,7 +1283,7 @@ pub async fn setup( let channel = if let Some(channel) = channel { channel } else { - let author_member = guild_id.member(ctx, author).await?; + let author_member = guild_id.member(ctx, author.id).await?; let mut text_channels: Vec<_> = { let guild = require_guild!(ctx); diff --git a/src/events/message.rs b/src/events/message.rs index 0afb552..382d6ab 100644 --- a/src/events/message.rs +++ b/src/events/message.rs @@ -313,8 +313,12 @@ async fn process_support_dm( let mut attachments = Vec::new(); for attachment in &message.attachments { - let attachment_builder = - serenity::CreateAttachment::url(&ctx.http, &attachment.url).await?; + let attachment_builder = serenity::CreateAttachment::url( + &ctx.http, + attachment.url.as_str(), + attachment.filename.to_string(), + ) + .await?; attachments.push(attachment_builder); } diff --git a/src/main.rs b/src/main.rs index 665b935..928ef37 100644 --- a/src/main.rs +++ b/src/main.rs @@ -429,7 +429,7 @@ async fn _main(start_time: std::time::SystemTime) -> Result<()> { ..poise::FrameworkOptions::default() }; - let mut client = serenity::Client::builder(token, intents) + let mut client = serenity::Client::builder(&token, intents) .voice_manager::(songbird) .framework(poise::Framework::new(framework_options, |_, _, _| { Box::pin(async { Ok(data) })