From f39b1607b54073646b8ebae8852000706db885ad Mon Sep 17 00:00:00 2001 From: Nathan Perry Date: Fri, 16 Aug 2024 01:46:17 -0400 Subject: fix required command options --- src/commands/meme/create.rs | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) (limited to 'src/commands/meme') diff --git a/src/commands/meme/create.rs b/src/commands/meme/create.rs index e2eacbf..c28f583 100644 --- a/src/commands/meme/create.rs +++ b/src/commands/meme/create.rs @@ -33,14 +33,8 @@ use crate::{ pub async fn addmeme( ctx: PoiseContext<'_>, title: String, - #[rest] text: String, + #[rest] text: Option, ) -> anyhow::Result<()> { - let text = if text.is_empty() { - None - } else { - Some(text) - }; - let mut conn = connection().await?; let image = util::msg(ctx).and_then(|msg| msg.attachments.first()); @@ -101,7 +95,7 @@ pub async fn addaudiomeme( ctx: PoiseContext<'_>, title: String, audio_str: String, - #[rest] rest: String, + #[rest] text: Option, ) -> anyhow::Result<()> { debug!("running addaudiomeme"); @@ -155,12 +149,6 @@ pub async fn addaudiomeme( let mut audio_reader = ffmpeg_command.stdout.unwrap(); - let text = if rest.is_empty() { - None - } else { - Some(rest) - }; - let mut conn = connection().await?; let image_att = -- cgit v1.3.1