diff --git a/src/commands/mod.rs b/src/commands/mod.rs index bf69626..f2d701e 100644 --- a/src/commands/mod.rs +++ b/src/commands/mod.rs @@ -161,7 +161,9 @@ pub fn wc_crop(command: &str, msg: &Message) -> Result<(), Error> { pub fn wc_crop_discord_upload(msg: &Message) -> Result<(), Error> { let last = &msg.channel_id.messages(|g| g.before(msg.id).limit(1))?[0]; - for attachment in &last.attachments { + let mut attachments = last.attachments.clone(); + attachments.extend(msg.attachments.clone()); + for attachment in &attachments { let url = &attachment.url; let new_url = reqwest::get(&format!("https://wynncraft-autocrop.herokuapp.com/crop?url={}", url))?.text().unwrap(); if new_url.starts_with("https://res.cloudinary.com") {