From 769698ba27f7cd6fee4c52b903034bf61d7e6f14 Mon Sep 17 00:00:00 2001 From: Dissssy Date: Mon, 13 May 2024 22:43:34 -0400 Subject: [PATCH] updated deps --- Cargo.toml | 35 ++++++++++++++++++----------------- src/commands/embed.rs | 9 ++++----- 2 files changed, 22 insertions(+), 22 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 1c0a53c..e8afa9e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -6,32 +6,33 @@ edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -serde = "1.0.200" -serde_json = "1.0.116" +serde = "1.0.201" +serde_json = "1.0.117" serenity = { version = "0.11.7", default-features = false, features = ["client", "gateway", "rustls_backend", "model", "voice", "cache", "collector"] } -tokio = { version = "1.23.0", features = ["full"] } +tokio = { version = "1.37.0", features = ["full"] } ytd-rs = { version = "0.1.7", features = ["yt-dlp"] } nanoid = "0.4.0" -poll-promise = { version = "0.2.0", features = ["tokio"] } -tracing = "0.1.37" -tracing-subscriber = "0.3.16" -dirs = "5.0.0" -anyhow = "1.0.68" -audiotags = "0.4.1" -songbird = {version = "0.3.2", features = ["yt-dlp", ]} +poll-promise = { version = "0.3.0", features = ["tokio"] } +tracing = "0.1.40" +tracing-subscriber = "0.3.18" +dirs = "5.0.1" +anyhow = "1.0.83" +audiotags = "0.5.0" +songbird = {version = "0.3.2"} +symphonia = {version = "0.5.4", features = ["all"]} # url = "2.3.1" -reqwest = "0.11.13" +reqwest = {version = "0.12.4", features = ["json"]} # html = "0.1.1" rand = "0.8.5" # rayon = "1.5.3" -ffprobe = "0.3.3" -base64 = "0.21.0" -async-recursion = "1.0.0" -image = "0.24.5" +ffprobe = "0.4.0" +base64 = "0.22.1" +async-recursion = "1.1.1" +image = "0.25.1" lazy_static = "1.4.0" -chrono = "0.4.31" +chrono = "0.4.38" linkify = "0.10.0" -env_logger = "0.10.0" +env_logger = "0.11.3" urlencoding = "2.1.3" regex = "1.10.4" diff --git a/src/commands/embed.rs b/src/commands/embed.rs index a6806de..1d7fc3f 100644 --- a/src/commands/embed.rs +++ b/src/commands/embed.rs @@ -1,7 +1,6 @@ -use std::io::{BufReader, BufWriter, Cursor}; +use std::io::{BufWriter, Cursor}; use anyhow::Error; -use image::ImageOutputFormat; use serenity::builder::CreateApplicationCommand; use serenity::model::application::interaction::InteractionResponseType; use serenity::model::prelude::command::CommandOptionType; @@ -9,7 +8,7 @@ use serenity::model::prelude::PremiumTier; use image::{ codecs::gif::{GifDecoder, GifEncoder, Repeat::Infinite}, - AnimationDecoder, DynamicImage, Frame, GenericImage, GenericImageView, Pixel, + AnimationDecoder, DynamicImage, Frame, GenericImage, GenericImageView, ImageFormat, Pixel, }; use serenity::model::prelude::interaction::autocomplete::AutocompleteInteraction; @@ -158,7 +157,7 @@ fn john_the_image(image: DynamicImage) -> anyhow::Result { fn john(image: Vec, filename: &str) -> Result, Error> { if filename.ends_with("gif") { - let file_in = BufReader::new(image.as_slice()); + let file_in = Cursor::new(image.as_slice()); let decoder = GifDecoder::new(file_in)?; let frames = decoder.into_frames(); let frames = frames.collect_frames()?; @@ -185,7 +184,7 @@ fn john(image: Vec, filename: &str) -> Result, Error> { let image = image::load_from_memory(&image)?; let no = john_the_image(image)?; let mut output = Cursor::new(Vec::new()); - no.write_to(&mut output, ImageOutputFormat::Png)?; + no.write_to(&mut output, ImageFormat::Png)?; Ok(output.into_inner()) } }