From 332eff26a0a358eef52c307b02b7e1ac080dd15f Mon Sep 17 00:00:00 2001 From: Nathan Perry Date: Sat, 11 May 2024 17:43:58 -0400 Subject: db: fixup build, async-await --- src/commands/meme/create.rs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/commands/meme/create.rs') diff --git a/src/commands/meme/create.rs b/src/commands/meme/create.rs index 160de7b..9aff370 100644 --- a/src/commands/meme/create.rs +++ b/src/commands/meme/create.rs @@ -57,7 +57,7 @@ pub async fn addmeme(ctx: &Context, msg: &Message, args: Args) -> CommandResult Some(text) }; - let mut conn = connection()?; + let mut conn = connection().await?; let image = msg.attachments.first(); @@ -175,7 +175,7 @@ pub async fn addaudiomeme(ctx: &Context, msg: &Message, args: Args) -> CommandRe Some(text) }; - let mut conn = connection()?; + let mut conn = connection().await?; let image_att = msg.attachments.first().ok_or(anyhow!("no attachment")); @@ -183,7 +183,8 @@ pub async fn addaudiomeme(ctx: &Context, msg: &Message, args: Args) -> CommandRe if let Ok(att) = image_att { let data = att.download().await?; - image_id = Image::create(&mut conn, &att.filename, data, msg.author.id.get())?.await.pipe(Some); + image_id = + Image::create(&mut conn, &att.filename, data, msg.author.id.get()).await?.pipe(Some); } let mut audio_data = Vec::new(); -- cgit v1.3.1