diff options
| author | Nathan Perry <np@nathanperry.dev> | 2024-08-16 01:46:17 -0400 |
|---|---|---|
| committer | Nathan Perry <np@nathanperry.dev> | 2024-08-16 01:46:17 -0400 |
| commit | f39b1607b54073646b8ebae8852000706db885ad (patch) | |
| tree | 8033b4460593fb729f6aecc1c7deba84d952f3f0 /src/commands/meme | |
| parent | a435a926689b0b597caa1c724a91694f74dec778 (diff) | |
fix required command options
Diffstat (limited to 'src/commands/meme')
| -rw-r--r-- | src/commands/meme/create.rs | 16 |
1 files changed, 2 insertions, 14 deletions
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<String>, ) -> 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<String>, ) -> 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 = |
