Skip to content

Commit

Permalink
updated deps
Browse files Browse the repository at this point in the history
  • Loading branch information
Dissssy committed May 14, 2024
1 parent b76e14f commit 769698b
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 22 deletions.
35 changes: 18 additions & 17 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down
9 changes: 4 additions & 5 deletions src/commands/embed.rs
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
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;
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;
Expand Down Expand Up @@ -158,7 +157,7 @@ fn john_the_image(image: DynamicImage) -> anyhow::Result<DynamicImage> {

fn john(image: Vec<u8>, filename: &str) -> Result<Vec<u8>, 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()?;
Expand All @@ -185,7 +184,7 @@ fn john(image: Vec<u8>, filename: &str) -> Result<Vec<u8>, 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())
}
}
Expand Down

0 comments on commit 769698b

Please sign in to comment.