aboutsummaryrefslogtreecommitdiff
path: root/src/commands/meme/create.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/commands/meme/create.rs')
-rw-r--r--src/commands/meme/create.rs7
1 files changed, 4 insertions, 3 deletions
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();