diff --git a/Cargo.toml b/Cargo.toml index 76bcd17..0640b23 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -12,7 +12,7 @@ tracing = "0.1.30" tracing-subscriber = "0.3.8" serde_json = "1.0.79" reqwest = "0.11.9" -slugify = "0.1.0" +slug = "0.1.4" [dependencies.tokio] version = "1.0" diff --git a/src/commands/challenge.rs b/src/commands/challenge.rs index 55de219..937c17a 100644 --- a/src/commands/challenge.rs +++ b/src/commands/challenge.rs @@ -14,7 +14,7 @@ use std::io::Write; // Required for rebuilding site // use std::process::Command; -use slugify::slugify; +use slug::slugify; fn get_challenge_number() -> i32 { let challenge_dir = format!("{}/content/challenges", env::var("HUGO").unwrap()); @@ -105,7 +105,7 @@ async fn submit(ctx: &Context, msg: &Message) -> CommandResult { let file_name = format!( "{}-{}-{}-{}.{}", i + 1, - slugify!(&msg.author.name), + slugify(&msg.author.name), msg.author.discriminator, images.len() + 1, extension @@ -146,7 +146,7 @@ async fn submit(ctx: &Context, msg: &Message) -> CommandResult { let file_name = format!( "{}-{}-{}{}.{}", submission_data.len() + 1, - slugify!(&msg.author.name), + slugify(&msg.author.name), msg.author.discriminator, if images.len() == 0 { String::from("")