diff options
Diffstat (limited to 'src/commands/meme/create.rs')
| -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 = |
