From c10853f5d108db0843297562bdd3c78190e4db30 Mon Sep 17 00:00:00 2001 From: ElnuDev Date: Wed, 30 Nov 2022 00:06:45 -0800 Subject: [PATCH] Tentative embed caching fix --- src/commands/challenge.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/commands/challenge.rs b/src/commands/challenge.rs index cd97b1f..b593faa 100644 --- a/src/commands/challenge.rs +++ b/src/commands/challenge.rs @@ -204,6 +204,7 @@ pub async fn submit(ctx: Context<'_>, submission: serenity::Attachment) -> Resul Some(data["invite"].as_str().unwrap()) } else { None }; + let timestamp = std::time::SystemTime::now().duration_since(std::time::UNIX_EPOCH).unwrap().as_millis(); for image in submitted_images.iter() { for (other_guild_id, data) in guild_data.iter() { let here = other_guild_id.eq(&ctx.guild_id().unwrap().as_u64().to_string()); @@ -247,7 +248,7 @@ pub async fn submit(ctx: Context<'_>, submission: serenity::Attachment) -> Resul .name(username) .url(format!("https://discord.com/users/{}", author.id)); e.set_author(embed_author); - e.image(format!("https://tegakituesday.com/{n}/{image}")); + e.image(format!("https://tegakituesday.com/{n}/{image}#{timestamp}")); if let Some(accent_color) = accent_color { e.color(accent_color); }